google / rejoiner

Generates a unified GraphQL schema from gRPC microservices and other Protobuf sources
https://google.github.io/rejoiner/
Apache License 2.0
3.67k stars 144 forks source link

Converting field name to camel cases only if "_" exists in the name #42

Closed dsborets closed 6 years ago

dsborets commented 6 years ago

It's an issue with GRPC result type field name converting. All fields are converting using UNDERSCORE_TO_CAMEL.convert(fieldDescriptor.getName()) in ProtoToGql class even if the field name doesn't contains "_" so it's causing a couple of problems:

  1. incorrect camel case transformation: 'someTestField' -> 'sometestfield'
  2. incorrect value binding GRPC -> GraphQL, lowercased field is always null
googlebot commented 6 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers
coveralls commented 6 years ago

Pull Request Test Coverage Report for Build 55


Totals Coverage Status
Change from base Build 54: 0.03%
Covered Lines: 793
Relevant Lines: 1921

💛 - Coveralls
siderakis commented 6 years ago

Looks good, I can accept the PR once the CLA is signed.

Thanks!

dsborets commented 6 years ago

Thank you @siderakis. I signed CLA, but for some reason it still shows that I have to do it. I will try a "magic" phrase they suggested

googlebot commented 6 years ago

CLAs look good, thanks!

siderakis commented 6 years ago

Thanks!