Skip to content

Commit

Permalink
Allow Generation via buf.build and remote BSR proto dependency for gr…
Browse files Browse the repository at this point in the history
…aphql.proto (#3)

* add buf.build configs

* proto comment syntax updates

* move ptypes to respective subdirs

* add support for .protobuf and .type

* add descriptions to gql Money

* fix money.proto currency_code
  • Loading branch information
alehechka authored Jul 28, 2022
1 parent 500bd85 commit 3850d98
Show file tree
Hide file tree
Showing 26 changed files with 330 additions and 189 deletions.
7 changes: 1 addition & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,7 @@ command: plugin clean
-o ../dist/${GRAPHQL_CMD}

plugin:
protoc -I ${PROTOPATH} \
-I include/graphql \
--go_out=./graphql \
include/graphql/graphql.proto
mv graphql/github.com/alehechka/grpc-graphql-gateway/graphql/graphql.pb.go graphql/
rm -rf graphql/github.com
cd proto ; rm -rf gen ; buf generate

lint:
golangci-lint run
Expand Down
2 changes: 1 addition & 1 deletion example/greeter/greeter/greeter.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/starwars/spec/starwars/starwars.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions proto/buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: v1
managed:
enabled: true
go_package_prefix:
default: github.com/alehechka/grpc-graphql-gateway/proto/gen/go
plugins:
- remote: buf.build/protocolbuffers/plugins/go:v1.28.0-1
out: gen/go
opt:
- paths=source_relative
3 changes: 3 additions & 0 deletions proto/buf.work.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
version: v1
directories:
- grpc-graphql-gateway
Loading

0 comments on commit 3850d98

Please sign in to comment.