graphql

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: MIT Imports: 22 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
		TodoAdd  func(childComplexity int, user string, task string) int
		TodoDone func(childComplexity int, todo string, done bool) int
	}

	Query struct {
		Flamingo func(childComplexity int) int
		User     func(childComplexity int, id string) int
	}

	Todo struct {
		Done func(childComplexity int) int
		ID   func(childComplexity int) int
		Task func(childComplexity int) int
	}

	User struct {
		Attributes func(childComplexity int) int
		Name       func(childComplexity int) int
		Nicknames  func(childComplexity int) int
		Todos      func(childComplexity int) int
	}

	User_Attributes struct {
		Get  func(childComplexity int, key string) int
		Keys func(childComplexity int) int
	}
}

type Config

type Config struct {
	Schema     *ast.Schema
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

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

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)
	TodoAdd(ctx context.Context, user string, task string) (*domain.Todo, error)
	TodoDone(ctx context.Context, todo string, done bool) (*domain.Todo, error)
}

type QueryResolver

type QueryResolver interface {
	Flamingo(ctx context.Context) (*string, error)
	User(ctx context.Context, id string) (*domain1.User, error)
}

type ResolverRoot

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

type UserResolver

type UserResolver interface {
	Todos(ctx context.Context, obj *domain1.User) ([]*domain.Todo, error)
}

Jump to

Keyboard shortcuts

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