selected

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: 11 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 DefaultMaxSelections = 100_000

DefaultMaxSelections bounds the number of selections processed while flattening one operation. Fragment spreads are expanded by value, so a chain of fragments can otherwise grow exponentially with document size.

Variables

View Source
var ErrTooManySelections = stderrors.New("too many selections")

ErrTooManySelections is wrapped by the error returned when an operation expands to more selections than allowed.

Functions

func HasAsyncSel

func HasAsyncSel(sels []Selection) bool

Types

type Request

type Request struct {
	Schema             *ast.Schema
	Doc                *ast.ExecutableDefinition
	Vars               map[string]any
	Mu                 sync.Mutex
	Errs               []*errors.QueryError
	AllowIntrospection bool

	// MaxSelections caps the number of selections processed while flattening
	// the operation. Zero or a negative value means DefaultMaxSelections.
	MaxSelections int
	// contains filtered or unexported fields
}

func (*Request) AddError

func (r *Request) AddError(err *errors.QueryError)

type SchemaField

type SchemaField struct {
	resolvable.Field
	Alias       string
	Loc         errors.Location
	Args        map[string]any
	PackedArgs  reflect.Value
	Sels        []Selection
	Async       bool
	FixedResult reflect.Value
}

func (*SchemaField) Resolve added in v1.6.0

func (f *SchemaField) Resolve(ctx context.Context, resolver reflect.Value) (reflect.Value, error)

type Selection

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

func ApplyOperation

func ApplyOperation(r *Request, s *resolvable.Schema, op *ast.OperationDefinition) (sels []Selection, err *errors.QueryError)

type TypeAssertion

type TypeAssertion struct {
	resolvable.TypeAssertion
	Sels []Selection
}

type TypenameField

type TypenameField struct {
	resolvable.Object
	Alias string
}

Jump to

Keyboard shortcuts

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