keep ObservableQuery initiated from useQuery inactive before first subscription#12285
keep ObservableQuery initiated from useQuery inactive before first subscription#12285
ObservableQuery initiated from useQuery inactive before first subscription#12285Conversation
🦋 Changeset detectedLatest commit: 0a85d41 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Docs preview has no changesThe preview was not built because there were no changes. Build ID: 5a482ab3fda914a46fea4fb4 |
✅ Deploy Preview for apollo-client-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
…efore first subscription
507624d to
ff3c4bd
Compare
commit: |
size-limit report 📦
|
|
There is one point I'm a bit concerned about, and that's this: apollo-client/src/core/QueryManager.ts Lines 1793 to 1798 in dcc6d5f That means that if we delay registration like this and for whatever reason |
jerelmiller
left a comment
There was a problem hiding this comment.
I'd be ok with trying this out.
Co-authored-by: Jerel Miller <jerelmiller@gmail.com>
Co-authored-by: Jerel Miller <jerelmiller@gmail.com>
ObservableQuery initiated from useQuery inactive before first subscription
Triggered by this Discord discussion
Generally, creating a
ObservableQueryviawatchQueryis already a side effect and adds the query toQueryManager.queries- and it will only be removed if it is subscribed and then unsubscribed.There might be a number of edge-case scenarios where that is not the case, so this is an attempt from a different angle to solve this problem.