You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to generate a graphql schema starting from protobuf, and it works fine as long as the .proto file does not contain any import.
I have a situation similar to this one:
// api/v1/a.proto
import "api/v1/b.proto";
message A {
repeated b.B foo = 1;
}
// api/v1/b.proto
message B {
string bar = 1;
}
If I run the compiler on b.proto I get the expected output, if I run it on a.proto I get this message:
proto2graphql --input api/v1/a.proto
/usr/local/lib/node_modules/proto2graphql/node_modules/protobufjs/src/namespace.js:411
throw Error("no such Type or Enum '" + path + "' in " + this);
^
Error: no such Type or Enum 'b.B' in Type .a.A
Is there any plan to support local imports in the future?
Hi @emzeq,
and first of all thanks for this tool!
I am trying to generate a
graphql
schema starting from protobuf, and it works fine as long as the.proto
file does not contain any import.I have a situation similar to this one:
If I run the compiler on
b.proto
I get the expected output, if I run it ona.proto
I get this message:Is there any plan to support local imports in the future?
I suspect that it might be something happening in
proto2graphql/src/converter.ts
Lines 11 to 17 in 78b7324
The text was updated successfully, but these errors were encountered: