how does batching work?

My understanding is that batching basically combines multiple requests in a single network request, does this require any setup on my end? How does trpc know to wait for another request to batch it together?
Alex / KATT 🐱
Alex / KATT 🐱319d ago
Alex / KATT 🐱
Alex / KATT 🐱319d ago
HTTP Batch Link | tRPC
httpBatchLink is a terminating link that batches an array of individual tRPC operations into a single HTTP request that's sent to a single tRPC procedure.
Alex / KATT 🐱
Alex / KATT 🐱319d ago
the simple explanation is that we always wait 1ms before excuting any requests and then we combine them into one similar to the dataloader library if you're fmailiar with that
More Posts
Links vs MiddlewaresWhat is the difference between a middleware and a link? These two seems to behave the same?Setting up tRPC with Supabase and DrizzleHi! 😄 Is there someone that has any recommendations on how I should setup tRPC with Supabase Auth aRequests running multiple times after it's failingCannot read properties of undefined (reading 'trpc')I keep getting that when trying to make an api request with my next.js page. I am using the latest NDoes SSG / ServerSideHelpers allow for mutations in getServerSideProps Nextjs ?Hi, I have a use case where I send the user to a payment portal, and the payment portal can send theCan someone explain MiddlewareFunction?I am trying to create a custommiddleware.ts file and I would like some explanation on what goes intoHow do I get the queries and mutations list in v10?Hello, In tRPC v9 I can do: ``` const queries = Object.keys(appRouter._def.queries); const mutatiIssues with subrouters being treated as any on clientI have 3 sub routers, all with a hello query just returning an object with world. I'm using nextjs wStrange trpc typesHello, I just installed a fresh `trpc` project with `prisma` and `next`. I have a prisma schema suchIs there a version of tRPC v10 that works with Next 12?Hi, is there a version of tRPC that works with Next 12 and React 17? We want to incrementally adoptRunning TRPC on Vercel with custom serialization failsHi all, I'm having some difficulties with the serialization of my objects when I run on vercel. I'm How to prefetch data on the client into the cache?To simplify a bit, lets say I'm making an app that allows users to view a project. I have a top leve