-
-
Notifications
You must be signed in to change notification settings - Fork 535
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
Support GraphQL subscriptions #285
Comments
are there any stopgap solutions that you can recommend until this feature is built @kettanaito ? |
@hsavit1 as far as I know, GraphQL subscription is an abstraction over WebSocket. Subscriptions support would require a WebSocket support as a pre-requisite (#156). I cannot recommend any solution to achieve that at the moment. WebSocket support is on the roadmap, but I wouldn't expect it any time soon, unless you wish to contribute to it. |
I finally followed the advice from apollo and moved from subscription-transport-ws to graphql-ws. Everything is working and tests even pass, but unfortunately they also spit out ...
With subscription-transport-ws I just had an unhandled GET request, which I could ignore with ...
The best I could come up with so far to have graphql-ws run cleanly was to do this in the client in order to avoid sending to graphql-ws during tests ...
And then a handler like this ...
This is kind of ugly and I don't like it. There must be a better way to just ignore subscriptions? |
Okay, cleaner work around ... In
This is basically just the code for apollo versions < 3.5.10 but with the error function doing nothing. Then just need the |
Definitely looking forward to this feature since #2011 has been merged. 🙂 |
UpdateI'm opening a discussion for the GraphQL subscriptions support at #2352. Please participate, read through the document, and share your thoughts! Those are highly appreciated. The implementation itself is likely to happen next year. Thanks. |
What
I suggest to add support for GraphQL subscriptions (example tutorial from Apollo).
Why
To support all three main GraphQL operations: query, mutation, and subscription.
How
Technical notes
The text was updated successfully, but these errors were encountered: