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
However, I've found that the refetching no longer works when initialized this way. I've verified that the tags get invalidated, but no new query gets fired off.
const{ refetch }=useGetPost({id: "foo"});
...
// does not work when the query is hydrated by `upsertQueryEntries`refetch()
This is unexpected because this is a different behavior than the mapped-upsertQueryData behavior, and feels like a bug- I've connected a component via a useQuery hook, so the subscription should be valid.
The text was updated successfully, but these errors were encountered:
JacobJaffe
changed the title
upsertQueryEntries does not allow refetch behavior
RTK 2.0 Migration: upsertQueryEntries does not allow refetch behavior
Nov 18, 2024
Hi, I've been testing out migrating from
upsertQueryData
toupsertQueryEntries
.Before:
After:
However, I've found that the refetching no longer works when initialized this way. I've verified that the tags get invalidated, but no new query gets fired off.
This is unexpected because this is a different behavior than the mapped-upsertQueryData behavior, and feels like a bug- I've connected a component via a
useQuery
hook, so the subscription should be valid.The text was updated successfully, but these errors were encountered: