Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnknownType = errors.New("unknown type") ErrTypeNotFound = errors.New("type not found") )
Functions ¶
func NewExecutableSchema ¶
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
Types ¶
type ComplexityRoot ¶
type ComplexityRoot struct { Employee struct { FieldThrowsError func(childComplexity int) int ID func(childComplexity int) int } Entity struct { FindEmployeeByID func(childComplexity int, id int) int } Query struct { Delay func(childComplexity int, response string, ms int) int HeaderValue func(childComplexity int, name string) int InitPayloadValue func(childComplexity int, key string) int InitialPayload func(childComplexity int) int // contains filtered or unexported fields } Subscription struct { HeaderValue func(childComplexity int, name string, repeat *int) int InitPayloadValue func(childComplexity int, key string, repeat *int) int InitialPayload func(childComplexity int, repeat *int) int ReturnsError func(childComplexity int) int } TimestampedString struct { InitialPayload func(childComplexity int) int Seq func(childComplexity int) int Total func(childComplexity int) int UnixTime func(childComplexity int) int Value func(childComplexity int) int } // contains filtered or unexported fields }
type Config ¶
type Config struct { Schema *ast.Schema Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type DirectiveRoot struct { }
type EntityResolver ¶
type QueryResolver ¶
type ResolverRoot ¶
type ResolverRoot interface { Entity() EntityResolver Query() QueryResolver Subscription() SubscriptionResolver }
type SubscriptionResolver ¶
type SubscriptionResolver interface { HeaderValue(ctx context.Context, name string, repeat *int) (<-chan *model.TimestampedString, error) InitPayloadValue(ctx context.Context, key string, repeat *int) (<-chan *model.TimestampedString, error) InitialPayload(ctx context.Context, repeat *int) (<-chan map[string]interface{}, error) ReturnsError(ctx context.Context) (<-chan *string, error) }
Click to show internal directories.
Click to hide internal directories.