upsertQueryData
and transformResponse
typing
#4904
-
Hello all. Myabe you can help me. I don't understand Is there a method to put the value to the cache directly, i.e. without going thru |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Yes, The newer |
Beta Was this translation helpful? Give feedback.
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 calltransformResponse
, 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.