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 { CookRecipe func(childComplexity int, id string) int CreateRecipe func(childComplexity int, input model.NewRecipe) int DeleteRecipe func(childComplexity int, id string) int PlanRecipe func(childComplexity int, id string) int UnPlanRecipe func(childComplexity int, id string) int UpdateRecipe func(childComplexity int, input *model.UpdateRecipe) int } Query struct { Recipes func(childComplexity int) int } Recipe struct { ID func(childComplexity int) int Name func(childComplexity int) int Planned func(childComplexity int) int } Result struct { Status func(childComplexity int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type MutationResolver ¶
type MutationResolver interface { CreateRecipe(ctx context.Context, input model.NewRecipe) (*model.Recipe, error) UpdateRecipe(ctx context.Context, input *model.UpdateRecipe) (*model.Result, error) DeleteRecipe(ctx context.Context, id string) (*model.Result, error) PlanRecipe(ctx context.Context, id string) (*model.Result, error) UnPlanRecipe(ctx context.Context, id string) (*model.Result, error) CookRecipe(ctx context.Context, id string) (*model.Result, error) }
type QueryResolver ¶
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver }
Click to show internal directories.
Click to hide internal directories.