generated

package
v0.0.0-...-771c5e5 Latest Latest
Warning

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

Go to latest
Published: May 1, 2022 License: MIT 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 {
		TodoComplete   func(childComplexity int, id string) int
		TodoCreate     func(childComplexity int, input model.TodoCreateInput) int
		TodoDelete     func(childComplexity int, id string) int
		TodoUncomplete func(childComplexity int, id string) int
		TodoUpdateText func(childComplexity int, id string, text string) int
	}

	Output struct {
		ID func(childComplexity int) int
	}

	Query struct {
		Todos func(childComplexity int) int
	}

	Todo struct {
		Done func(childComplexity int) int
		ID   func(childComplexity int) int
		Text 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 {
	TodoCreate(ctx context.Context, input model.TodoCreateInput) (*model.Output, error)
	TodoUpdateText(ctx context.Context, id string, text string) (*model.Output, error)
	TodoComplete(ctx context.Context, id string) (*model.Output, error)
	TodoUncomplete(ctx context.Context, id string) (*model.Output, error)
	TodoDelete(ctx context.Context, id string) (*model.Output, error)
}

type QueryResolver

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