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

Conflict grpc package name and message name #2176

Closed
alicialics opened this issue May 19, 2021 · 3 comments
Closed

Conflict grpc package name and message name #2176

alicialics opened this issue May 19, 2021 · 3 comments
Labels
stage/1-reproduction A reproduction exists

Comments

@alicialics
Copy link

alicialics commented May 19, 2021

Describe the bug
When the package name matches one of the grpc message we get an error

/* This is an auto generated file. Please do not change it. */
syntax = "proto3";
package foo;
service BamService {
    rpc GetFOOs (GetFOOsRequest) returns (GetFOOsResponse) {}
}

message GetFOOsRequest {
    int32 id = 1;
}
message FOO {
    int64 id = 1;
}
message GetFOOsResponse {
    repeated FOO foos = 1;
}
🕸️ =>  ✖ Unable to start GraphQL Mesh: TypeError[GetFoOsResponse.foos]: Syntax Error: Expected Name, found "]".

the error may be fixed in one of the two ways:
Change message FOO { to something else, like Foo or FAA
Change GetFOOsResponse to something else, like GetFoosResponse or GetFAAsResponse
Change package name from foo to something else

Screen Shot 2021-05-18 at 5 10 38 PM

Similar to #1719

To Reproduce
Code sandbox: https://codesandbox.io/s/vigorous-shtern-8stbo

Expected behavior
no error when running yarn mesh

Environment:

"@graphql-mesh/cli": "0.29.13",
"@graphql-mesh/graphql": "0.17.8",
"@graphql-mesh/grpc": "0.14.7",
"graphql": "15.5.0"
@Urigo
Copy link
Collaborator

Urigo commented May 19, 2021

Hi @alicialics and thank you for the report and the reproduction!

Sorry but I'm not adding a lot here but just labeling it according to our new Contribution Guide and issue flow.

It seems already got into stage 1 thanks to your reproduction! Thank you for that!

Now in order to advance to stage 2 we'll need a failing test, would be great if you could help progress the issues through the stages.

If you have questions about how to create a failing test, we are available for any help around that and you can contact us here or directly (and also we have video tutorials on the link above).

Thank you and sorry that this comment is not a complete solution (yet).

@Urigo Urigo added the stage/1-reproduction A reproduction exists label May 19, 2021
@alicialics alicialics mentioned this issue May 19, 2021
14 tasks
@alicialics
Copy link
Author

@Urigo I made a PR for the failed test:
#2177

@ardatan ardatan mentioned this issue Jun 17, 2021
@theguild-bot theguild-bot mentioned this issue Aug 11, 2022
@ardatan
Copy link
Owner

ardatan commented Aug 22, 2022

See #2177 (comment)

@ardatan ardatan closed this as completed Aug 22, 2022
@theguild-bot theguild-bot mentioned this issue Sep 28, 2023
klippx pushed a commit to klippx/graphql-mesh that referenced this issue Oct 9, 2024
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage/1-reproduction A reproduction exists
Projects
None yet
Development

No branches or pull requests

3 participants