src/Schema/AST/ASTHelper.php
public static function hasDirectiveDefinition(Node $definitionNode, string $name): bool
    {
        return (new Collection($definitionNode->directives))
            ->contains(function (DirectiveNode $directiveDefinitionNode) use ($name): bool {
                return $directiveDefinitionNode->name->value === $name;
            });
    }
public static function hasDirectiveDefinition(Node $definitionNode, string $name): bool
    {
        return (new Collection($definitionNode->directives))
            ->contains(function (DirectiveNode $directiveDefinitionNode) use ($name): bool {
                return $directiveDefinitionNode->name->value === $name;
            });
    }
public static function hasDirectiveDefinition ( Node $ definitionNode , string $ name ) : bool { return ( new Collection ( $ definitionNode -> directives ) ) -> contains ( function ( DirectiveNode $ directiveDefinitionNode ) use ( $ name ) : bool { return $ directiveDefinitionNode -> name -> value === $ name ; } ) ; }
Check if a node has a particular directive defined upon it.

@param  \GraphQL\Language\AST\Node  $definitionNode
@param  string  $name
@return bool
Check if a node has a particular directive defined upon it .