pkg

package
v0.0.0-...-a8c2199 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

Types

type ComplexityRoot

type ComplexityRoot struct {
	EvaluateOutput struct {
		Bestmove func(childComplexity int) int
		Depth    func(childComplexity int) int
		Nodes    func(childComplexity int) int
		Pv       func(childComplexity int) int
		Value    func(childComplexity int) int
	}

	Mutation struct {
		Foo func(childComplexity int) int
	}

	Query struct {
		Evaluate func(childComplexity int, input EvaluateInput) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type EvaluateInput

type EvaluateInput struct {
	Sfen          string   `json:"sfen"`
	Moves         []string `json:"moves"`
	TimeoutSecond int      `json:"timeoutSecond"`
}

type EvaluateOutput

type EvaluateOutput struct {
	Value    int      `json:"value"`
	Nodes    int      `json:"nodes"`
	Depth    int      `json:"depth"`
	Bestmove string   `json:"bestmove"`
	Pv       []string `json:"pv"`
}

type MutationResolver

type MutationResolver interface {
	Foo(ctx context.Context) (bool, error)
}

type QueryResolver

type QueryResolver interface {
	Evaluate(ctx context.Context, input EvaluateInput) (*EvaluateOutput, error)
}

type ResolverRoot

type ResolverRoot interface {
	Mutation() MutationResolver
	Query() QueryResolver
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL