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 { CreateTodo func(childComplexity int, input model.NewTodo) int CreateUser func(childComplexity int, input model.NewUser) int DeleteTodo func(childComplexity int, id string) int DeleteUser func(childComplexity int, id string) int UpdateTodo func(childComplexity int, id string, text string, done bool) int } Query struct { AllTodos func(childComplexity int, last *int) int AllUsers func(childComplexity int, last *int) int Todo func(childComplexity int, id int) int TodosByStatus func(childComplexity int, status *bool) int User func(childComplexity int, id int) int } Todo struct { Done func(childComplexity int) int ID func(childComplexity int) int Owner func(childComplexity int) int Text func(childComplexity int) int } User struct { Gender func(childComplexity int) int ID func(childComplexity int) int Name 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 { CreateTodo(ctx context.Context, input model.NewTodo) (*model.Todo, error) UpdateTodo(ctx context.Context, id string, text string, done bool) (*model.Todo, error) DeleteTodo(ctx context.Context, id string) (*model.Todo, error) CreateUser(ctx context.Context, input model.NewUser) (*model.User, error) DeleteUser(ctx context.Context, id string) (*model.User, error) }
type QueryResolver ¶
type QueryResolver interface { AllTodos(ctx context.Context, last *int) ([]*model.Todo, error) Todo(ctx context.Context, id int) (*model.Todo, error) TodosByStatus(ctx context.Context, status *bool) ([]*model.Todo, error) AllUsers(ctx context.Context, last *int) ([]*model.User, error) User(ctx context.Context, id int) (*model.User, error) }
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver Todo() TodoResolver }
Click to show internal directories.
Click to hide internal directories.