Is there a chance to reload part of a query only?
Hi, I am using react-query to get data for tables. As almost any data can potentially become a column in those tables, the initial query already loads all details for every row. For example I got a query with the key ['users']. Now I want to reload the user with id 10. I wish I could do something like querying for ['users', 10] and see the cached list for ['users'] updated. Is there any way to tell the ['users'] query how to match sub-query keys?
2 Replies
unwilling-turquoise•2y ago
No
But you can do queryClient.setQueryData if you have that data
like-goldOP•2y ago
Ok, that's an easy and definitive answer 🙂