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 { Category struct { ID func(childComplexity int) int Name func(childComplexity int) int } Mutation struct { CompleteTodo func(childComplexity int, id string) int CompleteTodos func(childComplexity int, ids []string) int CreateTodo func(childComplexity int, input model.NewTodoInput) int DeleteTodo func(childComplexity int, id string) int DeleteTodoByUser func(childComplexity int, userID string) int UpdateTodo func(childComplexity int, input model.UpdateTodoInput) int } OverlappingFields struct { Foo func(childComplexity int) int NewFoo func(childComplexity int) int OldFoo func(childComplexity int) int } Query struct { Overlapping func(childComplexity int) int Todo func(childComplexity int, id string, name *string, tmp *int) int Todos func(childComplexity int, ids []string, userID *string, types []*model.TodoType, text *string, text2 []*string, done *bool, done2 []bool, pageOffset *int, pageSize *int) int } Todo struct { Categories func(childComplexity int) int Done func(childComplexity int) int ID func(childComplexity int) int Text func(childComplexity int) int Type func(childComplexity int) int User func(childComplexity int) int } User struct { ID func(childComplexity int) int Name func(childComplexity int) int Role func(childComplexity int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type DirectiveRoot struct { HasRole func(ctx context.Context, obj interface{}, next graphql.Resolver, role model.Role) (res interface{}, err error) Hide func(ctx context.Context, obj interface{}, next graphql.Resolver, forArg []string) (res interface{}, err error) Http func(ctx context.Context, obj interface{}, next graphql.Resolver, url string, method *string) (res interface{}, err error) Preview func(ctx context.Context, obj interface{}, next graphql.Resolver, toggledBy string) (res interface{}, err error) }
type MutationResolver ¶
type MutationResolver interface { CreateTodo(ctx context.Context, input model.NewTodoInput) (*model.Todo, error) UpdateTodo(ctx context.Context, input model.UpdateTodoInput) (*model.Todo, error) CompleteTodo(ctx context.Context, id string) (*model.Todo, error) CompleteTodos(ctx context.Context, ids []string) ([]*model.Todo, error) DeleteTodo(ctx context.Context, id string) (bool, error) DeleteTodoByUser(ctx context.Context, userID string) (bool, error) }
type QueryResolver ¶
type QueryResolver interface { Overlapping(ctx context.Context) (*model.OverlappingFields, error) Todo(ctx context.Context, id string, name *string, tmp *int) (*model.Todo, error) Todos(ctx context.Context, ids []string, userID *string, types []*model.TodoType, text *string, text2 []*string, done *bool, done2 []bool, pageOffset *int, pageSize *int) ([]*model.Todo, error) }
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver OverlappingFields() OverlappingFieldsResolver Query() QueryResolver Todo() TodoResolver }
Click to show internal directories.
Click to hide internal directories.