improbable-eng / grpc-web

gRPC Web implementation for Golang and TypeScript
Apache License 2.0
4.39k stars 436 forks source link

Add support of bufbuild/protobuf-es #1149

Open euskadi31 opened 1 year ago

euskadi31 commented 1 year ago

Hello,

Can you look at the possibility of using bufbuild/protobuf-es ?

See: https://github.com/bufbuild/protobuf-es

Thank You

johanbrandhorst commented 1 year ago

I'd love to see this contributed, but if you're using protobuf-es, why not use https://buf.build/blog/connect-web-protobuf-grpc-in-the-browser too?

euskadi31 commented 1 year ago

I'd love to see this contributed, but if you're using protobuf-es, why not use https://buf.build/blog/connect-web-protobuf-grpc-in-the-browser too?

If I'm not mistaken, it doesn't support bidirectional streams.

yurifedoseev commented 1 year ago

I'd love to see this contributed, but if you're using protobuf-es, why not use https://buf.build/blog/connect-web-protobuf-grpc-in-the-browser too?

Connect-go forces to implement a custom interface which doesn't conform with the pure grpc. Like this

func (ps *PingServer) Ping(
  ctx context.Context,
  req *connect.Request[pingv1.PingRequest],
) (*connect.Response[pingv1.PingResponse], error) {

instead of

func (ps *PingServer) Ping(
  ctx context.Context,
  req *pingv1.PingRequest,
) (*pingv1.PingResponse, error) {

This is a blocker for my project were we can reuse grpc servers with 3 different transports: pure grpc, grpc-web and grtc (grpc over web-rtc data channel)