serializeQueryArgs
+ merge
combo does not allow actually fetching new data
#2684
Milestone
serializeQueryArgs
+ merge
combo does not allow actually fetching new data
#2684
Pasting from #2620 (reply in thread) , discussion with @gordon-eliel :
The sandbox at https://codesandbox.io/s/merge-query-sandbox-4fmws8?file=/src/Pokemons.tsx has
serializeQueryArgs
+merge
on the same endpoint, but it doesn't actually fetch more data when you change the page.If you look at https://app.replay.io/recording/rtk-190-alpha-merge-pagination-not-refetching--13800b41-6680-402f-a564-a80a280a74d7?point=9735556619499725871884967098715939&time=4275&hasFrames=false , you can see what's happening:
stableArg
value, and dispatchesinitiate()
againqueryThunk
...condition
check inside ofqueryThunk
ends up retrieving the existing cache entry for the same cache key, sees that it's already in a"fulfilled"
status, and bails out without trying to fetch the data.That makes sense, conceptually. The question is what to do about it.
Here's the current
condition
logic for reference:The question is what to do about this. Should we mark it as "forced" if the
stableArg
has changed or something?The text was updated successfully, but these errors were encountered: