graphql-java-codegen
graphql-java-codegen copied to clipboard
Exception de-serializing errors sent by AWS AppSync
Issue Description
Some errors sent by an application built on AWS AppSync contain and extra field called "data" which does exist in the GraphQLError
class.
Furthermore if I ignore unknown properties the GraphQLErrorType
is missing error types provided by AppSync ex Lambda:Unhandled
.
Is there any way to override these when generating the models ?
Steps to Reproduce
To reproduce try to de-serialize the following json into a GraphQLResult
{
"data": null,
"errors": [
{
"path": [
"addProject"
],
"data": null,
"errorType": "Lambda:Unhandled",
"errorInfo": null,
"locations": [
{
"line": 1,
"column": 23,
"sourceName": null
}
],
"message": "There is already a Project with name AutoProj-Duplicate1679598192925 in the system"
}
]
}
Expected Result
Json should de-serialize correctly
Actual Result
De-serialization fails because "data" is an urecognised field and Lambda:Unhandled
is an unrecognised error type
Your Environment and Setup
- graphql-java-codegen version: 5.6.0
- Build tool: Gradle