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 { LoginUser func(childComplexity int, input *schemas.LoginUser) int RegisterUser func(childComplexity int, input schemas.RegisterUser) int } Query struct { User func(childComplexity int, id string) int Users func(childComplexity int) int } User struct { CreatedAt func(childComplexity int) int Email func(childComplexity int) int ID func(childComplexity int) int UpdatedAt 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 ¶
type Resolver struct {
UseCases interfaces.UseCases
}
Resolver
This file will not be regenerated automatically. It serves as dependency injection for your app, add any dependencies you require here.
https://stackoverflow.com/questions/62348857/unit-testing-graphql-in-golang
func (*Resolver) Mutation ¶
func (r *Resolver) Mutation() MutationResolver
Mutation returns MutationResolver implementation.
func (*Resolver) Query ¶
func (r *Resolver) Query() QueryResolver
Query returns QueryResolver implementation.
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver }
Click to show internal directories.
Click to hide internal directories.