public function coerceDirectiveValues(
        Directive $directive,
        $node,
        array $variableValues = []
    ): ?array {
        $directiveNode = $node->hasDirectives()
            ? find($node->getDirectives(), function (NameAwareInterface $value) use ($directive) {
                return $value->getNameValue() === $directive->getName();
            }) : null;

        if (null !== $directiveNode) {
            return $this->coerceArgumentValues($directive, $directiveNode, $variableValues);
        }

        return null;
    }
public function coerceDirectiveValues(
        Directive $directive,
        $node,
        array $variableValues = []
    ): ?array {
        $directiveNode = $node->hasDirectives()
            ? find($node->getDirectives(), function (NameAwareInterface $value) use ($directive) {
                return $value->getNameValue() === $directive->getName();
            }) : null;

        if (null !== $directiveNode) {
            return $this->coerceArgumentValues($directive, $directiveNode, $variableValues);
        }

        return null;
    }
public function coerceDirectiveValues ( Directive $ directive , $ node , array $ variableValues = [ ] ) : ? array { $ directiveNode = $ node -> hasDirectives ( ) ? find ( $ node -> getDirectives ( ) , function ( NameAwareInterface $ value ) use ( $ directive ) { return $ value -> getNameValue ( ) === $ directive -> getName ( ) ; } ) : null ; if ( null !== $ directiveNode ) { return $ this -> coerceArgumentValues ( $ directive , $ directiveNode , $ variableValues ) ; } return null ; }
Prepares an object map of argument values given a directive definition
and a AST node which may contain directives. Optionally also accepts a map
of variable values.

If the directive does not exist on the node, returns null.

@param Directive $directive
@param mixed     $node
@param array     $variableValues
@return array|null
@throws ExecutionException
@throws InvalidTypeException
@throws InvariantException
Prepares an object map of argument values given a directive definition and a AST node which may contain directives . Optionally also accepts a map of variable values .