resolvable

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: BSD-2-Clause Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	Query        = "Query"
	Mutation     = "Mutation"
	Subscription = "Subscription"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field struct {
	ast.FieldDefinition
	TypeName        string
	MethodIndex     int
	FieldIndex      []int
	HasContext      bool
	HasError        bool
	IsFieldFunc     bool
	ArgsPacker      *packer.StructPacker
	ValueExec       Resolvable
	OutputType      reflect.Type
	Implementations []*FieldImplementation
	TraceLabel      string
}

func (*Field) Resolve added in v1.6.0

func (f *Field) Resolve(ctx context.Context, resolver reflect.Value, args map[string]any, packedArgs reflect.Value) (reflect.Value, error)

func (*Field) UseMethodResolver

func (f *Field) UseMethodResolver() bool

type FieldImplementation added in v1.10.0

type FieldImplementation struct {
	MethodIndex int
	Field       *Field
}

type List

type List struct {
	Elem Resolvable
}

type Meta

type Meta struct {
	FieldSchema   Field
	FieldType     Field
	FieldTypename Field
	FieldService  Field
	Schema        *Object
	Type          *Object
	Service       *Object
}

Meta defines the details of the metadata schema for introspection.

type Object

type Object struct {
	Name           string
	Fields         map[string]*Field
	TypeAssertions map[string]*TypeAssertion
	Interfaces     map[string]struct{}
}

type Resolvable

type Resolvable interface {
	// contains filtered or unexported methods
}

type Scalar

type Scalar struct{}

type Schema

type Schema struct {
	*Meta
	ast.Schema
	Query                Resolvable
	Mutation             Resolvable
	Subscription         Resolvable
	QueryResolver        reflect.Value
	MutationResolver     reflect.Value
	SubscriptionResolver reflect.Value
}

func ApplyResolver

func ApplyResolver(s *ast.Schema, resolver any, useFieldResolvers bool) (*Schema, error)

type TypeAssertion

type TypeAssertion struct {
	MethodIndex int
	TypeExec    Resolvable
}

Jump to

Keyboard shortcuts

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