Repository navigation
New link architecture - #1366
Conversation
|
Hi @KATT! This is very interesting, and I'm very flattered you've been inspired by Rx to take this approach! That said, I would strongly advise against using a reinvented observable here. Especially if you're exposing it as a public API. RxJS is:
Apollo GraphQL is also looking into moving over to use RxJS for these reasons. Not having dependencies for the sake of not having dependencies may be a mistake here. It's more likely to add weight than remove any, given that the RxJS implementation won't be much larger (if at all), and anyone that is already using RxJS (downloaded 31M times this week) will end up paying the cost of your implementation. At the very least, if you do decide to go with your own observable implementation, please don't use I'm happy to pair with you on this if you'd like. |
|
You're making many good points, @benlesh, I'm going to let this marinate a bit.
100% will do.
Extremely generous offer. I think I can swap them around in a matter of minutes, unless the swap showcases some underlying issues 😅 |
# Conflicts: # packages/react/src/internals/context.tsx # yarn.lock
|
Will merge this for now and come back to it later. This will be part of next major release which isn't expected for another month or so anyway. #1420 |
|
This pull request has been locked because it had no new activity for 30 days. If you think, this PR is still necessary, create a new one with the same branch. Thank you. |
New link architecture
next()observable - https://www-git-katt-observable-new-trpc.vercel.app/docs/links#creating-a-custom-linkTRPCClient{ context, data }to links that can add metadata (like the originalResponse) tosetupTRPC()method topackages/nextto simplify setup - https://www-git-katt-observable-new-trpc.vercel.app/docs/nextjs#3-create-trpc-hooksWhat it (hopefully) enables
@trpc/react-lite-package that doesn't depend onreact-querywhere each feature is composable by a link. This is not the goal in itself, but it's good that the architecture now (should) allow it.react-query@trpc/clientOpen questions
next()-call in a link maybe be calledforward()instead to not to confuse with observables' next concept?TRPCResponseError- might work easier with things like retryNotes from @KATT
Q&A
thisin JS and try to avoid it all cost.observabletonew Observable()-factory fnErrorsHappy to organize a community call / 1on1 Zoom call for anyone interested in helping out.