Cosmo router is blocking the response when subscribing via SSE, until at least one message is received which causes a timeout
Component(s)
router
router version
0.222.0
What happened?
When subscribing to a subscription via SSE, cosmo router is blocking the response until at least one message is received from the subgraph which can cause a timeout if no messages are received within 1 minute. (depending on the timeout).
Cosmo router should flush right away, with a text/event-stream Content-Type even if no messages are streamed, and maintain the connection until is closed by client
WunderGraph commits fully to Open Source and we want to make sure that we can help you as fast as possible. The roadmap is driven by our customers and we have to prioritize issues that are important to them. You can influence the priority by becoming a customer. Please contact us here.
related to https://github.com/wundergraph/cosmo/issues/1995
hello @endigma not sure if this issue is a duplicate, it can be solved using heartbeats but only if your client can handle them, which in my case it doesn't. I think the router should do an one time flush after the subscription is done , just to establish the connection with the client
Sure, I'll take a closer look