Skip to content

Commit

Permalink
fix: change svc name
Browse files Browse the repository at this point in the history
  • Loading branch information
dvladco authored and dvladco committed Apr 4, 2019
1 parent 07700a3 commit 877fbe9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions protoc-gen-gogqlgen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ func (p *plugin) Generate(file *generator.FileDescriptor) {
in, inref = "", ", &"+typeIn+"{}"
}
if p.IsEmpty(p.Types()[rpc.GetOutputType()]) {
p.Generator.P("func (s *", svc.GetName(), "GQLServer) ", methodName, "(ctx ", p.contextPkg.Use(), ".Context", in, ") (*bool, error) { _, err := s.svc.", generator.CamelCase(rpc.GetName()), "(ctx", inref, ")\n return nil, err }")
p.Generator.P("func (s *", svc.GetName(), "GQLServer) ", methodName, "(ctx ", p.contextPkg.Use(), ".Context", in, ") (*bool, error) { _, err := s.Service.", generator.CamelCase(rpc.GetName()), "(ctx", inref, ")\n return nil, err }")
} else {
p.Generator.P("func (s *", svc.GetName(), "GQLServer) ", methodName, "(ctx ", p.contextPkg.Use(), ".Context", in, ") (*", typeOut, ", error) { return s.svc.", generator.CamelCase(rpc.GetName()), "(ctx", inref, ") }")
p.Generator.P("func (s *", svc.GetName(), "GQLServer) ", methodName, "(ctx ", p.contextPkg.Use(), ".Context", in, ") (*", typeOut, ", error) { return s.Service.", generator.CamelCase(rpc.GetName()), "(ctx", inref, ") }")
}
}
}
Expand Down

0 comments on commit 877fbe9

Please sign in to comment.