Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AllRole = []Role{ RoleAdmin, RoleOwner, }
Functions ¶
func NewExecutableSchema ¶
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
Types ¶
type ComplexityRoot ¶
type ComplexityRoot struct { MyMutation struct { CreateTodo func(childComplexity int, todo TodoInput) int UpdateTodo func(childComplexity int, id int, changes map[string]interface{}) int } MyQuery struct { LastTodo func(childComplexity int) int Todo func(childComplexity int, id int) int Todos func(childComplexity int) int } Todo struct { Done func(childComplexity int) int ID func(childComplexity int) int Text func(childComplexity int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type MutationResolver ¶
type MutationResolver resolvers
func (*MutationResolver) CreateTodo ¶
func (*MutationResolver) UpdateTodo ¶
type MyMutationResolver ¶
type MyQueryResolver ¶
type QueryResolver ¶
type QueryResolver resolvers
func (*QueryResolver) LastTodo ¶
func (r *QueryResolver) LastTodo(ctx context.Context) (*Todo, error)
type ResolverRoot ¶
type ResolverRoot interface { MyMutation() MyMutationResolver MyQuery() MyQueryResolver }
Click to show internal directories.
Click to hide internal directories.