sachinraja / trpc-playground

playground for running tRPC queries in the browser
MIT License
281 stars 19 forks source link

Bring back option turning request batching off #56

Closed Christopher-Stevers closed 3 months ago

Christopher-Stevers commented 4 months ago

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

MatsDK commented 4 months ago

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.