-
-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: RxJS based tRPC client #379
Comments
Right now it relies on a hard coded httpBatchLink, so no web socket support is definitely not a blocker. In regards to the bugs, I would suggest to create a branch with the implementation and we can work through them during the code review process? That way we already have the code in the analog context and within the repository, which should make it a little easier to debug. That's what I am thinking at least! @brandonroberts what do you think? |
Cool project! That sounds good to me. We should consider support/integration for Angular Signals also for the future. |
Thats a really good point! I would love something like the react hooks DX provided by tRPC directly. Maybe something like the suspensify method described in this article would be cool? https://marmicode.io/blog/managing-rxjs-traffic-with-signals |
Sounds good to me @goetzrobin. I will start implementing a pr. yeah. good point @brandonroberts. This would probably be a second client.
|
This commit introduces a rxjs version of the tRPC client. Instead of returning a Promise, the client now returns observables for all operations. Therefore it behaves similar to the built in Angular HttpClient. closes analogjs#379
Which scope/s are relevant/related to the feature request?
trpc
Information
Add a RxJS compatible trpc-client to analogjs.
I would like to contribute the functionality of ngx-trpc to Analog's trpc implementation.
@goetzrobin pointed out on reddit [thread] that it would be a good fit and I also think that you would get the most benefit out of ngx-trpc by using it in a meta framework like Analog.
Before starting with the implementation I would like get feedback on a few things.
tRPC client websocket subscribe
trpc-client subscribe method for subscribing to websockets is currently not supported. Would this be required?
some bugs to fix
I still get some warning running the custom trpc client and would like to ask you if you have any ideas fixing this.
Here is an startet example with the error. https://github.com/Dafnik/ngx-trpc-nx-fastify-example
When all questions are cleared I can start creating a pull request.
If you have any other thoughts or questions just hit me up.
Cheers!
Describe any alternatives/workarounds you're currently using
No response
I would be willing to submit a PR to fix this issue
Cross-referencing: #197
The text was updated successfully, but these errors were encountered: