tRPCttRPC
Powered by
PeformP
tRPC•12mo ago
Peform

super quick question about prefetching

Is it best to use a promise.all when using multiple instances of
prefetch
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 })]);
    await Promise.all([api.guild.get.prefetch({ guildId }), api.application.getList.prefetch({ guildId })]);
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Security question about tRCP
FearlessSlugFFearlessSlug / ❓-help
3y ago
Question about trpc revalidation method
dotdotdotDdotdotdot / ❓-help
3y ago
How to handle 500s from prefetching
JDJJD / ❓-help
5mo ago
Pass headers when prefetching using helpers
NeoBeanNNeoBean / ❓-help
3y ago