PHP Class GraphQL\Validator\ValidationContext

Exibir arquivo Open project: webonyx/graphql-php Class Usage Examples

Public Methods

Method Description
__construct ( Schema $schema, DocumentNode $ast, TypeInfo $typeInfo ) ValidationContext constructor.
getArgument ( )
getDirective ( )
getDocument ( ) : DocumentNode
getErrors ( ) : Error[]
getFieldDef ( ) : FieldDefinition
getFragment ( $name ) : FragmentDefinitionNode | null
getFragmentSpreads ( GraphQL\Language\AST\HasSelectionSet $node ) : FragmentSpreadNode[]
getInputType ( ) : GraphQL\Type\Definition\InputType
getParentType ( ) : GraphQL\Type\Definition\CompositeType
getRecursiveVariableUsages ( OperationDefinitionNode $operation ) : array
getRecursivelyReferencedFragments ( OperationDefinitionNode $operation ) : FragmentDefinitionNode[]
getSchema ( ) : Schema
getType ( ) : Type Returns OutputType
getVariableUsages ( GraphQL\Language\AST\HasSelectionSet $node ) : array
reportError ( Error $error )

Method Details

__construct() public method

ValidationContext constructor.
public __construct ( Schema $schema, DocumentNode $ast, TypeInfo $typeInfo )
$schema GraphQL\Schema
$ast GraphQL\Language\AST\DocumentNode
$typeInfo GraphQL\Utils\TypeInfo

getArgument() public method

public getArgument ( )

getDirective() public method

public getDirective ( )

getDocument() public method

public getDocument ( ) : DocumentNode
return GraphQL\Language\AST\DocumentNode

getErrors() public method

public getErrors ( ) : Error[]
return GraphQL\Error\Error[]

getFieldDef() public method

public getFieldDef ( ) : FieldDefinition
return GraphQL\Type\Definition\FieldDefinition

getFragment() public method

public getFragment ( $name ) : FragmentDefinitionNode | null
$name
return GraphQL\Language\AST\FragmentDefinitionNode | null

getFragmentSpreads() public method

public getFragmentSpreads ( GraphQL\Language\AST\HasSelectionSet $node ) : FragmentSpreadNode[]
$node GraphQL\Language\AST\HasSelectionSet
return GraphQL\Language\AST\FragmentSpreadNode[]

getInputType() public method

public getInputType ( ) : GraphQL\Type\Definition\InputType
return GraphQL\Type\Definition\InputType

getParentType() public method

public getParentType ( ) : GraphQL\Type\Definition\CompositeType
return GraphQL\Type\Definition\CompositeType

getRecursiveVariableUsages() public method

public getRecursiveVariableUsages ( OperationDefinitionNode $operation ) : array
$operation GraphQL\Language\AST\OperationDefinitionNode
return array List of ['node' => VariableNode, 'type' => ?InputObjectType]

getRecursivelyReferencedFragments() public method

public getRecursivelyReferencedFragments ( OperationDefinitionNode $operation ) : FragmentDefinitionNode[]
$operation GraphQL\Language\AST\OperationDefinitionNode
return GraphQL\Language\AST\FragmentDefinitionNode[]

getSchema() public method

public getSchema ( ) : Schema
return GraphQL\Schema

getType() public method

Returns OutputType
public getType ( ) : Type
return GraphQL\Type\Definition\Type

getVariableUsages() public method

public getVariableUsages ( GraphQL\Language\AST\HasSelectionSet $node ) : array
$node GraphQL\Language\AST\HasSelectionSet
return array List of ['node' => VariableNode, 'type' => ?InputObjectType]

reportError() public method

public reportError ( Error $error )
$error GraphQL\Error\Error