Replies: 4 comments 13 replies
-
I usually only optimistically update the one view that the user currently sees, and solve the rest with query invalidation, which is fuzzy. |
Beta Was this translation helpful? Give feedback.
-
I just encountered the same problem. I have a It would be nice if we had something like |
Beta Was this translation helpful? Give feedback.
-
I ran into the same issue, and seemed solved it with a hook as follows:
It makes use of It would be nice to have something like a bit more supported out of the box though. There are good suggestions in this thread. |
Beta Was this translation helpful? Give feedback.
-
You can use setQueriesData to update multiple cache entries synchronously at the same time, you can filter the cache entries by partial keys to update the ones you need I ran into the same issue, and seemed to solve it with a hook as follows: `export const useCreateEquipment = () => {
}); |
Beta Was this translation helpful? Give feedback.
-
I'm displaying a list of items that can be sorted by items' attributes. This leads to multiple cache keys for different sort values. When making mutations to items, e.g. change the name of the item, my backend doesn't synchronously update the items with those changes (it can take a few seconds) so I need to optimistically update the items across all of the different cache keys. I've tried
setQueryData
but that doesn't seem to support query filters. Any other ideas on how to achieve this?Beta Was this translation helpful? Give feedback.
All reactions