server

package
v0.0.0-...-eab30a4 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: Unlicense Imports: 14 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 {
	Mutation struct {
		Set func(childComplexity int, name string, value inputs.InputValue) int
	}

	Query struct {
		Get func(childComplexity int, name string) int
	}

	Value struct {
		Name      func(childComplexity int) int
		ValueType func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
	AllowValueType func(ctx context.Context, obj interface{}, next graphql.Resolver, field string, allow []*directives.ValueTypeAllow) (res interface{}, err error)
}

type MutationResolver

type MutationResolver interface {
	Set(ctx context.Context, name string, value inputs.InputValue) (*types.Value, error)
}

type QueryResolver

type QueryResolver interface {
	Get(ctx context.Context, name string) (*types.Value, error)
}

type ResolverRoot

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

Jump to

Keyboard shortcuts

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