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
SSE Keep-Alive #6035
Comments
Hey @enisdenjo I saw similar things with other gateways ... is that something that can be added to the protocol ... to send a keep alive message? |
graphql-sse itself pings clients every 12 seconds.
SSE spec "Authoring notes" section Essentially, issuing an empty comment message ( |
Thanks @enisdenjo, but how can I submit this empty message to all connected/subscribed clients? What I was thinking of was having some kind of background service which sends a keep-alive payload to all connected subscribers (regardless of topic), but I've been digging around in the transport code and I can't find an injectable service I can use for this purpose. Does such a service exist, or would I need to create a separate subscription just for this? |
Sorry but I am not familiar with this library. I'd say @michaelstaib is the better person to ask. |
Any suggestions on this topic @michaelstaib? |
We will implement that with 13.1 .... thanks @enisdenjo for the feedback |
Product
Hot Chocolate
Is your feature request related to a problem?
Subscriptions over SSE work really well, but a problem we have is that there's no keep-alive mechanism. This manifests itself when using something like Azure Application Gateway which closes idle connections after a pre-configured timeout. There's an open discussion regarding this topic in the Web Hypertext Application Technology Working Group repository.
The solution you'd like
SSE support should be more explicit and allow a configurable keep-alive message to be dispatched to all connected clients. Alternatively, is there an injectable interface which allows us to get all connected subscribers and manually issue keep-alives in a background service?
The text was updated successfully, but these errors were encountered: