how can I invoke a trpc call inside a nested function?
I know it isn't directly possible. But is there a workaround?
Solution
const values = [1, 2, 3]
const tasks = values.map((elem) => client.something.something2.query(elem));
const result = await Promise.all(tasks)