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 ¶
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 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
}
Click to show internal directories.
Click to hide internal directories.