←
tRPC.io 🧙‍♂️640 posts
tRPC.io 🧙‍♂️ avatar

tRPC.io 🧙‍♂️

@trpcio

Move Fast and Break Nothing. E2E typesafe APIs without schemas nor build steps. 🌟 35,000+ 💬 trpc.io/discord 🤓 github.com/trpc/trpc

◷ Joined January 2021▧ 37 Photos and videos
tRPC.io 🧙‍♂️ avatar
tRPC.io 🧙‍♂️@trpcio·Oct 28

After a brief hiatus while npm fixed their WAF... tRPC v11.22 is out, now with typesafe procedure errors! Using this API, @trpc/openapi will also emit accurate error responses

Post attachment
Nick avatar
⟳ tRPC.io 🧙‍♂️ retweeted
Nick@NckLcs·Oct 2

tRPC can’t publish new package versions for at least a week now, and it looks like an @npmjs Cloudflare WAF is blocking our @github actions from publishing on a vanilla GitHub runner Anyone out there who can help?

Chris Cook avatar
⟳ tRPC.io 🧙‍♂️ retweeted
Chris Cook@zirkelc·Jul 1

How is @trpcio `httpBatchLink` able to fold multiple procedure calls into ONE batched call? Like how does `Promise.all([a.query(), b.query()])` end up in only a single HTTP request It's a pure timing trick built with a simple dataloader: Every call you make in the same tick gets pushed into one shared buffer. Only the very first call schedules a `setTimeout(dispatch)` Because `setTimeout` is a macrotask, it only runs after your synchronous code finishes. So by the time `dispatch` fires, all the calls from that tick are sitting in the buffer together `dispatch` then joins them into one request (`a,b,c`), sends it, and resolves each call's individual promise from the response array The neat part: `Promise.all` isn't special. Anything called in the same tick batches. The only thing that breaks it is an `await` in between, which yields to the event loop and flushes early I think this is a really elegant design: using the language's semantics for batching instead of exposing an explicit API

Post attachment
tRPC.io 🧙‍♂️ avatar
tRPC.io 🧙‍♂️@trpcio·Mar 28

tRPC OpenAPI support isn't just about generating clients. You can use @oasdiff on your own API to check for breaking changes or generate changelogs too

Post attachment
Nick avatar
⟳ tRPC.io 🧙‍♂️ retweeted
Nick@NckLcs·Mar 28

And it's out, tRPC 11.16.0 comes with updated OpenAPI support to support cyclic types, and lazy zod schemas!

Post attachment
Nick@NckLcsMar 27

Planning to drop an update to @trpcio OpenAPI support this weekend Removing the type depth limit and adding support for cyclic types, which was an initial limitation of the alpha

Nick avatar
⟳ tRPC.io 🧙‍♂️ retweeted
Nick@NckLcs·Mar 27

Planning to drop an update to @trpcio OpenAPI support this weekend Removing the type depth limit and adding support for cyclic types, which was an initial limitation of the alpha

tRPC.io 🧙‍♂️ avatar
tRPC.io 🧙‍♂️@trpcio·Mar 20

Do submit issues and corrections! This is a near doubling of our documentation surface, only made possible by AI, and impossible to deeply critique as a whole. It will very likely have problems to iron out