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 { Global struct { Currency func(childComplexity int) int Vat func(childComplexity int) int } LoginSuccess struct { Message func(childComplexity int) int Success func(childComplexity int) int User func(childComplexity int) int } Mutation struct { Category func(childComplexity int, id *string, name *string) int Login func(childComplexity int, credentials *model.Login) int Logout func(childComplexity int) int Product func(childComplexity int, id *string, product *model.ProductInput) int Register func(childComplexity int, accountData *model.UserRegistration) int } Product struct { Category func(childComplexity int) int CreatedAt func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int Price func(childComplexity int) int Properties func(childComplexity int) int } ProductCreationSuccess struct { Message func(childComplexity int) int Product func(childComplexity int) int Success func(childComplexity int) int } ProductProperty struct { ID func(childComplexity int) int Name func(childComplexity int) int Value func(childComplexity int) int } Query struct { Category func(childComplexity int) int Global func(childComplexity int) int Product func(childComplexity int, category *string) int } RegistrationSuccess struct { Message func(childComplexity int) int Success func(childComplexity int) int } Success struct { Message func(childComplexity int) int Success func(childComplexity int) int } User struct { FirstName func(childComplexity int) int LastName func(childComplexity int) int Mail func(childComplexity int) int Phone func(childComplexity int) int Username func(childComplexity int) int } }
type Config ¶
type Config struct { Schema *ast.Schema Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type MutationResolver ¶
type MutationResolver interface { Login(ctx context.Context, credentials *model.Login) (*model.LoginSuccess, error) Register(ctx context.Context, accountData *model.UserRegistration) (*model.RegistrationSuccess, error) Logout(ctx context.Context) (*model.Success, error) Category(ctx context.Context, id *string, name *string) (*model.Success, error) Product(ctx context.Context, id *string, product *model.ProductInput) (*model.ProductCreationSuccess, 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.
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver }
Click to show internal directories.
Click to hide internal directories.