public static function undefinedFieldMessage(
        $fieldName,
        $type,
        array $suggestedTypeNames,
        array $suggestedFieldNames
    ) {
        $message = sprintf('Cannot query field "%s" on type "%s".', $fieldName, $type);

        if ($suggestedTypeNames) {
            $suggestions = Utils::quotedOrList($suggestedTypeNames);

            $message .= sprintf(' Did you mean to use an inline fragment on %s?', $suggestions);
        } elseif (! empty($suggestedFieldNames)) {
            $suggestions = Utils::quotedOrList($suggestedFieldNames);

            $message .= sprintf(' Did you mean %s?', $suggestions);
        }

        return $message;
    }
public static function undefinedFieldMessage(
        $fieldName,
        $type,
        array $suggestedTypeNames,
        array $suggestedFieldNames
    ) {
        $message = sprintf('Cannot query field "%s" on type "%s".', $fieldName, $type);

        if ($suggestedTypeNames) {
            $suggestions = Utils::quotedOrList($suggestedTypeNames);

            $message .= sprintf(' Did you mean to use an inline fragment on %s?', $suggestions);
        } elseif (! empty($suggestedFieldNames)) {
            $suggestions = Utils::quotedOrList($suggestedFieldNames);

            $message .= sprintf(' Did you mean %s?', $suggestions);
        }

        return $message;
    }
public static function undefinedFieldMessage ( $ fieldName , $ type , array $ suggestedTypeNames , array $ suggestedFieldNames ) { $ message = sprintf ( 'Cannot query field "%s" on type "%s".' , $ fieldName , $ type ) ; if ( $ suggestedTypeNames ) { $ suggestions = Utils :: quotedOrList ( $ suggestedTypeNames ) ; $ message .= sprintf ( ' Did you mean to use an inline fragment on %s?' , $ suggestions ) ; } elseif ( ! empty ( $ suggestedFieldNames ) ) { $ suggestions = Utils :: quotedOrList ( $ suggestedFieldNames ) ; $ message .= sprintf ( ' Did you mean %s?' , $ suggestions ) ; } return $ message ; }
@param string   $fieldName
@param string   $type
@param string[] $suggestedTypeNames
@param string[] $suggestedFieldNames

@return string
@param string $fieldName @param string $type @param string [] $suggestedTypeNames @param string [] $suggestedFieldNames