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
{{ message }}
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
where currPage is a React local state variable. It will get updated when user paginates
Intended outcome:
When currPage=1, new data is fetched, when currPage=2, new data is fetched... When user paginates to the previous page (page 1), because query with currPage=1 is already fetched, it should just read the cache
Actual outcome:
When user paginates from page 1 to page 2, new data for page 2 is fetched, however, when user paginates back to page 1, cache is not read, data is still displayed for page 2
Consider the following queries
where
currPage
is a React local state variable. It will get updated when user paginatesIntended outcome:
When
currPage=1
, new data is fetched, whencurrPage=2
, new data is fetched... When user paginates to the previous page (page 1), because query withcurrPage=1
is already fetched, it should just read the cacheActual outcome:
When user paginates from page 1 to page 2, new data for page 2 is fetched, however, when user paginates back to page 1, cache is not read, data is still displayed for page 2
How to reproduce the issue:
Versions
Issue is also reported in Apollo client GitHub: apollographql/apollo-client#5659
The text was updated successfully, but these errors were encountered: