generated

package
v0.0.0-...-a656574 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT 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 {
	Item struct {
		ID     func(childComplexity int) int
		Owner  func(childComplexity int) int
		Rating func(childComplexity int) int
		Title  func(childComplexity int) int
	}

	Mutation struct {
		CreateItems func(childComplexity int, input model.NewItem) int
		Delete      func(childComplexity int, id int) int
	}

	Query struct {
		Item  func(childComplexity int, id int) int
		Items 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 {
	CreateItems(ctx context.Context, input model.NewItem) (*model.Item, error)
	Delete(ctx context.Context, id int) (string, error)
}

type QueryResolver

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