go-proto-gql icon indicating copy to clipboard operation
go-proto-gql copied to clipboard

Empty output

Open gnur opened this issue 7 years ago • 1 comments

Hi,

I tried to generate some graphql schemas but so far I'm getting (nearly) empty output.

Input definition:

syntax = "proto3";

package metadata;

message Example {
  string msg = 1;
  string source = 2;
  string provider = 4;
}

Output:

# Code generated by protoc-gen-gogql. DO NOT EDIT
# source: metadata-definitions/protobuf/example.proto

Command used: protoc --gql_out=paths=source_relative:. -I=${GOPATH}/pkg/mod/ -I=. -I=metadata-definitions/protobuf/ metadata-definitions/protobuf/example.proto

Versions:

$ protoc --version
libprotoc 3.6.1
$ go version
go version go1.11.5 darwin/amd64

Running this on my mac with zsh. Any ideas what could be wrong?

gnur avatar Feb 21 '19 08:02 gnur

Hi,

Thank you for your feedback, I did not mention this in readme but actually this script generates output only for messages that are used by some service. It is made this way to be able to determine if we need to generate an input or a type. So if you will create an service like service { rpc Ex(Example) returns (Example); } it will generate an input Example { //… } and a type Example { //… }.

danielvladco avatar Feb 21 '19 09:02 danielvladco