apollographql / apollographql/federation
Federated gateway - 500 error on whole graph if one underlying graph/service is down
- Dominant language
- TypeScript
- Stars
- 725
- Forks
- 276
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 1
Description
Hi there, I have been trying out federated gateway and I am worried about the entire service going down if one graph is not running.
If you have a number of micro graphql services underneath that can cause a lot of problems. I tried turning off / on services while starting up federated gateway. It should really pick up the services more gracefully.
For example: the below caused the entire graphql to result in 500 internal error (instead of just reporting an error that one service is down and allowing all the other services to operate as normal. It should rather be an online/offline kind of thing.
Error checking for changes to service definitions: Couldn't load service definitions for "testgraphLocal" at http://test-graph:8099/query: request to http://test-graph:8099/query failed, reason: getaddrinfo ENOTFOUND test-graph
This data graph is missing a valid configuration. Couldn't load service definitions for "testgraphLocal" at http://test-graph:8099/query: request to http://test-graph:8099/query failed, reason: getaddrinfo ENOTFOUND test-graph
Contributor guide
Research direction
Start with the federated gateway's service-definition loading and change-checking path, reproducing the failure with one underlying graph unavailable at its query URL. Done should mean an unavailable service is reported without making the entire GraphQL gateway return 500, while other services remain usable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100