Skip to content
Discussion options

You must be logged in to vote

ahh I see, someone on discord told to await the first query and promise.all all other dependencies

  const items = await queryClient.ensureQueryData(getItemsQuery)
  const promises = []

items.forEach(item => {
  const opts = getGroupsByIdQuery('somethingdynamic')
  promises.push(queryClient.ensureQueryData(opts))
})

await Promise.all(promises)

discord link: https://discordapp.com/channels/719702312431386674/1256502793636806740/1256512728130916384

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@CHE1RON
Comment options

@0xMALVEE
Comment options

@CHE1RON
Comment options

@0xMALVEE
Comment options

Answer selected by CHE1RON
@CHE1RON
Comment options

@CHE1RON
Comment options

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