graph

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 13 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 {
	Output struct {
		Input func(childComplexity int) int
	}

	OutputNillable struct {
		Input func(childComplexity int) int
	}

	Query struct {
		ReturnScalar           func(childComplexity int, input bool) int
		ReturnScalarNillable   func(childComplexity int, input *bool) int
		Simple                 func(childComplexity int) int
		SimpleArgument         func(childComplexity int, input string) int
		SimpleArgumentNillable func(childComplexity int, input *string) int
		SimpleNillable         func(childComplexity int) int
	}
}

type Config

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

type DirectiveRoot

type DirectiveRoot struct {
}

type QueryResolver

type QueryResolver interface {
	Simple(ctx context.Context) (*model.Output, error)
	SimpleNillable(ctx context.Context) (*model.Output, error)
	SimpleArgument(ctx context.Context, input string) (*model.Output, error)
	SimpleArgumentNillable(ctx context.Context, input *string) (*model.OutputNillable, error)
	ReturnScalar(ctx context.Context, input bool) (bool, error)
	ReturnScalarNillable(ctx context.Context, input *bool) (*bool, error)
}

type Resolver

type Resolver struct{}

func (*Resolver) Query

func (r *Resolver) Query() QueryResolver

Query returns QueryResolver implementation.

type ResolverRoot

type ResolverRoot interface {
	Query() QueryResolver
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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