NoFragmentCycles
extends ValidationRule
in package
Table of Contents
- $spreadPath : array<string|int, FragmentSpreadNode>
- $spreadPathIndexByName : array<string|int, int|null>
- $visitedFrags : array<string|int, bool>
- $name : string
- __invoke() : mixed
- cycleErrorMessage() : mixed
- getName() : mixed
- getSDLVisitor() : array<string|int, mixed>
- Returns structure suitable for GraphQL\Language\Visitor
- getVisitor() : array<string|int, mixed>
- Returns structure suitable for GraphQL\Language\Visitor
- detectCycleRecursive() : mixed
Properties
$spreadPath
public
array<string|int, FragmentSpreadNode>
$spreadPath
$spreadPathIndexByName
public
array<string|int, int|null>
$spreadPathIndexByName
$visitedFrags
public
array<string|int, bool>
$visitedFrags
$name
protected
string
$name
Methods
__invoke()
public
__invoke(ValidationContext $context) : mixed
Parameters
- $context : ValidationContext
Return values
mixed —cycleErrorMessage()
public
static cycleErrorMessage(mixed $fragName[, array<string|int, string> $spreadNames = [] ]) : mixed
Parameters
- $fragName : mixed
- $spreadNames : array<string|int, string> = []
Return values
mixed —getName()
public
getName() : mixed
Return values
mixed —getSDLVisitor()
Returns structure suitable for GraphQL\Language\Visitor
public
getSDLVisitor(SDLValidationContext $context) : array<string|int, mixed>
Parameters
- $context : SDLValidationContext
Tags
Return values
array<string|int, mixed> —getVisitor()
Returns structure suitable for GraphQL\Language\Visitor
public
getVisitor(ValidationContext $context) : array<string|int, mixed>
Parameters
- $context : ValidationContext
Return values
array<string|int, mixed> —detectCycleRecursive()
private
detectCycleRecursive(FragmentDefinitionNode $fragment, ValidationContext $context) : mixed
Parameters
- $fragment : FragmentDefinitionNode
- $context : ValidationContext