-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pull graphql-java with oneof fix and add more tests (#467)
Co-authored-by: Felipe Reis <[email protected]>
- Loading branch information
1 parent
6d5cf42
commit 8bc3a66
Showing
2 changed files
with
52 additions
and
1 deletion.
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
51 changes: 51 additions & 0 deletions
51
test/src/test/resources/fixtures/oneOf/one-of-fails-when-nested-input.yml
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,51 @@ | ||
name: "oneOf fails when nested input" | ||
enabled: true | ||
overallSchema: | ||
MyService: | | ||
type Query { | ||
search(by: SearchInput): String | ||
} | ||
input SearchInput { | ||
name: String | ||
id: IdInput | ||
} | ||
input IdInput @oneOf { | ||
email: String | ||
id: ID | ||
} | ||
underlyingSchema: | ||
MyService: |- | ||
type Query { | ||
search(by: SearchInput): String | ||
} | ||
input SearchInput { | ||
name: String | ||
id: IdInput | ||
} | ||
input IdInput @oneOf { | ||
email: String | ||
id: ID | ||
} | ||
query: | | ||
query myQuery { | ||
search(by: {id: {email: null}}) | ||
} | ||
variables: { } | ||
serviceCalls: [] | ||
# language=JSON | ||
response: |- | ||
{ | ||
"data": null, | ||
"errors": [{ | ||
"message":"OneOf type field 'IdInput.email' must be non-null.", | ||
"extensions":{ | ||
"classification":"ValidationError" | ||
} | ||
}], | ||
"extensions": {} | ||
} |