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 { CreateThought func(childComplexity int, input model.NewThought) int DeleteThought func(childComplexity int, id int, userID int) int UpdateThought func(childComplexity int, id int, userID int, input model.NewThought) int } Query struct { Thought func(childComplexity int, id int) int Thoughts func(childComplexity int) int } Thought struct { Body func(childComplexity int) int ID func(childComplexity int) int ImageURL func(childComplexity int) int Title func(childComplexity int) int User func(childComplexity int) int } User struct { Email func(childComplexity int) int ID func(childComplexity int) int Name 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 { CreateThought(ctx context.Context, input model.NewThought) (*model.Thought, error) UpdateThought(ctx context.Context, id int, userID int, input model.NewThought) (*model.Thought, error) DeleteThought(ctx context.Context, id int, userID int) (*model.Thought, error) }
type QueryResolver ¶
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver Thought() ThoughtResolver }
Click to show internal directories.
Click to hide internal directories.