ysugimoto / grpc-graphql-gateway

A protoc plugin that generates graphql execution code from Protocol Buffers.
MIT License
370 stars 49 forks source link

Field Mask Support #40

Open atul161 opened 3 years ago

atul161 commented 3 years ago

In case of fieldmask (inside proto message) incorrect graphql file generated.

ysugimoto commented 3 years ago

Does it mean the omit field option could not work? FYI: https://github.com/ysugimoto/grpc-graphql-gateway/blob/master/include/graphql/graphql.proto#L177

atul161 commented 3 years ago

Hi @ysugimoto , As we know there are multiple standard protofiles provided by Google currently which is open source. Some of are empty protobuf , timestamp etc. In similar way Google also standardized a proto file which is called Field Mask. You may read about this https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto

So , currently your package doesn't generate file when we use fieldmask inside protocol buffer.

atul161 commented 3 years ago

I think you need to add suport in ptypes. https://github.com/ysugimoto/grpc-graphql-gateway/tree/master/ptypes

ysugimoto commented 3 years ago

Thanks, I didn't know that ptype. https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto describes its spec and I looked at it.

The spec mentions about oneof, but currently, this package does not support oneof field, therefor we may need to implement oneof spec first.

atul161 commented 3 years ago

Will you work upon oneOf field or will I sent you a PR?

ysugimoto commented 3 years ago

I appreciate it if you make a PR.