Could you add QueryObserver export?
See original GitHub issueSo, I am in a situation where I need to use query result outside a composable function or setup. According to the QueryObserver api, the way to achieve that would be -
import { QueryObserver } from 'vue-query';
import { queryClient } from 'myQueryClient';
const classesObserver = new QueryObserver(queryClient, { queryKey: ['classes', dependencies] });
const classesData = classesObserver.getCurrentResult().data;
Now, difference between using query observer’s getCurrentResult vs using query client’s getQueryData/getQueryState would be query observer will return the actual data which is cached along with its transformation done using select option. Whereas, queryClient’s getQueryData/getQueryState will return just the response data.
So, could you possibly add QueryObserver to the vue-query exports?
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Unable to observe cache with QueryObserver (v3) #3292
I 'm trying to observe, from a component, data fetched and cached by another component, but I can't make it work. Upon authentication,...
Read more >Migrating to React Query 3 - TanStack
You must create your own via new QueryClient() or new QueryCache() (which you can then pass to new QueryClient({ queryCache }) ) ...
Read more >What's new in React Query 3 - LogRocket Blog
In this post, you can learn what React Query is and what new features have ... Create a client const queryClient = new...
Read more >Export a database object to another Access database
You can export a table, query, form, report, macro, or module from one Access database to another. When you export an object, Access...
Read more >Exporter | Querybook
To ensure Querybook more generalizable, all exporters are not included by default. If you want to add an exporter, please do so through...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah i have another registry setup, but how do i update then?
Edit: My other registry took time to update its list
Works for me, maybe you have another registry set-up?