generated

package
v0.0.1-alpha-1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2022 License: BSD-3-Clause Imports: 12 Imported by: 0

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 {
		CookRecipe   func(childComplexity int, id string) int
		CreateRecipe func(childComplexity int, input model.NewRecipe) int
		DeleteRecipe func(childComplexity int, id string) int
		PlanRecipe   func(childComplexity int, id string) int
		UnPlanRecipe func(childComplexity int, id string) int
		UpdateRecipe func(childComplexity int, input *model.UpdateRecipe) int
	}

	Query struct {
		Recipes func(childComplexity int) int
	}

	Recipe struct {
		ID      func(childComplexity int) int
		Name    func(childComplexity int) int
		Planned func(childComplexity int) int
	}

	Result struct {
		Status func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
	Validation func(ctx context.Context, obj interface{}, next graphql.Resolver, constraint string) (res interface{}, err error)
}

type MutationResolver

type MutationResolver interface {
	CreateRecipe(ctx context.Context, input model.NewRecipe) (*model.Recipe, error)
	UpdateRecipe(ctx context.Context, input *model.UpdateRecipe) (*model.Result, error)
	DeleteRecipe(ctx context.Context, id string) (*model.Result, error)
	PlanRecipe(ctx context.Context, id string) (*model.Result, error)
	UnPlanRecipe(ctx context.Context, id string) (*model.Result, error)
	CookRecipe(ctx context.Context, id string) (*model.Result, error)
}

type QueryResolver

type QueryResolver interface {
	Recipes(ctx context.Context) ([]*model.Recipe, error)
}

type ResolverRoot

type ResolverRoot interface {
	Mutation() MutationResolver
	Query() QueryResolver
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL