13 Replies
I only want to call the download endpoint on clicking download button. and I don't need the functionality to cache and auto refetch.
something like
Why not make it a mutation
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Is that recommended?
I think it does not matter as long as it gets the work done
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Yeah since it seems like you don't want it to fetch once link exists right?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I did. but its gets complicated down the road.
simple and clear. Thanks.. @awexis
Dependent Queries | TanStack Query Docs
Dependent (or serial) queries depend on previous ones to finish before they can execute. To achieve this, it's as easy as using the enabled option to tell a query when it is ready to run:
Here is how you would do it if you want it to be like "once link exist fetch the data" for the future
Glad it helped!
have used this before, easy and useful
Yup that's what the link does :)