-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
ObservableQuery and QueryInfo stays forever on skip:true #7205
ObservableQuery and QueryInfo stays forever on skip:true #7205
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to keep tearDownQuery
private, but otherwise I approve of this solution. Thanks @kamilkisiela!
Follow-up to #7205, per my comment in #7254: #7254 (comment) Instead of tearing down this.currentObservable only when this.getOptions().skip is true in QueryData#removeQuerySubscription, I split the tear-down functionality into a separate private method (QueryData#removeObservable), which is now called everywhere removeQuerySubscription is called, except in resubscribeToQuery, where we specifically want to preserve this.observableQuery.
Follow-up to #7205, per my comment in #7254: #7254 (comment) Instead of tearing down this.currentObservable only when this.getOptions().skip is true in QueryData#removeQuerySubscription, I split the tear-down functionality into a separate private method (QueryData#removeObservable), which is now called everywhere removeQuerySubscription is called, except in resubscribeToQuery, where we specifically want to preserve this.observableQuery.
Don’t mind this comment, just leaving this for future me: I came across this PR because I wanted to understand why we did |
Issue #7206
Cleanup logic is done on
unsubscribe
but whenskip: true
the component never starts a subscription.I got the bottle over 3 years ago when Apollo was in very early stage, thank you once again :)