sachinraja / trpc-playground

playground for running tRPC queries in the browser
MIT License
294 stars 22 forks source link

Bring back option turning request batching off #56

Closed Christopher-Stevers closed 7 months ago

Christopher-Stevers commented 8 months ago

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

MatsDK commented 8 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.