You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In cases where the same query is executed twice in a short period of time, add an opt-in way to deduplicate the query. For an example, given the below scenario
// prefetch when initializing the app
apolloClient.query(myQuery).fetchPolicy(CacheFirst).execute()
// the main screen requests the data when the app starts
apolloClient.query(myQuery).execute()
It'd be nice to avoid the extra network roundtrip if the two request come at the same time. This could be done with an interceptor that "remembers" the requests in flight and avoids a round trip if one is already pending.
Open question: Do we want to potentially dedup cache reads as well. At first sight, it looks more complicated but maybe it's only a matter of inserting the interceptor before/after the cache interceptor.
The text was updated successfully, but these errors were encountered:
In cases where the same query is executed twice in a short period of time, add an opt-in way to deduplicate the query. For an example, given the below scenario
It'd be nice to avoid the extra network roundtrip if the two request come at the same time. This could be done with an interceptor that "remembers" the requests in flight and avoids a round trip if one is already pending.
Open question: Do we want to potentially dedup cache reads as well. At first sight, it looks more complicated but maybe it's only a matter of inserting the interceptor before/after the cache interceptor.
The text was updated successfully, but these errors were encountered: