Skip to content
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

Edge case with multiple subscriptions to same query #45

Open
darrenclark opened this issue Oct 10, 2018 · 0 comments
Open

Edge case with multiple subscriptions to same query #45

darrenclark opened this issue Oct 10, 2018 · 0 comments

Comments

@darrenclark
Copy link

darrenclark commented Oct 10, 2018

I noticed subscribing to the same GraphQL query twice causes some interesting behaviour. Specifically this happens:

  1. client subscribes twice to the exact same query, gets back two responses with same subscriptionId, i.e. "subscriptionId":"__absinthe__:doc:116039402"
  2. client receives two subscription:data events (as I'd expect) when changes are published
  3. unsubscribing once causes no more subscription:data events for that query, even though I have one "active" subscription

I was wondering what the expected behaviour is? I can try to take a stab at fixing it

Personally, I think it would make sense to require unsubscribing twice (i.e. each doc event for a single query should be paired up with a unsubscribe event)

Thoughts?

banners_and_alerts_and_dark_websocket_terminal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant