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 |
Use context.queryDeduplication if provided. Similar to #6261, but for AC2 instead of AC3.
|
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.