code-gen(react-query): add .fetch
, .invalidate
, .prefetch
etc on generated hooks
#1879
Labels
prio 2
Issues with a lower prio, mostly features
Working with the generated react-query hooks and api functions outside of the render tree is currently relatively verbose;
this can be shortened most of the time in something like;
This improves the following cases;
apiXxYY
functionuseUserSettings.queryKey()
to find the api call that is prefetched.We can generate a few helpers to do this for the user;
Usage in Next.js SSR would look something like;
The text was updated successfully, but these errors were encountered: