Let's say I load a list of entities using the useQuery hook of React Query. After updating one entity of this list I don't want the whole list to be reloaded, just the data for this specific entity.
How could you implement this behaviour using the useQuery hook? Is it possible to specify that React Query should not reload the whole list and just reload the data for this specific entity?
Thank you for your help.
You can use queryClient.setQueryData in the function onSuccess
and update your entity on the cache that contains all entity.