Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion validator/imported/graphql-js-commit.log
Original file line number Diff line number Diff line change
@@ -1 +1 @@
48afd37a48d37f6d3342b959e8cb34e1ecbfeffb
e2457b33e928f4ec8b22e96a6dc6cb2808c03dfa
15 changes: 0 additions & 15 deletions validator/imported/spec/ValuesOfCorrectTypeRule.spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1015,21 +1015,6 @@
- message: Field "OneOfInput.stringField" must be non-null.
locations:
- {line: 4, column: 37}
- name: Invalid oneOf input object value/Exactly one nullable variable
rule: ValuesOfCorrectType
schema: 0
query: |2-

query ($string: String) {
complicatedArgs {
oneOfArgField(oneOfArg: { stringField: $string })
}
}

errors:
- message: Variable "string" must be non-nullable to be used for OneOf Input Object "OneOfInput".
locations:
- {line: 4, column: 37}
- name: Invalid oneOf input object value/More than one field
rule: ValuesOfCorrectType
schema: 0
Expand Down
40 changes: 40 additions & 0 deletions validator/imported/spec/VariablesInAllowedPositionRule.spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -346,3 +346,43 @@
dog @include(if: $boolVar)
}
errors: []
- name: Allows exactly one non-nullable variable
rule: VariablesInAllowedPosition
schema: 0
query: |2-

query ($string: String!) {
complicatedArgs {
oneOfArgField(oneOfArg: { stringField: $string })
}
}

errors: []
- name: Undefined variable in oneOf input object
rule: VariablesInAllowedPosition
schema: 0
query: |2-

{
complicatedArgs {
oneOfArgField(oneOfArg: { stringField: $undefinedVariable })
}
}

errors: []
- name: Forbids one nullable variable
rule: VariablesInAllowedPosition
schema: 0
query: |2-

query ($string: String) {
complicatedArgs {
oneOfArgField(oneOfArg: { stringField: $string })
}
}

errors:
- message: Variable "$string" is of type "String" but must be non-nullable to be used for OneOf Input Object "OneOfInput".
locations:
- {line: 2, column: 14}
- {line: 4, column: 50}
Loading