Skip to content

Fix subscribeToMore being removed from the observer #467

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

Merged
merged 1 commit into from
Jan 9, 2019

Conversation

karlito40
Copy link
Contributor

@karlito40 karlito40 commented Dec 4, 2018

Related to #462 #456

Currently when you execute the same query more than once, every subscriptions made on this query will be removed.

To reproduce the bug

  • attach subscribeToMore to a query
  • execute the query (the subscription is now correctly bind to the query)
  • execute the same query a second time (the subscription is now removed from the query and the smart subscription will be ignored as the variables did not changed)

This use case may be found when you use vue-apollo inside a vue-supply container.

I made an example of this scenario here. You will have to change the vue-apollo package to 3.0.0-beta.26 if you need to see the bug in action.

Fix

My workaround is to ignore the query call when no changes has been made since the last call.

@SebT
Copy link

SebT commented Dec 6, 2018

+1

@Akryum Akryum merged commit 36733c3 into vuejs:master Jan 9, 2019
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

Successfully merging this pull request may close these issues.

3 participants