Skip to content

CLI tool proto2graphql

proto2graphql is similar to protoc-gen-gql except it doesn't require protoc binary to run and therefore is much simpler ro use

⚠ The GraphQL objects will only be generated for the gRPC messages of other types that are used in a service either as a input value or a return value (For details check #1)

Install

go install github.com/danielvladco/go-proto-gql/cmd/proto2graphql@latest

Usage

Usage of proto2graphql: - -I string - Specify the directory in which to search for imports. May be specified multiple times. May be specified multiple times. - -f string - Parse proto files and generate graphql based on the options given. May be specified multiple times. - -ext string - Extension of the graphql file, Default: '.graphql' (default "graphql"). - -merge - Merge all the proto files found in one directory into one graphql file. - -svc - Use service annotations for nodes corresponding to a GRPC call.