PHP Class GraphQL\Validator\Rules\AbstractQuerySecurity

Afficher le fichier Open project: webonyx/graphql-php

Méthodes protégées

Méthode Description
checkIfGreaterOrEqualToZero ( $name, $value ) check if equal to 0 no check is done. Must be greater or equal to 0.
collectFieldASTsAndDefs ( ValidationContext $context, Type | null $parentType, SelectionSetNode $selectionSet, ArrayObject $visitedFragmentNames = null, ArrayObject $astAndDefs = null ) : ArrayObject Given a selectionSet, adds all of the fields in that selection to the passed in map of fields, and returns it at the end.
gatherFragmentDefinition ( ValidationContext $context )
getFieldName ( FieldNode $node )
getFragment ( FragmentSpreadNode $fragmentSpread )
getFragments ( ) : FragmentDefinitionNode[]
invokeIfNeeded ( ValidationContext $context, array $validators )
isEnabled ( )

Method Details

checkIfGreaterOrEqualToZero() protected méthode

check if equal to 0 no check is done. Must be greater or equal to 0.
protected checkIfGreaterOrEqualToZero ( $name, $value )
$value

collectFieldASTsAndDefs() protected méthode

Note: This is not the same as execution's collectFields because at static time we do not know what object type will be used, so we unconditionally spread in all fragments.
See also: GraphQL\Validator\Rules\OverlappingFieldsCanBeMerged
protected collectFieldASTsAndDefs ( ValidationContext $context, Type | null $parentType, SelectionSetNode $selectionSet, ArrayObject $visitedFragmentNames = null, ArrayObject $astAndDefs = null ) : ArrayObject
$context GraphQL\Validator\ValidationContext
$parentType GraphQL\Type\Definition\Type | null
$selectionSet GraphQL\Language\AST\SelectionSetNode
$visitedFragmentNames ArrayObject
$astAndDefs ArrayObject
Résultat ArrayObject

gatherFragmentDefinition() protected méthode

protected gatherFragmentDefinition ( ValidationContext $context )
$context GraphQL\Validator\ValidationContext

getFieldName() protected méthode

protected getFieldName ( FieldNode $node )
$node GraphQL\Language\AST\FieldNode

getFragment() protected méthode

protected getFragment ( FragmentSpreadNode $fragmentSpread )
$fragmentSpread GraphQL\Language\AST\FragmentSpreadNode

getFragments() protected méthode

protected getFragments ( ) : FragmentDefinitionNode[]
Résultat GraphQL\Language\AST\FragmentDefinitionNode[]

invokeIfNeeded() protected méthode

protected invokeIfNeeded ( ValidationContext $context, array $validators )
$context GraphQL\Validator\ValidationContext
$validators array

isEnabled() abstract protected méthode

abstract protected isEnabled ( )