PeformP
tRPC11mo ago
Peform

super quick question about prefetching

Is it best to use a promise.all when using multiple instances of prefetch to fetch data on the server to ensure that both queries are running at the same time? From the looks of it trpc handles this automatically so it is unneeded?
    await Promise.all([api.guild.get.prefetch({ guildId }), api.application.getList.prefetch({ guildId })]);
Was this page helpful?