Question: How do I generate client code #109
Replies: 7 comments 3 replies
-
nvm, I am straight up an idiot. I did not realize the plugin creates the client in the same file. old habits I suppose. Sorry to bother for nothing... |
Beta Was this translation helpful? Give feedback.
-
Hey, Recently I started working on #102 which will workaround grpc-web generation. currently, the clients are generated for node. |
Beta Was this translation helpful? Give feedback.
-
awesome!! need any help? recently client-to-server streaming became a reality with fetch upload streaming. Do you reckon you could implement that as well? Or could I assist by doing that myself? I also have a "feature request" of sorts that implements async generators for streaming requests in either direction :D Again, not afraid to get my hand dirty, so just tell me if I can assist :D |
Beta Was this translation helpful? Give feedback.
-
I like your enthusiasm. In that PR the generation part is complete but am trying to get an e2e test running. I tend to break things without noticing. I believe that in order to support CLIENT_STREAMING (possibly BIDI_STREAMING), you need to do some upstream work in grpc-web, tonic-web, and envoy-proxy which would be a lot of work I imagine. I would love to see this landed though. I don't know if they would ever want to use a platform API that is not widely supported by major browser vendors. Sometimes it is the resistance that holds you back instead of the work. |
Beta Was this translation helpful? Give feedback.
-
hmm, but with a working implementation of client and bidi streaming, is grpc-web no long a thing of the past, wouldn't those 2 features make browsers compatible to the point it is just another grpc client? AFAIK that is why grpc-web exists, because the browser did not support upload streaming and is therefor incompatible with grpc. So I would think that there is not much upstream issue as an envoy proxy for example could just speak grpc both ways instead of having to translate to grpc-web. |
Beta Was this translation helpful? Give feedback.
-
it exists because some browsers do not support HTTP/2 specific features such as frames.
envoy proxy could speak to the origin server any way it wants but it needs to understand what grpc-web says. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I've just managed to get your plugin up and running as a replacement for
--js-out
. however I still generate client code with the grpc-web plugin, but that plugin has hardcoded to suffix all files with_pb
, so that also means for the imports.can I:
a) replace grpc-web with something else that generates my client stub?
b) convince this plugin to add the
_pb
suffix to imports (would require a patch I presume sincereplaceExtension(dependency, "");
has a hardcoded empty string)Beta Was this translation helpful? Give feedback.
All reactions