apollographql / apollographql/federation
feat(composition): Improve composition errors / subgraph locations
- Dominant language
- TypeScript
- Stars
- 727
- Forks
- 276
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 1
Description
Subgraph locations aren't always reported (i.e. in the case of graphql-js errors during composition). This results in a UX where schema authors are given an error without being told where to resolve it.
To reproduce, compose:
```graphql
type Query @myUndefinedDirective {
hello: String!
}
```
Note the resulting composition errors (`Unknown directive @myUndefinedDirective`) don't contain the subgraph info that would be useful in output.
Contributor guide
Research direction
Start by reproducing the composition example with the undefined directive and inspect the resulting graphql-js composition errors. Trace how subgraph locations are carried into composition output; done means errors such as "Unknown directive @myUndefinedDirective" include the relevant subgraph information.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100