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

gRPC unable to generate schema #4388

Closed
1 of 4 tasks
gsingh-ds opened this issue Aug 28, 2022 · 4 comments
Closed
1 of 4 tasks

gRPC unable to generate schema #4388

gsingh-ds opened this issue Aug 28, 2022 · 4 comments

Comments

@gsingh-ds
Copy link

gsingh-ds commented Aug 28, 2022

Issue workflow progress

Progress of the issue based on the Contributor Workflow

Make sure to fork this template and run yarn generate in the terminal.

Please make sure Mesh package versions under package.json matches yours.

  • 2. A failing test has been provided
  • 3. A local solution has been provided
  • 4. A pull request is pending review

Describe the bug

With the updated versions of grphql mesh. It's unable to generate schema's on any proto file

[1] 💥 🕸️  Mesh - Example Failed to generate the schema TypeError: Cannot read properties of undefined (reading 'add')
[1]     at Function.fromDescriptor (/sandbox/node_modules/@grpc/proto-loader/node_modules/protobufjs/ext/descriptor/index.js:219:66)
[1]     at Function.fromDescriptor (/sandbox/node_modules/@grpc/proto-loader/node_modules/protobufjs/ext/descriptor/index.js:92:42)
[1]     at createPackageDefinitionFromDescriptorSet (/sandbox/node_modules/@grpc/proto-loader/build/src/index.js:160:32)
[1]     at Object.loadFileDescriptorSetFromObject (/sandbox/node_modules/@grpc/proto-loader/build/src/index.js:215:12)
[1]     at GrpcHandler.getMeshSource (/sandbox/node_modules/@graphql-mesh/grpc/index.js:532:51)

To Reproduce

  1. Create any grpc handler with graphql mesh

https://codesandbox.io/s/bug-grpc-unable-to-generate-schema-9ikg10

@theguild-bot theguild-bot mentioned this issue Aug 28, 2022
@gsingh-ds
Copy link
Author

@ardatan help?

@Archisman-Mridha
Copy link

I am facing exactly the same issue. Using a NestJS gRPC microservice server as my source. This is how my proto file looks :

syntax= "proto3";

package auth;

service Auth {

    rpc Register(RegistrationDetails) returns (RegistrationResponse) { }
}

message RegistrationDetails {

    string name= 1;
    string email= 2;
    string phone= 3;
    string password= 4;
}

message RegistrationResponse {

    repeated string errors= 1;
}

@gsingh-ds
Copy link
Author

@Archisman-Mridha @graphql-mesh/grpc version "0.24.26-alpha-20220831005710-aff7f7bc6" works for me

@gsingh-ds
Copy link
Author

This is fixed in new version of @graphql-mesh/grpc@0.25.3. Closing issue.

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

No branches or pull requests

2 participants