Errors defined for retained code that we want to stick around between generations.
var ( ErrResolvingHelloWithErrorsByName = errors.New("error resolving HelloWithErrorsByName") ErrEmptyKeyResolvingHelloWithErrorsByName = errors.New("error (empty key) resolving HelloWithErrorsByName") )
var ( ErrUnknownType = errors.New("unknown type") ErrTypeNotFound = errors.New("type not found") )
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
type ComplexityRoot struct { Entity struct { FindHelloByName func(childComplexity int, name string) int FindHelloMultiSingleKeysByKey1AndKey2 func(childComplexity int, key1 string, key2 string) int FindHelloWithErrorsByName func(childComplexity int, name string) int FindManyMultiHelloByNames func(childComplexity int, reps []*model.MultiHelloByNamesInput) int FindManyMultiHelloMultipleRequiresByNames func(childComplexity int, reps []*model.MultiHelloMultipleRequiresByNamesInput) int FindManyMultiHelloRequiresByNames func(childComplexity int, reps []*model.MultiHelloRequiresByNamesInput) int FindManyMultiHelloWithErrorByNames func(childComplexity int, reps []*model.MultiHelloWithErrorByNamesInput) int FindManyMultiPlanetRequiresNestedByNames func(childComplexity int, reps []*model.MultiPlanetRequiresNestedByNamesInput) int FindPlanetMultipleRequiresByName func(childComplexity int, name string) int FindPlanetRequiresByName func(childComplexity int, name string) int FindPlanetRequiresNestedByName func(childComplexity int, name string) int FindWorldByHelloNameAndFoo func(childComplexity int, helloName string, foo string) int FindWorldNameByName func(childComplexity int, name string) int FindWorldWithMultipleKeysByBar func(childComplexity int, bar int) int FindWorldWithMultipleKeysByHelloNameAndFoo func(childComplexity int, helloName string, foo string) int } Hello struct { Name func(childComplexity int) int Secondary func(childComplexity int) int } HelloMultiSingleKeys struct { Key1 func(childComplexity int) int Key2 func(childComplexity int) int } HelloWithErrors struct { Name func(childComplexity int) int } MultiHello struct { Name func(childComplexity int) int } MultiHelloMultipleRequires struct { Key1 func(childComplexity int) int Key2 func(childComplexity int) int Key3 func(childComplexity int) int Name func(childComplexity int) int } MultiHelloRequires struct { Key1 func(childComplexity int) int Key2 func(childComplexity int) int Name func(childComplexity int) int } MultiHelloWithError struct { Name func(childComplexity int) int } MultiPlanetRequiresNested struct { Name func(childComplexity int) int Size func(childComplexity int) int World func(childComplexity int) int } PlanetMultipleRequires struct { Density func(childComplexity int) int Diameter func(childComplexity int) int Name func(childComplexity int) int Weight func(childComplexity int) int } PlanetRequires struct { Diameter func(childComplexity int) int Name func(childComplexity int) int Size func(childComplexity int) int } PlanetRequiresNested struct { Name func(childComplexity int) int Size func(childComplexity int) int World func(childComplexity int) int } Query struct { // contains filtered or unexported fields } World struct { Bar func(childComplexity int) int Foo func(childComplexity int) int Hello func(childComplexity int) int } WorldName struct { Name func(childComplexity int) int } WorldWithMultipleKeys struct { Bar func(childComplexity int) int Foo func(childComplexity int) int Hello func(childComplexity int) int } // contains filtered or unexported fields }
type Config struct { Schema *ast.Schema Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot struct { EntityResolver func(ctx context.Context, obj interface{}, next graphql.Resolver, multi *bool) (res interface{}, err error) }
type EntityResolver interface { FindHelloByName(ctx context.Context, name string) (*model.Hello, error) FindHelloMultiSingleKeysByKey1AndKey2(ctx context.Context, key1 string, key2 string) (*model.HelloMultiSingleKeys, error) FindHelloWithErrorsByName(ctx context.Context, name string) (*model.HelloWithErrors, error) FindManyMultiHelloByNames(ctx context.Context, reps []*model.MultiHelloByNamesInput) ([]*model.MultiHello, error) FindManyMultiHelloMultipleRequiresByNames(ctx context.Context, reps []*model.MultiHelloMultipleRequiresByNamesInput) ([]*model.MultiHelloMultipleRequires, error) FindManyMultiHelloRequiresByNames(ctx context.Context, reps []*model.MultiHelloRequiresByNamesInput) ([]*model.MultiHelloRequires, error) FindManyMultiHelloWithErrorByNames(ctx context.Context, reps []*model.MultiHelloWithErrorByNamesInput) ([]*model.MultiHelloWithError, error) FindManyMultiPlanetRequiresNestedByNames(ctx context.Context, reps []*model.MultiPlanetRequiresNestedByNamesInput) ([]*model.MultiPlanetRequiresNested, error) FindPlanetMultipleRequiresByName(ctx context.Context, name string) (*model.PlanetMultipleRequires, error) FindPlanetRequiresByName(ctx context.Context, name string) (*model.PlanetRequires, error) FindPlanetRequiresNestedByName(ctx context.Context, name string) (*model.PlanetRequiresNested, error) FindWorldByHelloNameAndFoo(ctx context.Context, helloName string, foo string) (*model.World, error) FindWorldNameByName(ctx context.Context, name string) (*model.WorldName, error) FindWorldWithMultipleKeysByHelloNameAndFoo(ctx context.Context, helloName string, foo string) (*model.WorldWithMultipleKeys, error) FindWorldWithMultipleKeysByBar(ctx context.Context, bar int) (*model.WorldWithMultipleKeys, error) }
type ResolverRoot interface { Entity() EntityResolver }