getQueryData returning undefined
Using the query keys factory with the query options API that @TkDodo
wrote about in his blog, I'm trying to update the product list cache when editing a product.
Query Keys:
The final query key looks like this:
When I try to do
When I try with
Does getQueryData not return all matching queries? Only exact ones?
Using
Query Keys:
The final query key looks like this:
['products', 'list', {page: 1, per_page: 20}]When I try to do
queryClient.getQueryData(productQueries.list().queryKey), it's returning undefined.When I try with
lists(), it also returns undefined. Does getQueryData not return all matching queries? Only exact ones?
Using
invalidateQueries works without having to pass the filters inside the query key.