-
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
Dispose of the queryRef
when changing to previously used variables to allow the InMemoryCache
to determine cached behavior
#11045
Conversation
🦋 Changeset detectedLatest commit: ed724fb 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 |
queryRef
when changing variables to allow the InMemoryCache
to determine cached behaviorqueryRef
when changing to previously used variables to allow the InMemoryCache
to determine cached behavior
size-limit report 📦
|
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.
Generally approved - I left some comments with suggestions, but I'm fine with or without them.
…se` method on `queryRef`.
When changing variables to a previously used set of variables, the fetch policy is now correctly honored. Previously when using a fetch policy of
network-only
orno-cache
, switching to previously used variables would return a cached result and would require arefetch
to get data from the network again.Now query refs are disposed of when changing variables so that switching back to previously used variables will either return from the
InMemoryCache
or will execute a network request to load from the server.Checklist: