ysugimoto / grpc-graphql-gateway

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

Resolve source_relative not respecting subpath proto files #53

Closed alehechka closed 2 years ago

alehechka commented 2 years ago

The source_relative option will only generate the resulting .go file into the specified out directory. However, when .proto files are nested down a path, other protoc plugins will respect the paths and output the files down the same file path.

Following grpc-gateway, they use the .proto's file path as a prefix to the path of the generate .go file.

Additionally, I followed a similar pattern of retrieving the filename prefix to refactor the retrieval of the file name when source_relative is not used.