You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: client subscriber gets an AsyncIterable #6868
On the vanilla client, being able to an AsyncIterable<T> from a subscription in order to make it compliant with the streamedQuery from tansatck query.
Currently @trpc/tanstack-react-query support for useSubscriptions but implementing the AsyncIterable on the vanilla client would provide the feature to vue user as well.
Describe the solution you'd like to see
Implement the client.myProcedure.subscribe().iterator(): Promise<AsyncIterable<T>>
Seconding either this and/or returning the node-basic ReadableStream - running into this dealing with the Vercel ai sdk, which expects more standard streaming objects.
Hi! Taking this over since there hasn't been movement for a while. I'll implement an AsyncIterable API for the vanilla client subscriber (building on the existing observableToAsyncIterable helper) and open a PR.
This issue has been locked because we are very unlikely to see comments on closed issues. If you are running into a similar issue, please create a new issue. Thank you.
Activity
zackdotcomputer commentedon Sep 10, 2025
Seconding either this and/or returning the node-basic
ReadableStream- running into this dealing with the Vercelaisdk, which expects more standard streaming objects.hugo082 commentedon Sep 25, 2025
What about providing the following API?
Currently the server package defines the following internal helpers:
observableToReadableStreamobservableToAsyncIterableevolvomind commentedon Feb 19, 2026
Hi, @KATT
May I work on this issue?
tarikermis commentedon Aug 9, 2026
Hi! Taking this over since there hasn't been movement for a while. I'll implement an
AsyncIterableAPI for the vanilla client subscriber (building on the existingobservableToAsyncIterablehelper) and open a PR.KATT commentedon Nov 2, 2026
🤖 In v12, the vanilla client's
subscribe()returns anAsyncIterable, so you can writefor await (const post of client.onPost.subscribe()) { … }or hand it to anything that takes one, such as TanStack'sstreamedQuery. https://v12.trpc.io/v12/docs/subscriptions/overview. v12 isn't released yet and there's no ETA.feat(client): make subscribe() without callbacks return an async iter…
github-actions commentedon Nov 6, 2026
This issue has been locked because we are very unlikely to see comments on closed issues. If you are running into a similar issue, please create a new issue. Thank you.