useQueries combine - combining query results
Hi all.
Not sure if I'm missing something in the docs, so I wanted to ask here if anybody has done what I'm trying to achieve with useQueries.
I fire 2 queries in the useQueries and I would like to combine the results from the 1st one with the results with the 2nd one ( merging 2 api calls into one object ).
The thing is that I need the data from both to find the correct object from the second using an ID from the first.
Now I was expecting that the result array is both query results but I guess I'm missing something.
I guess I'm playing around with the possibilities of useQueries and combine
Or should I simply fire them dependantly and merge after?
Cheers.
Not sure if I'm missing something in the docs, so I wanted to ask here if anybody has done what I'm trying to achieve with useQueries.
I fire 2 queries in the useQueries and I would like to combine the results from the 1st one with the results with the 2nd one ( merging 2 api calls into one object ).
The thing is that I need the data from both to find the correct object from the second using an ID from the first.
Now I was expecting that the result array is both query results but I guess I'm missing something.
I guess I'm playing around with the possibilities of useQueries and combine
Or should I simply fire them dependantly and merge after?
Cheers.