Since September, we have been unable to publish because every URL under `PUT registry.npmjs.org/@trpc/` is being blocked by a @npmjs @Cloudflare WAF. You can even prove it locally, they've just wholesale blocked our npm scope.
Support have not yet done anything to help.
anyone from @npmjs that can have a look at request #4870687 from me?
nick tried first but got a non-response
tRPC.io π§ββοΈ retweeted
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
tRPC.io π§ββοΈ retweeted
On the side I'm setting up fumadocs (by @fuma_nama) by piping @colinhacks's @trpcio routers through `trpc/openapi` (alpha) to get well designed auto-generating docs.
Some rough edges but working well so far.
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
And it's out, tRPC 11.16.0 comes with updated OpenAPI support to support cyclic types, and lazy zod schemas!
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
Itβs here!
xitter.cf/trpcio/status/20351368β¦
tRPC.io π§ββοΈ retweeted
TRPC streaming improvement
New `streamHeader` option switches from the custom `trpc-accept` header to the standard `Accept` header for JSON lines (jsonl) streaming
Standard headers don't trigger CORS preflight, that means one less round-trip for cross-origin requests
tRPC.io π§ββοΈ retweeted
this was a lot of fun to make
one of the reasons we keep out shipping everyone:
trpc
crazy how good it is, it feels like what graphql should have been in a way
tRPC.io π§ββοΈ retweeted
I'm excited to release fate, a modern data client for React & tRPC
Check out the release blog post ‡
tRPC.io π§ββοΈ retweeted
Weβre proud to sponsor @trpcio by @alexdotjs β end-to-end typesafe APIs that let you move fast without breaking things β‘π‘οΈ
Zero dependencies, full TypeScript inference, no build step. Just pure DX magic.
Supported by #Mobb β fixing code so you donβt have to. #tRPC #TypeScript #FullStack #OpenSource #AIDeveloper #VibeCoding


























