Skip to content

Commit

Permalink
move options to its own package
Browse files Browse the repository at this point in the history
  • Loading branch information
marwan-at-work committed Jun 20, 2019
1 parent 3329b78 commit 2ae9411
Show file tree
Hide file tree
Showing 29 changed files with 244 additions and 210 deletions.
2 changes: 1 addition & 1 deletion e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func TestBread(t *testing.T) {
require.Equal(t, s.breadReq.GetCount(), int64(3))
}

func TestChangeMe(t *testing.T) {
func TestMutations(t *testing.T) {
s := &service{changeResp: &e2e.ChangeMeResp{
Name: "james",
Previous: map[string]*e2e.ChangeMeResp{
Expand Down
4 changes: 2 additions & 2 deletions e2e/gen.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package e2e

//go:generate protoc -I . -I /usr/local/include -I ../twirpql --go_out=. --twirp_out=. service.proto
//go:generate protoc -I . -I /usr/local/include -I ../twirpql --twirpql_out=. service.proto
//go:generate protoc -I . -I /usr/local/include -I ../options --go_out=. --twirp_out=. service.proto
//go:generate protoc -I . -I /usr/local/include -I ../options --twirpql_out=. service.proto
91 changes: 45 additions & 46 deletions e2e/service.pb.go

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

4 changes: 2 additions & 2 deletions e2e/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package e2e;
option go_package = "e2e";

import "painters/painters.proto";
import "twirpql.proto";
import "options.proto";

service Service {
rpc Hello(HelloReq) returns (HelloResp);
Expand All @@ -12,7 +12,7 @@ service Service {
rpc Translate(TranslateReq) returns (TranslateResp);
rpc Bread(BreadReq) returns (BreadResp);
rpc ChangeMe(ChangeMeReq) returns (ChangeMeResp) {
option (twirpql.modifiers) = {
option (twirpql.options.rpc) = {
mutation: true;
};
};
Expand Down
89 changes: 44 additions & 45 deletions e2e/service.twirp.go

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

4 changes: 3 additions & 1 deletion e2e/twirpql/generated.go

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

2 changes: 2 additions & 0 deletions e2e/twirpql/gqlgen.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Code was generated by marwan.io/protoc-gen-twirpql. DO NOT EDIT.

schema:
- twirpql/schema.graphql
exec:
Expand Down
2 changes: 2 additions & 0 deletions e2e/twirpql/schema.graphql
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Code was generated by marwan.io/protoc-gen-twirpql. DO NOT EDIT.

schema {
query: Query
mutation: Mutation
Expand Down
2 changes: 2 additions & 0 deletions e2e/twirpql/server.go

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

3 changes: 3 additions & 0 deletions options/gen.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package options

//go:generate protoc -I . -I /usr/local/include --go_out=paths=source_relative:. options.proto
Loading

0 comments on commit 2ae9411

Please sign in to comment.