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 { TodoComplete func(childComplexity int, id string) int TodoCreate func(childComplexity int, input model.TodoCreateInput) int TodoDelete func(childComplexity int, id string) int TodoUncomplete func(childComplexity int, id string) int TodoUpdateText func(childComplexity int, id string, text string) int } Output struct { ID func(childComplexity int) int } Query struct { Todos func(childComplexity int) int } Todo struct { Done func(childComplexity int) int ID func(childComplexity int) int Text func(childComplexity int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type DirectiveRoot struct { }
type MutationResolver ¶
type MutationResolver interface { TodoCreate(ctx context.Context, input model.TodoCreateInput) (*model.Output, error) TodoUpdateText(ctx context.Context, id string, text string) (*model.Output, error) TodoComplete(ctx context.Context, id string) (*model.Output, error) TodoUncomplete(ctx context.Context, id string) (*model.Output, error) TodoDelete(ctx context.Context, id string) (*model.Output, error) }
type QueryResolver ¶
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver }
Click to show internal directories.
Click to hide internal directories.