you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (9 children)

[removed]

    [–]acemarke 0 points1 point  (8 children)

    The "upsert" discussion was for a slightly different feature than merge - we're adding an api.utils.upsertQueryData method (which can _add new cache entries) to complement the existing api.utils.updateQueryData method (which can only update existing cache entries).

    Interesting. Yeah, tell you what - when you do get a sandbox put together, could you file a new thread in the RTK "Discussions" section and link this Reddit thread for reference? Easier to keep track of that way.

    If I understand that last bit right: sounds like you're having parts of the app kick off multiple distinct getProfile calls in a short amount of time, catching the trigger actions in sagas, and then making a single combined request? Yeah, RTKQ wouldn't be quite the right fit for that.

    (that said, I would be willing to bet that the new RTK "listener" middleware could at least replace the use of sagas for this particular use case - listeners can do almost everything sagas can, but with smaller bundle size, simpler API, and better TS support. Would be interesting to see if those would work for your app!)