getQuery for key with all possible ids
Say i fetch todo like
['todo', { id}] but while getting the todo data I want to get for all possible Id's.
In a way expectation is to do getQuery(['todo']) to get todos for id1, id2.....
Is there an existing functionality to achieve the same?3 Replies
other-emerald•3y ago
queryClient.getQueriesData
ratty-blush•3y ago
Why not using the select option to get just the id's from the 'todo' key?
xenial-black•3y ago
Because the select function enables you to select a slice of data from a query. They want to get the data for multiple queries, hence
getQueriesData