apollographql / apollographql/federation
Pass through errors encountered when running final execute
- Dominant language
- TypeScript
- Stars
- 725
- Forks
- 276
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 1
Description
This is a tracking issue to account for the need to re-implement a different approach for achieving subgraph error pass-through behavior, following up on the first attempt to do so in https://github.com/apollographql/federation/pull/159#issuecomment-901246314.
While that was an improvement in principle, it:
* has a bug that was first captured in https://github.com/apollographql/federation/pull/159#issuecomment-901246314 To quote that here:
> I think there's a bug here. Let's say we have a query `{ x }` where `x` is a non-nullable field, and the federated execution has `x` throw an error. This turns all of `data` into `null` (not `{ x: null }`). But then this re-execution adds another error saying that the non-null field is null.
>
> Take a look at https://codesandbox.io/s/angry-raman-uuzuf?file=/src/index.js for an example of what's going on here.
* Sometimes — unexpectedly to current users, at least — breaks client expectations.
As of now, the pain points seem to be outweighing the gains. I won't dispute the original PR having definitely solved a problem, but the original PR didn't have an issue that it closed nor did it introduce tests so I'm not super crisp on the extent. Given that we've now a non-zero amount of feedback that the approach is causing problems, we'll need to revert this and revisit this when time allows with a slightly different approach.
Ref: https://github.com/apollographql/federation/pull/159
Ref: https://github.com/apollographql/apollo-server/issues/5550
Ref: https://github.com/apollographql/federation/issues/974
Ref: https://github.com/apollographql/apollo-server/pull/4523
Contributor guide
Research direction
Start by reviewing pull request #159 and the linked Apollo Server and federation issues, including the described non-nullable-field reproduction. The payload names no source files or tests, so the implementation entry point is not specified. Done would require a new error pass-through approach that avoids the reported duplicate or client-breaking errors, with coverage for the cited behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, typescript
- Domain
- api, backend-api-design
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100