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
@MaximKondratev You ought to be able to use upsertQueryEntries to prefill the cache entry for an infinite query endpoint per that draft PR, but it's up to you to make sure the data ({pages, pageParams}) is structured correctly.
I am trying to implement basic infinite scrolling using useLazyQuery + the combination of
serializeQueryArgs
,merge
andforceRefetch
.But I also have initial data for the first page and I want to upsert it with upsertQueryData on store setup:
And then render it with lazy query
I expect lazy query to return that upserted data for first render, but it is undefined and status is
uninitialized
.While I was writing this I also found #4213 where it states this behavior is intended. But I'm not sure why query does not read any data if it exists.
Then I found Infinite Query draft #4738 and decided to submit the issue to ask for initial data support if possible.
The text was updated successfully, but these errors were encountered: