-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pre-Supergraph Router service layer (HTTP) #1496
Comments
Removing the |
As some examples of user-land things which we could enable by supporting this, both of the following use-cases come to mind — though I have closed those issues as "working as intended" in for the common Router user story:
|
The most pressing customer use case I have is supporting a custom persisted query implementation. They have old mobile clients sending a weird PQ format and it will take a long time for those version to die off. They handled this in express middleware when using Apollo Gateway. |
This is relevant: router/apollo-router/src/router.rs Lines 53 to 62 in 538a069
An open question that remains is how (and whether?) to expose multiple TCP/Unix listeners |
|
If something like the Prometheus endpoint is configured on a secondary TCP port, should HTTP-level plugins run for those requests as well? Should they be responsible for always checking some property of the request to dispatch on port number as well as URL path? |
Do yall have opinions on where the http_service should kick in (as in before or after axum routing?) My opinion is that it should be right after axum routing (The http service stack should only apply to the graphql path) and before anything else happens (headers parsing || studio redirection or body deserialization shouldn't have happened before) I've also read mentions of the http_service applying before the axum router, I would be interested to read thoughts on that, especially since we now have custom endpoints that could satisfy that. |
I think having it just after the axum routing makes sense. It should take a raw http request (without json deserialization) and return a raw http response I think |
Fixes #1496 A `router_service` is now part of our service stack, which allows plugin developers to process raw http requests and raw http responses, that wrap the already available `supergraph_service`
Currently we provide:
Service
for handling GraphQL requests with high-level request and response objects, typically for use in testsIt would make sense to provide the intermediate abstraction of Tower service at the HTTP level, where request and response bodies are raw bytes. This could potentially be run in a different HTTP server.
For 1.0 we want to at least have the separation internally, though perhaps not yet provide a public API for it.
The text was updated successfully, but these errors were encountered: