feat(gen): support proto_paths for gen graphql through proto file - #3206
Conversation
|
Can't we use src to specify the protoPath instead of creating a new field? |
|
proto_path specifies the search path for dependent files in src file. file path: proto/apps/notification_center/api/v1/audience.proto dependence using |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3206 +/- ##
==========================================
+ Coverage 86.73% 86.75% +0.01%
==========================================
Files 278 278
Lines 27918 27963 +45
==========================================
+ Hits 24214 24258 +44
- Misses 3704 3705 +1 ☔ View full report in Codecov by Sentry. |
424b746 to
6bcd740
Compare
6bcd740 to
bf6e377
Compare
bf6e377 to
9bcf429
Compare
9bcf429 to
61cd2a4
Compare
e8783d3 to
6340d95
Compare
Summary:
Currently, when using the
tailcall gencommand to process proto files, the import path is fixed to a relative path, but in the protobuf import syntax, you can specify the path to find the dependency using the-I/--proto_pathflag. So, most proto projects are currently organized in this way, and I think we also need to support it.{ "inputs": [ { "proto": { "src": "./proto/apps/mian.proto", "url": "http://localhost:8080", // new params "protoPaths": ["./proto/apps"] } } ], "preset": { "mergeType": 1.0 }, "output": { "path": "./output/main.graphql", "format": "graphQL" }, "schema": { "query": "Query" } }Issue Reference(s):
None
Build & Testing:
cargo testsuccessfully../lint.sh --mode=fixto fix all linting issues raised by./lint.sh --mode=check.Checklist:
<type>(<optional scope>): <title>