You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GraphQL subscriptions connect to the server and all is good, but if it looses connection (network issue or re-deploy of the server) currently WebSocketTransport tries to reconnect. When connection it tries to write to send to the queue but if not acked it saves message to the queue. If this happens multiple times the result is multiple of the same subscription message in the queue.
Next step would be to keep better WebSocket state using IDs from subscription message not just incremented IDs, that would help to avoid duplicate websocekt message instances in the WebSocketTransport.queue.
if this sounds like a feature to add I can come up with a PR.
The text was updated successfully, but these errors were encountered:
It seems reasonable - my understanding of the websocket stuff is slightly hand-wavy, but this seems like a reasonable thing to allow opting out of, since the default behavior of trying to reconnect is probably what most people want, but your situation of not wanting it also makes sense.
@designatednerd I can help out with other stuff with Websockets stuff as I have dealt with that a lot and I help to maintain the Starscream library and wrote some articles about the topic. :)
Let me explain why this would be needed.
GraphQL subscriptions connect to the server and all is good, but if it looses connection (network issue or re-deploy of the server) currently
WebSocketTransport
tries to reconnect. When connection it tries to write to send to the queue but if not acked it saves message to the queue. If this happens multiple times the result is multiple of the same subscription message in the queue.Next step would be to keep better WebSocket state using IDs from subscription message not just incremented IDs, that would help to avoid duplicate websocekt message instances in the
WebSocketTransport.queue
.if this sounds like a feature to add I can come up with a PR.
The text was updated successfully, but these errors were encountered: