tRPC / React query noobish question

Hi, I have this Query:

const { data: cardSetQuery, refetch: cardSetQueryRefetch } =
api.example.getCardSet.useQuery(
{
text: data?.id || "",
},
{
enabled: false,
}
);

Is there a way to do something like this where I want to update MULTIPLE objects with my query result?

I essentilly have a dropdown and I want to add icons to the text, but for that I need to query to URLs from another TRPC call.. how do I merge those 2 together?

Ideally I would need something like this:

suggestion.forEach(card => {
  const responseUrl = useQuery(card.id)
  card.url = responseUrl
})
Was this page helpful?