src/Type/SchemaValidationContext.php
private function getAllFieldNodes($type, $fieldName)
    {
        $fieldNodes = [];
        $astNodes   = $this->getAllObjectOrInterfaceNodes($type);
        foreach ($astNodes as $astNode) {
            if (! $astNode || ! $astNode->fields) {
                continue;
            }

            foreach ($astNode->fields as $node) {
                if ($node->name->value !== $fieldName) {
                    continue;
                }

                $fieldNodes[] = $node;
            }
        }

        return $fieldNodes;
    }
private function getAllFieldNodes($type, $fieldName)
    {
        $fieldNodes = [];
        $astNodes   = $this->getAllObjectOrInterfaceNodes($type);
        foreach ($astNodes as $astNode) {
            if (! $astNode || ! $astNode->fields) {
                continue;
            }

            foreach ($astNode->fields as $node) {
                if ($node->name->value !== $fieldName) {
                    continue;
                }

                $fieldNodes[] = $node;
            }
        }

        return $fieldNodes;
    }
private function getAllFieldNodes ( $ type , $ fieldName ) { $ fieldNodes = [ ] ; $ astNodes = $ this -> getAllObjectOrInterfaceNodes ( $ type ) ; foreach ( $ astNodes as $ astNode ) { if ( ! $ astNode || ! $ astNode -> fields ) { continue ; } foreach ( $ astNode -> fields as $ node ) { if ( $ node -> name -> value !== $ fieldName ) { continue ; } $ fieldNodes [ ] = $ node ; } } return $ fieldNodes ; }
@param ObjectType|InterfaceType $type
@param string                   $fieldName

@return FieldDefinitionNode[]
@param ObjectType|InterfaceType $type @param string $fieldName