graphql-engine
graphql-engine copied to clipboard
Queries should return partial data if remote relationships fail
Is your proposal related to a problem?
If there is a query with a remote relationships like below:
query {
artists {
name
info
remote_tracks {
id
title
}
}
}
where remote_tracks is a remote relationship and if there is a failure in the origin source for remote_tracks
then graphql-engine should still return partial results for artists instead of throwing complete error.
Describe the solution you'd like
In the above example, if remote_tracks does not resolve because of intermittent network issues, etc then we should get a response like below:
{
"data": {
"artists": [
{
"name": "ac/dc",
"info": "rock",
"remote_info": null
}
]
},
"errors": [
{
"message": "could not resolve remote_info"
}
]
}
Scope/Notes
- Note that the remote source above is consistent in the metadata but fails to "resolve" during the execution of the request. Tackling partial success when the remote source is inconsistent (i.e when
remote_infowould not even be present in the schema) can be considered out of scope of this ticket.
Related: https://github.com/hasura/graphql-engine/issues/8259
I would love this feature as well. 👍
I would love this feature as well. 👍
+1