trpc-playground icon indicating copy to clipboard operation
trpc-playground copied to clipboard

Bring back option turning request batching off

Open Christopher-Stevers opened this issue 11 months ago • 1 comments

I noticed previous versions had an option to batch requests, could you add that back to 1.0.0.

Christopher-Stevers avatar Mar 07 '24 19:03 Christopher-Stevers

The batching option was removed in this commit, but it seems like a httpBatchLink was added here. So if you want to batch requests you should be able to do this:

await Promise.all([
  trpc.getGreeting.query({ name }),
  trpc.getFarewell.query({ name }),
])

Hopefully this helps.

MatsDK avatar Mar 12 '24 18:03 MatsDK