I found this plugin assumes to develop in Go, since it fails with "unable to determine Go import path" message when I run protoc command without go_package option.
But I want to use this plugin without Go (we use TypeScript for GraphQL BFF and Java for gRPC server).
Is there any ways to run command without go_package option?
Reproduce steps:
// a.proto
syntax = "proto3";
// option go_package = './'; // without this line, the command fails
message Ping { }
$ protoc --version
libprotoc 3.12.1
$ protoc --graphql_out=. a.proto
protoc-gen-graphql: unable to determine Go import path for "a.proto"
Please specify either:
• a "go_package" option in the .proto source file, or
• a "M" argument on the command line.
See https://developers.google.com/protocol-buffers/docs/reference/go-generated#package for more information.
--graphql_out: protoc-gen-graphql: Plugin failed with status code 1.
I tried command with --go_out=. --go_opt=Ma.proto=./ but there was no luck.
It seems that we need to specify go_package in proto source file.
Hi,
I found this plugin assumes to develop in Go, since it fails with "unable to determine Go import path" message when I run
protoc
command withoutgo_package
option. But I want to use this plugin without Go (we use TypeScript for GraphQL BFF and Java for gRPC server). Is there any ways to run command withoutgo_package
option?Reproduce steps:
I tried command with
--go_out=. --go_opt=Ma.proto=./
but there was no luck. It seems that we need to specifygo_package
in proto source file.