-
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
fix: queryDeduplication from context #6261
fix: queryDeduplication from context #6261
Conversation
Looking into passing this for context per query rather than disabling it client wide. Do we know what the status on getting this merged? Thanks |
Looking to disable deduplication per request on hooks and refetch queries. Per documentation
Do we know the status on when this will get merged? Thanks |
99b7b87
to
9b0271f
Compare
Use context.queryDeduplication if provided. Similar to #6261, but for AC2 instead of AC3.
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.
Heads up: we're not quite ready to publish |
Following up: we just published |
Overview
As mentioned in this article, https://www.apollographql.com/docs/react/networking/network-layer/#query-deduplication, if we want to override our default queryManager's queryDeduplication property, we should pass to request's context { queryDeduplication: boolean }.
The problem
It seems like getObservableFromLink did not handle the property from the context and just passed { forceFetch: [arg queryDeduplication / default queryDeduplication] }
The solution
Make getObservableFromLink's deduplication smarter
Issues
apollographql/apollo-link#517
#4150
https://github.com/apollographql/apollo-feature-requests/issues/40
Edit
It seems like tests are failing because of the use of private class properties.
Those properties were changes and that's why they need to be tested.