graphql

package
v0.0.0-...-e3bdef5 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2022 License: MIT Imports: 19 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 {
		Flamingo   func(childComplexity int) int
		SetCatched func(childComplexity int, id int, catched bool) int
	}

	Pokemon struct {
		Catched func(childComplexity int) int
		ID      func(childComplexity int) int
		Name    func(childComplexity int) int
		Type    func(childComplexity int) int
	}

	Query struct {
		Flamingo     func(childComplexity int) int
		Pokemon      func(childComplexity int, ids []int, catched *bool) int
		Total        func(childComplexity int) int
		TotalCatched func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type Module

type Module struct{}

Module is an autogenerated dingo Module to bind the root resolver

func (*Module) Configure

func (*Module) Configure(injector *dingo.Injector)

Configure sets the graphql.ExecutableSchema binding via a provider, passing in the correct root resolver

type MutationResolver

type MutationResolver interface {
	Flamingo(ctx context.Context) (*string, error)
	SetCatched(ctx context.Context, id int, catched bool) (int, error)
}

type QueryResolver

type QueryResolver interface {
	Flamingo(ctx context.Context) (*string, error)
	Pokemon(ctx context.Context, ids []int, catched *bool) ([]*pokedex.Pokemon, error)
	Total(ctx context.Context) (int, error)
	TotalCatched(ctx context.Context) (int, 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