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
make dgraph-js compatible grpc-js #107
Conversation
Thanks for pushing this. So what benefit does this PR offer? Faster compile times? |
grpc-js has no complie times |
Makes sense. I'll run this by the maintainer of this repo |
@@ -160,7 +160,8 @@ export class DgraphClientStub { | |||
|
|||
function ensureCallOptions(options?: grpc.CallOptions): grpc.CallOptions { | |||
return (options === undefined) ? { | |||
propagate_flags: grpc.propagate.DEFAULTS, | |||
// @ts-ignore | |||
propagate_flags: grpc.propagate ? grpc.propagate.DEFAULTS : 4, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this magic number 4?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know this flag how to work and grpc-js module don't have implemented this flag, so I set the value same as grpc module grpc.propagate.DEFAULTS
value 4
@shynome I think something is missing in this PR. Github only shows me a DEFAULTS check and no significant changes to |
this pr not add grpc-js , just for compatible npm alias
|
make dgraph-js compatible grpc-js
I have replace
grpc
with @types/grpc-js which don't need compile and that is work without change my project codeI have published a package
@shynome/dgraph-js
that can replacegrpc
package with@grpc/grpc-js
, you can use the commad replace currentdgraph-js
andgrpc
package, and your project will work as expectedthe command:
yarn add dgraph-js@npm:@shynome/dgraph-js grpc@npm:@grpc/grpc-js
This change is