GraphQL\Validator\Rules\NoUndefinedVariables::undefinedVarMessage PHP Method

undefinedVarMessage() static public method

static public undefinedVarMessage ( $varName, $opName = null )
    static function undefinedVarMessage($varName, $opName = null)
    {
        return $opName ? "Variable \"\${$varName}\" is not defined by operation \"{$opName}\"." : "Variable \"\${$varName}\" is not defined.";
    }

Usage Example

 private function undefVar($varName, $line, $column)
 {
     return FormattedError::create(NoUndefinedVariables::undefinedVarMessage($varName), [new SourceLocation($line, $column)]);
 }
All Usage Examples Of GraphQL\Validator\Rules\NoUndefinedVariables::undefinedVarMessage