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

returnpointersinunmarshalinput

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: 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 {
}

type DirectiveRoot

type DirectiveRoot struct {
}

type LegacyFilters

type LegacyFilters struct {
	Name *string `json:"name,omitempty"`
}

func UnmarshalLegacyFilters

func UnmarshalLegacyFilters(ctx context.Context, raw any) (*LegacyFilters, error)

UnmarshalLegacyFilters unmarshals raw into the LegacyFilters 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 {
	Search(ctx context.Context, filters SearchFilters) (string, error)
	Legacy(ctx context.Context, filters LegacyFilters) (string, 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 SearchFilters

type SearchFilters struct {
	Name  *string `json:"name,omitempty"`
	Limit *int    `json:"limit,omitempty"`
}

func UnmarshalSearchFilters

func UnmarshalSearchFilters(ctx context.Context, raw any) (*SearchFilters, error)

UnmarshalSearchFilters unmarshals raw into the SearchFilters 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 Stub

type Stub struct {
	QueryResolver struct {
		Search func(ctx context.Context, filters SearchFilters) (string, error)
		Legacy func(ctx context.Context, filters LegacyFilters) (string, 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