ysugimoto / grpc-graphql-gateway

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

Support protoc compiler v3.14.0 #36

Closed ysugimoto closed 3 years ago

ysugimoto commented 3 years ago

Fixes #15

protoc v3.14.0 release says:

Update go_package options to reference google.golang.org/protobuf module.

Since this change, Google's ptype names are changed from "xxxxx" to "xxxxxpb" e.g "wrappers" to "wrapperspb". This plugin fails to compile because it finds correspond our ptype name by actual Go package name, therefore plugin raises error with protoc v3.14.0:

[PROTOC-GEN-GRAPHQL] Error: google's ptype "wrapperspb" does not implement for now.

This PR fixes them with keeping backward compatibility, even works with the old version. And additionally, also support Google's type on Query/Mutation input like:

rpc (google.protobuf.Empty) returns (SomeMessage) {
}