InputObjectCircularRefs
in package
Table of Contents
- $fieldPath : array<string|int, InputObjectField>
- $fieldPathIndexByTypeName : array<string|int, int>
- Position in the type path.
- $schemaValidationContext : SchemaValidationContext
- $visitedTypes : array<string, bool>
- Tracks already visited types to maintain O(N) and to ensure that cycles are not redundantly reported.
- __construct() : mixed
- validate() : void
- This does a straight-forward DFS to find cycles.
Properties
$fieldPath
private
array<string|int, InputObjectField>
$fieldPath
= []
$fieldPathIndexByTypeName
Position in the type path.
private
array<string|int, int>
$fieldPathIndexByTypeName
= []
[string $typeName => int $index]
$schemaValidationContext
private
SchemaValidationContext
$schemaValidationContext
$visitedTypes
Tracks already visited types to maintain O(N) and to ensure that cycles are not redundantly reported.
private
array<string, bool>
$visitedTypes
= []
Methods
__construct()
public
__construct(SchemaValidationContext $schemaValidationContext) : mixed
Parameters
- $schemaValidationContext : SchemaValidationContext
Return values
mixed —validate()
This does a straight-forward DFS to find cycles.
public
validate(InputObjectType $inputObj) : void
It does not terminate when a cycle was found but continues to explore the graph to find all possible cycles.
Parameters
- $inputObj : InputObjectType