is there a way to send a streaming response
I'm not talking about batching multiple requests, but more of a one-way websocket-like channel between the server and client using HTTP streaming.
3 Replies
just found https://github.com/trpc/trpc/pull/4911
GitHub
feat: add experimental support for iterators and streams by KATT · ...
Closes #4477
Closes #1853
tl;dr is that queries and mutations can return generator functions, and you can "just" use them
trpc/packages/tests/server/tupleson.test.ts
...
trpc/packages/tests/server/tupleson.test.ts
...
hopefully this gets finished at somepoint
it's not much, but pledged $20 to the polar.sh fund for #4477
Yep, that's likely to come later in v11 or in v12 if it needs breaking changes
Funding will definitely speed it along!