Help us shape the future of Go! Take the 2026 Go Developer Survey

generated

package
v0.17.97 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 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 {
	Query struct {
		EchoInt64InputToInt64Object func(childComplexity int, input Input64) int
		EchoInt64ToInt64            func(childComplexity int, n *int) int
		EchoIntInputToIntObject     func(childComplexity int, input Input) int
		EchoIntToInt                func(childComplexity int, n *int) int
	}

	Result struct {
		N func(childComplexity int) int
	}

	Result64 struct {
		N func(childComplexity int) int
	}
}

type DirectiveRoot

type DirectiveRoot struct {
}

type Input

type Input struct {
	N *int `json:"n,omitempty"`
}

func UnmarshalInput added in v0.17.96

func UnmarshalInput(ctx context.Context, raw any) (Input, error)

UnmarshalInput unmarshals raw into the Input input type, using the unmarshaler bound to ctx's request. Call it from a resolver to decode an input object that was not passed as a field argument.

ctx must come from a gqlgen request; outside one there is no unmarshaler to use and the returned error says so.

type Input64

type Input64 struct {
	N *int `json:"n,omitempty"`
}

func UnmarshalInput64 added in v0.17.96

func UnmarshalInput64(ctx context.Context, raw any) (Input64, error)

UnmarshalInput64 unmarshals raw into the Input64 input type, using the unmarshaler bound to ctx's request. Call it from a resolver to decode an input object that was not passed as a field argument.

ctx must come from a gqlgen request; outside one there is no unmarshaler to use and the returned error says so.

type Query

type Query struct {
}

type QueryResolver

type QueryResolver interface {
	EchoIntToInt(ctx context.Context, n *int) (int, error)
	EchoInt64ToInt64(ctx context.Context, n *int) (int, error)
	EchoIntInputToIntObject(ctx context.Context, input Input) (*Result, error)
	EchoInt64InputToInt64Object(ctx context.Context, input Input64) (*Result64, 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
}

type Result

type Result struct {
	N int `json:"n"`
}

type Result64

type Result64 struct {
	N int `json:"n"`
}

type Stub

type Stub struct {
	QueryResolver struct {
		EchoIntToInt                func(ctx context.Context, n *int) (int, error)
		EchoInt64ToInt64            func(ctx context.Context, n *int) (int, error)
		EchoIntInputToIntObject     func(ctx context.Context, input Input) (*Result, error)
		EchoInt64InputToInt64Object func(ctx context.Context, input Input64) (*Result64, error)
	}
}

func (*Stub) Query

func (r *Stub) Query() QueryResolver

Jump to

Keyboard shortcuts

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