-
Notifications
You must be signed in to change notification settings - Fork 351
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
Support Connect RPC client #1157
Comments
Hi @StevenACoffman ! I'm not an expert on connect-rpc, but lately we do sit on top of In particular the REST APIs, of "just drop me the JSON with a header or two":
Seems easy to get supported in ts-proto, given this is basically what Twirp is/was, afaiu? I dunno, maybe a 1st pass would be do copy/paste the Twirp client? Not sure if that or NestJS would be a better starting place to copy/paste from; Twirp was the very 1st client that I wrote cough years ago, and probably basically doesn't get used, so maybe NestJS instead? But I feel like Twirp is closer in spirit to Connect, so still might be a better starting place. Would you be open to looking into this and submitting a PR? Happy to help review/poke around a bit if so. Thanks! |
I dug around a little and my original impetus for using ts-proto was to avoid using JavaScript classes (ick), but Connect-ES v2 now uses Protobuf-ES v2, which is now built around using plain typescript (javascript) objects: It looks like with protobuf-es-v2, and ts-proto using buf, there's a lot more convergence then there used to be. Independent of connect-rpc (and connect-es), it might be generally helpful to enumerate the points of convergence and any remaining points of divergence between newer ts-proto and protobuf-es-v2 |
Ah yeah, I kinda remember that going by, but hadn't deeply looked into their new v2 bindings. I agree it would be worth a readme entry/note with a short tldr of the two. Fwiw my assumption is that connect/protobuf-es-v2 will have very correct/conformant APIs (definitely their strong suit), now sans (Which, to their credit, afaiu connect/buf is trying to clean up all that fragmentation, and establish "the one way of doing things that just works", which is great, but the fragmentation cat is already out of the bag, and so I imagine ts-proto will always have a place in some stacks. 🤷 ) |
I would like it if ts-proto supported generating a connect-rpc client, the way it does for Twirp, grpc-web, grpc-js and nestjs are supported. Right now, using connectrpc requires us to abandon ts-proto and switch to protobuf-es.
connectrpc/connect-es#1016
The text was updated successfully, but these errors were encountered: