private void duplicateDirective(ValidationTestConfig _, string directiveName, int line, int column) { _.Error(err => { err.Message = $"The directive '{directiveName}' can only be used once at this location."; err.Loc(line, column); }); }
private void missingDirectiveArg( ValidationTestConfig _, string directiveName, string argName, string typeName, int line, int column) { _.Error(Rule.MissingDirectiveArgMessage(directiveName, argName, typeName), line, column); }
private void missingDirectiveArg( ValidationTestConfig _, string directiveName, string argName, string typeName, int line, int column) { _.Error(ProvidedNonNullArgumentsError.MissingDirectiveArgMessage(directiveName, argName, typeName), line, column); }
private void missingFieldArg( ValidationTestConfig _, string fieldName, string argName, string typeName, int line, int column) { _.Error(Rule.MissingFieldArgMessage(fieldName, argName, typeName), line, column); }
private void undefFrag( ValidationTestConfig _, string fragName, int line, int column) { _.Error(err => { err.Message = Rule.UnknownFragmentMessage(fragName); err.Loc(line, column); }); }
private void unusedFrag( ValidationTestConfig _, string varName, int line, int column ) { _.Error(err => { err.Message = Rule.UnusedFragMessage(varName); err.Loc(line, column); }); }
private void unusedVar( ValidationTestConfig _, string varName, string opName, int line, int column ) { _.Error(err => { err.Message = NoUnusedVariablesError.UnusedVariableMessage(varName, opName); err.Loc(line, column); }); }
private void undefinedField( ValidationTestConfig _, string field, string type, IEnumerable <string> suggestedTypes = null, IEnumerable <string> suggestedFields = null, int line = 0, int column = 0) { suggestedTypes = suggestedTypes ?? Enumerable.Empty <string>(); suggestedFields = suggestedFields ?? Enumerable.Empty <string>(); _.Error(Rule.UndefinedFieldMessage(field, type, suggestedTypes, suggestedFields), line, column); }
private void duplicateDirective( ValidationTestConfig _, string directiveName, int line1, int column1, int line2, int column2) { _.Error(err => { err.Message = Rule.DuplicateDirectiveMessage(directiveName); err.Loc(line1, column1); err.Loc(line2, column2); }); }
private void duplicateArg( ValidationTestConfig _, string argName, int line1, int column1, int line2, int column2) { _.Error(err => { err.Message = UniqueArgumentNamesError.DuplicateArgMessage(argName); err.Loc(line1, column1); err.Loc(line2, column2); }); }
private void duplicateVariable( ValidationTestConfig _, string variableName, int line1, int column1, int line2, int column2) { _.Error(err => { err.Message = UniqueVariableNamesError.DuplicateVariableMessage(variableName); err.Loc(line1, column1); err.Loc(line2, column2); }); }
private void duplicateFrag( ValidationTestConfig _, string fragName, int line1, int column1, int line2, int column2) { _.Error(err => { err.Message = Rule.DuplicateFragmentNameMessage(fragName); err.Loc(line1, column1); err.Loc(line2, column2); }); }
private void undefVar( ValidationTestConfig _, string varName, int line1, int column1, string opName, int line2, int column2) { _.Error(err => { err.Message = Rule.UndefinedVarMessage(varName, opName); err.Loc(line1, column1); err.Loc(line2, column2); }); }
public static void badValue( this ArgumentsOfCorrectType rule, ValidationTestConfig config, string argName, string typeName, string value, int line, int column, IEnumerable <string> errors = null) { errors ??= new[] { $"Expected type \"{typeName}\", found {value}." }; config.Error( ArgumentsOfCorrectTypeError.BadValueMessage(argName, value, errors), line, column); }
public static void badValue( this ArgumentsOfCorrectType rule, ValidationTestConfig config, string argName, string typeName, string value, int line, int column, string errors = null) { errors ??= $"Expected type '{typeName}', found {value}."; config.Error( ArgumentsOfCorrectTypeError.BadValueMessage(argName, errors), line, column); }
private void badValue( ValidationTestConfig _, string argName, string typeName, string value, int?line = null, int?column = null, IEnumerable <string> errors = null) { if (errors == null) { errors = new [] { $"Expected type \"{typeName}\", found {value}." }; } _.Error( _rule.BadValueMessage(argName, null, value, errors), line, column); }
public static void badValue( this ArgumentsOfCorrectType rule, ValidationTestConfig _, string argName, string typeName, string value, int?line = null, int?column = null, IEnumerable <string> errors = null) { if (errors == null) { errors = new [] { $"Expected type \"{typeName}\", found {value}." }; } _.Error( rule.BadValueMessage(argName, null, value, errors), line, column); }
private void error(ValidationTestConfig _, string fragName, string parentType, string fragType, int line, int column) { _.Error(PossibleFragmentSpreadsError.TypeIncompatibleSpreadMessage(fragName, parentType, fragType), line, column); }
private void misplacedDirective(ValidationTestConfig _, string name, DirectiveLocation placement, int line, int column) { _.Error($"Directive '{name}' may not be used on {placement}.", line, column); }
private void errorAnon(ValidationTestConfig _, string parentType, string fragType, int line, int column) { _.Error(Rule.TypeIncompatibleAnonSpreadMessage(parentType, fragType), line, column); }
private void unknownDirective(ValidationTestConfig _, string name, int line, int column) { _.Error($"Unknown directive '{name}'.", line, column); }
private void unknownDirective(ValidationTestConfig _, string name, int line, int column) { _.Error(Rule.UnknownDirectiveMessage(name), line, column); }
private void misplacedDirective(ValidationTestConfig _, string name, DirectiveLocation placement, int line, int column) { _.Error(Rule.MisplacedDirectiveMessage(name, placement.ToString()), line, column); }
private void error(ValidationTestConfig _, string fragName, string typeName, int line, int column) { _.Error(Rule.FragmentOnNonCompositeErrorMessage(fragName, typeName), line, column); }