#1421 [Feature]: Handle GraphQL errors
Issue created by
edgarrmondragon
Feature scope
Taps (catalog, state, stream maps, etc.)
Description
As documented in
https://www.apollographql.com/docs/react/data/error-handling, GraphQL errors are included as an array in the response:
{
"errors": [
{
"message": "Cannot query field \"nonexistentField\" on type \"Query\".",
"locations": [
{
"line": 2,
"column": 3
}
],
"extensions": {
"code": "GRAPHQL_VALIDATION_FAILED",
"exception": {
"stacktrace": [
"GraphQLError: Cannot query field \"nonexistentField\" on type \"Query\".",
"...additional lines..."
]
}
}
}
],
"data": null
}
(getting JSON-RPC flashbacks 💀)
It'd be good to handle these as part of the
GraphQL.valildate_response
implementation.
See
MeltanoLabs/tap-github#181
meltano/sdk