big refactor to put the codegen onto methods of an object

This commit is contained in:
Ben Kraft
2020-04-10 15:21:23 -07:00
parent dfea9bf128
commit b600df7877
5 changed files with 78 additions and 59 deletions
+2 -2
View File
@@ -8,9 +8,9 @@ import (
"github.com/Khan/genql/graphql"
)
{{range .Operations}}
{{.ResponseType}}
{{.Types}}
{{range .Operations}}
{{.Doc}}
func {{.Name}}(ctx context.Context, client *graphql.Client{{range .Args}}, {{.GoName}} {{.GoType}}{{end}}) (*{{.ResponseName}}, error) {
{{- if .Args -}}