-
Notifications
You must be signed in to change notification settings - Fork 57
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 @grpc/proto-loader serialization and promises #35
Comments
Hi @tatemz, Thank you for your information. I just knew this trend in your issue. And I have several questions:
|
The official
|
|
On further investigation, it seems as if |
The
@grpc/proto-loader
package allows for on-demand loading of.proto
files in order to dynamically create a node server or client. There is a pretty good example here:https://github.com/grpc/grpc/tree/v1.17.1/examples/node/dynamic_codegen
A few things are different about the way
proto-loader
generates the method definitions. Instead of using request/response objects with getters and setters, the method definitions use plain objects. The typings generated usually include anAsObject
version of the request/response objects, however, the client definitions generated by your plugin do not match the client implementation created byproto-loader
The following example is the definitions generated by your plugin:
The following is what it should look like if one was using
proto-loader
:Also not included in my above example is the support for Promises. In general your examples probably need to be updated to match the vanilla JS ones provided in the sample link above.
The text was updated successfully, but these errors were encountered: