Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Personally, I find gRPC-Web very attractive but the current state of TypeScript/JS code-gen is very confusing and lacking.

I would love something like https://orval.dev for gRPC-web. Have I missed something or is it just early to expect it?

I tried a few libraries but couldn't get them to work or would generate unappealing results. I believe I'm hitting this issue with my local experiments. https://github.com/grpc/grpc-web/issues/535

UPDATE: I was able to get something working with these from a ReactJS app!

Server: https://learn.microsoft.com/en-us/aspnet/core/grpc/grpcweb

Client TS Gen: https://github.com/timostamm/protobuf-ts



Ah you should check out https://github.com/bufbuild/protobuf-es which feels great so far. Then there's connect by the same buf people but it has a grpc-web option https://connect.build/docs/web/getting-started/. The amount of code generated is also tiny, which I love.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: