Skip to content

Commit

Permalink
fix: Export service
Browse files Browse the repository at this point in the history
  • Loading branch information
dvladco authored and dvladco committed Apr 2, 2019
1 parent 32b34f7 commit 07700a3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion example/constructs.gqlgen.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 example/options.gqlgen.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 protoc-gen-gogqlgen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func (p *plugin) Generate(file *generator.FileDescriptor) {
if r == file.GetName() {
p.InitFile(file)
for _, svc := range file.GetService() {
p.Generator.P(`type `, svc.GetName(), `GQLServer struct { svc `, svc.GetName(), `Server }`)
p.Generator.P(`type `, svc.GetName(), `GQLServer struct { Service `, svc.GetName(), `Server }`)
for _, rpc := range svc.GetMethod() {
methodName := strings.Replace(generator.CamelCase(svc.GetName()+rpc.GetName()), "_", "", -1)
typeInObj := p.TypeNameByObject(rpc.GetInputType())
Expand Down

0 comments on commit 07700a3

Please sign in to comment.