-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
feat (QueryClient): getQueriesData for matching multiple queries #2513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat (QueryClient): getQueriesData for matching multiple queries #2513
Conversation
Similar to setQueriesData, a "get" version to fuzzily return multiple matching queries.
|
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/tannerlinsley/react-query/DXGhKGkWLaRanfG1DADhp5gTe4QP |
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 0aa2ab6:
|
the batching is only necessary in setQueriesData because setQueryData is called under the hood therefore, it is not needed here.
TkDodo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please also add documentation to the queryClient API docs: https://react-query.tanstack.com/reference/QueryClient
TkDodo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great, let's remove this one line please and then we can 🚢 🇮🇹
|
🎉 This PR is included in version 3.19.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
oh damn, there was a blank after |
Similar to
setQueriesData, a "get" version to fuzzily return multiple matching queries.Based the code off of
setQueriesDataandgetQueryData- couldn't get typing quite right without the assertion toTDatain the map. I'm sure there's a better way to go with that.Hope this at least points in the right direction!