Skip to content

Option to opt-out from re-conecting to WebSocket #989

@fassko

Description

@fassko

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions