hasura / hasura/graphql-engine

Queries should return partial data if remote relationships fail

Open
#9,743 3 comments 2 reactions 0 assignees View on GitHub
k/enhancement t/gql-services
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### 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

1. 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_info` would not even be present in the schema) can be considered out of scope of this ticket.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.