-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2076 from DimuthuMadushan/var-def-fix
[2201.9.x] Fix Service Crashing when Input Object Type Variable Value Includes an Additional Field
- Loading branch information
Showing
8 changed files
with
100 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
...ina-tests/tests/resources/documents/input_object_with_unexpected_variable_fields1.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
query getBook($bName:String!, $bAuthor:ProfileDetail!, $dir:String) { | ||
...on Query { | ||
book(info: {bookName: $bName, edition: 6, author: $bAuthor, movie:{movieName: "End Game", director: $dir}}) { | ||
...on Book { | ||
name | ||
} | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...ina-tests/tests/resources/documents/input_object_with_unexpected_variable_fields2.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
query getBook($bInfo:Info!) { | ||
...on Query { | ||
book(info: $bInfo) { | ||
...on Book { | ||
name | ||
} | ||
} | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
...tests/tests/resources/expected_results/input_object_with_unexpected_variable_fields1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"errors": [ | ||
{ | ||
"message":"Input type \"ProfileDetail\" does not have a field \"address\".", | ||
"locations": [ | ||
{ | ||
"line": 3, | ||
"column": 60 | ||
} | ||
] | ||
} | ||
] | ||
} |
31 changes: 31 additions & 0 deletions
31
...tests/tests/resources/expected_results/input_object_with_unexpected_variable_fields2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"errors": [ | ||
{ | ||
"message": "Input type \"ProfileDetail\" does not have a field \"address\".", | ||
"locations": [ | ||
{ | ||
"line": 3, | ||
"column": 21 | ||
} | ||
] | ||
}, | ||
{ | ||
"message": "Input type \"Movie\" does not have a field \"episodes\".", | ||
"locations": [ | ||
{ | ||
"line": 3, | ||
"column": 21 | ||
} | ||
] | ||
}, | ||
{ | ||
"message": "Input type \"Info\" does not have a field \"dir\".", | ||
"locations": [ | ||
{ | ||
"line": 3, | ||
"column": 21 | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters