Documentation

ValidationContext extends ASTValidationContext
in package

An instance of this class is passed as the "this" context to all validators, allowing access to commonly useful contextual information from within a validation rule.

Table of Contents

$ast  : DocumentNode
$errors  : array<string|int, Error>
$schema  : Schema
$fragments  : array<string|int, FragmentDefinitionNode>
$fragmentSpreads  : SplObjectStorage
$recursivelyReferencedFragments  : SplObjectStorage
$recursiveVariableUsages  : SplObjectStorage
$typeInfo  : TypeInfo
$variableUsages  : SplObjectStorage
__construct()  : mixed
getArgument()  : mixed
getDirective()  : mixed
getDocument()  : DocumentNode
getErrors()  : array<string|int, Error>
getFieldDef()  : FieldDefinition
getFragment()  : FragmentDefinitionNode|null
getFragmentSpreads()  : array<string|int, FragmentSpreadNode>
getInputType()  : InputType|null
getParentInputType()  : (\GraphQL\Type\Definition\Type&\GraphQL\Type\Definition\InputType)|null
getParentType()  : CompositeType|null
getRecursivelyReferencedFragments()  : array<string|int, FragmentDefinitionNode>
getRecursiveVariableUsages()  : array<string|int, array<string|int, mixed>>
getSchema()  : Schema|null
getType()  : OutputType|null
reportError()  : mixed
getVariableUsages()  : array<string|int, array<string|int, mixed>>

Properties

$recursivelyReferencedFragments

private SplObjectStorage $recursivelyReferencedFragments

Methods

getFieldDef()

public getFieldDef() : FieldDefinition
Return values
FieldDefinition

getParentInputType()

public getParentInputType() : (\GraphQL\Type\Definition\Type&\GraphQL\Type\Definition\InputType)|null
Return values
(\GraphQL\Type\Definition\Type&\GraphQL\Type\Definition\InputType)|null

getRecursiveVariableUsages()

public getRecursiveVariableUsages(OperationDefinitionNode $operation) : array<string|int, array<string|int, mixed>>
Parameters
$operation : OperationDefinitionNode
Return values
array<string|int, array<string|int, mixed>>

List of ['node' => VariableNode, 'type' => ?InputObjectType]

getVariableUsages()

private getVariableUsages(HasSelectionSet $node) : array<string|int, array<string|int, mixed>>
Parameters
$node : HasSelectionSet
Return values
array<string|int, array<string|int, mixed>>

List of ['node' => VariableNode, 'type' => ?InputObjectType]

Search results