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 { Comment struct { Content func(childComplexity int) int CreatedAt func(childComplexity int) int ID func(childComplexity int) int ParentID func(childComplexity int) int PostID func(childComplexity int) int Replies func(childComplexity int, limit *int, offset *int) int UpdatedAt func(childComplexity int) int } Mutation struct { CreateComment func(childComplexity int, postID int, parentID *int, content string) int CreatePost func(childComplexity int, title string, content string, allow bool) int } Post struct { AllowComments func(childComplexity int) int Comments func(childComplexity int) int Content func(childComplexity int) int CreatedAt func(childComplexity int) int ID func(childComplexity int) int Title func(childComplexity int) int UpdatedAt func(childComplexity int) int } Query struct { Comments func(childComplexity int, postID int, limit *int, offset *int) int Post func(childComplexity int, id int) int Posts func(childComplexity int) int } }
type Config ¶
type Config struct { Schema *ast.Schema Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type DirectiveRoot struct { }
type MutationResolver ¶
type QueryResolver ¶
type Resolver ¶
func (*Resolver) Mutation ¶
func (r *Resolver) Mutation() MutationResolver
func (*Resolver) Query ¶
func (r *Resolver) Query() QueryResolver
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver }
Click to show internal directories.
Click to hide internal directories.