generated

package
v0.0.0-...-abe1317 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2020 License: Apache-2.0 Imports: 11 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 {
		CreateProduct func(childComplexity int, input model.NewProduct) int
		DeleteProduct func(childComplexity int, productID int) int
		UpdateProduct func(childComplexity int, productID int, input model.NewProduct) int
	}

	Product struct {
		ID    func(childComplexity int) int
		Name  func(childComplexity int) int
		Price func(childComplexity int) int
	}

	Query struct {
		Product  func(childComplexity int) int
		Products 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 {
	CreateProduct(ctx context.Context, input model.NewProduct) (*model.Product, error)
	UpdateProduct(ctx context.Context, productID int, input model.NewProduct) (*model.Product, error)
	DeleteProduct(ctx context.Context, productID int) (bool, error)
}

type QueryResolver

type QueryResolver interface {
	Products(ctx context.Context) ([]*model.Product, error)
	Product(ctx context.Context) (*model.Product, 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