Skip to content
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

Closed
wants to merge 1 commit into from
Closed

make dgraph-js compatible grpc-js #107

wants to merge 1 commit into from

Conversation

shynome
Copy link

@shynome shynome commented Feb 5, 2020

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 code

I have published a package @shynome/dgraph-js that can replace grpc package with @grpc/grpc-js, you can use the commad replace current dgraph-js and grpc package, and your project will work as expected

the command: yarn add dgraph-js@npm:@shynome/dgraph-js grpc@npm:@grpc/grpc-js


This change is Reviewable

@claassistantio
Copy link

claassistantio commented Feb 5, 2020

CLA assistant check
All committers have signed the CLA.

@Aelbannan
Copy link

Thanks for pushing this. So what benefit does this PR offer? Faster compile times?

@shynome
Copy link
Author

shynome commented Apr 2, 2020

grpc-js has no complie times

@Aelbannan
Copy link

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,
Copy link
Contributor

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?

Copy link
Author

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

@paulftw
Copy link
Contributor

paulftw commented Apr 9, 2020

@shynome I think something is missing in this PR. Github only shows me a DEFAULTS check and no significant changes to package.json -- I don't see where the grpc-js dependency is added and/or enabled. Can you please elaborate?

@shynome
Copy link
Author

shynome commented Apr 9, 2020

this pr not add grpc-js , just for compatible npm alias grpc@npm:@grpc/grpc-js
this pr have done below things

  • move gprc libary to devDependencies field, let user can choose which grpc libary they favorite
  • add magic number 4 for compatible grpc-js

@shynome shynome closed this Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants