Skip to content

Commit

Permalink
Merge pull request #191 from Yamashou/add-document-operation-names
Browse files Browse the repository at this point in the history
add DocumentOperationName
  • Loading branch information
Yamashou authored Nov 9, 2023
2 parents d5b6a31 + 527bf6b commit 0117508
Show file tree
Hide file tree
Showing 3 changed files with 169 additions and 30 deletions.
6 changes: 6 additions & 0 deletions clientgenv2/template.gotpl
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,9 @@ type {{ .Query.Name | go }} {{ .Query.Type | ref }}
}
{{- end}}
{{- end}}

var DocumentOperationNames = map[string]string{
{{- range $model := .Operation}}
{{ $model.Name|go }}Document: "{{ $model.Name }}",
{{- end}}
}
40 changes: 24 additions & 16 deletions example/github/gen/client.go

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

Loading

0 comments on commit 0117508

Please sign in to comment.