Set query data for query with nested array query key
I have a query with
When I do
it works fine (although I get queries I dont want aswell), but when I do:
Then it doesnt update for my query, it does not seem able to match the query keys.
I have confirmed that the query key is
Could it be a problem that the element in the querykey param is an array and not a primitive?
I am probably doing something trivial thing wrong
Any help is appreciated!
queryKey: ['foo', ['bar']] which I want to update the query data for.When I do
queryClient.setQueriesData(['foo'], ...)it works fine (although I get queries I dont want aswell), but when I do:
queryClient.setQueriesData(['foo', ['bar']], ...)Then it doesnt update for my query, it does not seem able to match the query keys.
I have confirmed that the query key is
['foo', ['bar']] by printing the queryClient in the browser console and looking at the queries. Could it be a problem that the element in the querykey param is an array and not a primitive?
I am probably doing something trivial thing wrong