-
Notifications
You must be signed in to change notification settings - Fork 189
Add HTTP multipart transport for GraphQL subscriptions #574
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
base: master
Are you sure you want to change the base?
Add HTTP multipart transport for GraphQL subscriptions #574
Conversation
Implements the multipart subscription protocol for receiving streaming subscription updates over HTTP as an alternative to WebSocket transports. This protocol is implemented by Apollo GraphOS Router and other compatible servers, and is particularly useful when WebSocket connections are not available or blocked by infrastructure. The transport handles multipart/mixed responses with heartbeat support and proper error handling for both GraphQL and transport-level errors. It requires servers to support the multipart subscription protocol - requests that don't receive a multipart response will fail with a clear error message. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
|
cc @patrick91 ;) |
|
Thanks for your work on this! So do you know if there is a public backend somewhere supporting this protocol? |
not that i know of - but i'll start doing that now, i can throw something up on a lambda worker |
Great! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #574 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 38 41 +3
Lines 2908 3375 +467
==========================================
+ Hits 2908 3375 +467 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
For the linting issues, you should run |
|
@leszekhanusz https://github.com/magicmark/gql-book-server/ :) publicly accessible here here: https://gql-book-server.fly.dev/graphql (I was too dumb to get multipart + chunked transfer encoding working via a lambda so just deploying on the cheapest fly.io machine possible) |
131a424 to
6c5c850
Compare
Fix #463
(This PR is 95% authored by claude. I have manually verified against a locally running server. Code looks good? I'll keep reviewing too before removing the draft marker since I don't just wanna dump a bunch of slop on you.)
Implements the multipart subscription protocol for receiving streaming subscription updates over HTTP as an alternative to WebSocket transports. This protocol is implemented by Apollo GraphOS Router and other compatible servers, and is particularly useful when WebSocket connections are not available or blocked by infrastructure.
The transport handles multipart/mixed responses with heartbeat support and proper error handling for both GraphQL and transport-level errors. It requires servers to support the multipart subscription protocol - requests that don't receive a multipart response will fail with a clear error message.
🤖 Generated with Claude Code