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 { CreateReview func(childComplexity int, review *ReviewInput) int } Query struct { Review func(childComplexity int, id int) int } Review struct { ArtID func(childComplexity int) int ReviewID func(childComplexity int) int Text func(childComplexity int) int Timestamp func(childComplexity int) int Upvotes func(childComplexity int) int UserID 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 {
CreateReview(ctx context.Context, review *ReviewInput) (*Review, error)
}
type QueryResolver ¶
type Resolver ¶
Resolver is the resolver that handles graphql request
func (*Resolver) Mutation ¶
func (r *Resolver) Mutation() MutationResolver
Mutation returns a query resolver
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver }
Click to show internal directories.
Click to hide internal directories.