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
I copied the merge function from offsetLimitPagination so that I can add some console.log.
After clicking "fetch more" multiple times, incoming will be an empty array when there are no items left, and the data returned from useSuspenseQuery becomes an empty array instead of the cached array which is the value returned in the merge function.
Thanks for the reproduction! I believe this is a similar issue as #11642. I'll keep this open so that I can test a fix against this reproduction as well. Appreciate the report!
I changed my mind, I'm going to track this over in #11642 since the reproduction here looks similar to the one in that issue. Watch that issue for updates on this bug. Thanks!
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Client usage and allow us to serve you better.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
For general questions, we recommend using StackOverflow or our discord server.
Issue Description
I am trying to do pagination with
useSuspenseQuery
andtypePolicies
.I've made a reproduction in stackblitz to better describe the issue: https://stackblitz.com/~/github.com/geniusgordon/stackblitz-starters-8ms1yj
(The example is forked from #11315)
I copied the
merge
function fromoffsetLimitPagination
so that I can add someconsole.log
.After clicking "fetch more" multiple times,
incoming
will be an empty array when there are no items left, and the data returned fromuseSuspenseQuery
becomes an empty array instead of the cached array which is the value returned in themerge
function.I tried
useQuery
as well, and it works normally.Link to Reproduction
https://stackblitz.com/~/github.com/geniusgordon/stackblitz-starters-8ms1yj
Reproduction Steps
@apollo/client
version3.9.7
The text was updated successfully, but these errors were encountered: