Documentation ¶
Overview ¶
YetAnotherToDoList Copyright © 2023 gilex-dev gilex-dev@proton.me
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
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, changes model.UpdateTodo) int UpdateUser func(childComplexity int, id string, changes model.UpdateUser) int } Query struct { Todo func(childComplexity int, id string) int Todos func(childComplexity int) int User func(childComplexity int, id string) int Users func(childComplexity int) int } Todo struct { Done func(childComplexity int) int ID func(childComplexity int) int Text func(childComplexity int) int User func(childComplexity int) int } User struct { FullName func(childComplexity int) int ID func(childComplexity int) int Todos func(childComplexity int) int UserName 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 { CreateUser(ctx context.Context, input model.NewUser) (*model.User, error) CreateTodo(ctx context.Context, input model.NewTodo) (*model.Todo, error) UpdateTodo(ctx context.Context, id string, changes model.UpdateTodo) (*model.Todo, error) UpdateUser(ctx context.Context, id string, changes model.UpdateUser) (*model.User, error) DeleteUser(ctx context.Context, id string) (*string, error) DeleteTodo(ctx context.Context, id string) (*string, error) }
type QueryResolver ¶
type Resolver ¶
type Resolver struct { }
func (*Resolver) Mutation ¶
func (r *Resolver) Mutation() MutationResolver
Mutation returns MutationResolver implementation.
func (*Resolver) Query ¶
func (r *Resolver) Query() QueryResolver
Query returns QueryResolver implementation.
func (*Resolver) Todo ¶
func (r *Resolver) Todo() TodoResolver
Todo returns TodoResolver implementation.
func (*Resolver) User ¶
func (r *Resolver) User() UserResolver
User returns UserResolver implementation.
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver Todo() TodoResolver User() UserResolver }