Ability to signal success or failure using a response header irrespective of HTTP Status Code (to allow e.g. graphql to work with linkerd)
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 11.5k
- Forks
- 1.4k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 53
Description
## Feature Request
### What problem are you trying to solve?
To signal to linkerd whether a given request succeeded or failed. The GraphQL specification does not signal errors using HTTP status codes and thus to Linkerd it appears that a given request succeeded.
Errors in graphql are returned as an array of errors and partial failure of a query may also be possible. Therefore it is difficult for any middle-ware to determine the success/failure of a query without knowledge of the API.
### How should the problem be solved?
By adding a custom response header (e.g. `X-LinkerdStatusCode`) that can easily be read by Linkerd and has values with very clear semantics, letting application developers decide how that maps to graphql responses.
### Any alternatives you've considered?
- Some sort of plugin that can parse graphql response bodies. However this seems expensive in terms of performance and has unclear semantics.
- Adjusting the http status code. However testing has revealed that this breaks some graphql client libraries, making this solution unsuitable for platforms which offer an API as a service.
### How would users interact with this feature?
By setting a header in their responses.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no implementation files, tests, or entry points. Start by locating Linkerd's response classification and HTTP header handling, then determine the header semantics and integration coverage needed for GraphQL responses. Done means documented, tested behavior that lets users signal success or failure independently of the HTTP status code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, graphql
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100