Skip to content
Discussion options

You must be logged in to vote

In this way, the api is called parallelly. However, this method seems to be a temporary measure and not an elegant one. Is there a better way to achieve my goal?

I would like to get support for suspense on useQueries, but it's a long standing, open issue. What I think would need to happen is:

  • go through the useQueries array and try to find all queries that have suspense on
  • trigger a fetch for all non-suspense queries, e.g. with queryClient.prefetchQueries
  • throw a new Promise with Promise.allSettled that contains the promises of all the queries created with observer.fetchOptimistic

I think what should happen then is that react suspends until all suspense queries have finished, while th…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by p-iknow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants