KnownDirectives
extends ValidationRule
in package
Table of Contents
- $name : string
- __invoke() : mixed
- getASTVisitor() : 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
- misplacedDirectiveMessage() : mixed
- unknownDirectiveMessage() : mixed
- getDirectiveLocationForASTPath() : string
Properties
$name
protected
string
$name
Methods
__invoke()
public
__invoke(ValidationContext $context) : mixed
Parameters
- $context : ValidationContext
Return values
mixed —getASTVisitor()
public
getASTVisitor(ASTValidationContext $context) : mixed
Parameters
- $context : ASTValidationContext
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
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> —misplacedDirectiveMessage()
public
static misplacedDirectiveMessage(mixed $directiveName, mixed $location) : mixed
Parameters
- $directiveName : mixed
- $location : mixed
Return values
mixed —unknownDirectiveMessage()
public
static unknownDirectiveMessage(mixed $directiveName) : mixed
Parameters
- $directiveName : mixed
Return values
mixed —getDirectiveLocationForASTPath()
private
getDirectiveLocationForASTPath(array<string|int, Node>|array<string|int, NodeList> $ancestors) : string
Parameters
- $ancestors : array<string|int, Node>|array<string|int, NodeList>
-
The type is actually (Node|NodeList)[] but this PSR-5 syntax is so far not supported by most of the tools