Skip to content

upsertQueryData and transformResponse typing #4904

Answered by markerikson
molhanec asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, upsertQueryData does the entire "transform response" + "merge" series of steps. You can think of it as just replacing the async request portion of the RTKQ request/response/process sequence.

The newer upsertQueryEntries method does not call transformResponse, and the values need to match the exact final shape that gets stored in the cache entry. That would probably work better for you in this case.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@molhanec
Comment options

Answer selected by molhanec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants