src/Type/SchemaValidationContext.php
private function getOperationTypeNode($type, $operation)
    {
        $astNode = $this->schema->getAstNode();

        $operationTypeNode = null;
        if ($astNode instanceof SchemaDefinitionNode) {
            $operationTypeNode = null;

            foreach ($astNode->operationTypes as $operationType) {
                if ($operationType->operation === $operation) {
                    $operationTypeNode = $operationType;
                    break;
                }
            }
        }

        return $operationTypeNode ? $operationTypeNode->type : ($type ? $type->astNode : null);
    }
private function getOperationTypeNode($type, $operation)
    {
        $astNode = $this->schema->getAstNode();

        $operationTypeNode = null;
        if ($astNode instanceof SchemaDefinitionNode) {
            $operationTypeNode = null;

            foreach ($astNode->operationTypes as $operationType) {
                if ($operationType->operation === $operation) {
                    $operationTypeNode = $operationType;
                    break;
                }
            }
        }

        return $operationTypeNode ? $operationTypeNode->type : ($type ? $type->astNode : null);
    }
private function getOperationTypeNode ( $ type , $ operation ) { $ astNode = $ this -> schema -> getAstNode ( ) ; $ operationTypeNode = null ; if ( $ astNode instanceof SchemaDefinitionNode ) { $ operationTypeNode = null ; foreach ( $ astNode -> operationTypes as $ operationType ) { if ( $ operationType -> operation === $ operation ) { $ operationTypeNode = $ operationType ; break ; } } } return $ operationTypeNode ? $ operationTypeNode -> type : ( $ type ? $ type -> astNode : null ) ; }
@param Type   $type
@param string $operation

@return TypeNode|TypeDefinitionNode
@param Type $type @param string $operation