INNER CODE UNIT · Go
Gql__type_
ysugimoto/grpc-graphql-gateway · protoc-gen-graphql/template.go:95
func Gql__type_{{ .TypeName }}() *graphql.Object {
if gql__type_{{ .TypeName }} == nil {
gql__type_{{ .TypeName }} = graphql.NewObject(graphql.ObjectConfig{
Name: "{{ $.RootPackage.CamelName }}_Type_{{ .TypeName }}",
{{- if .Comment }}
Description: ` + "`" + `{{ .Comment }}` + "`" + `,
{{- end }}
Fields: graphql.Fields {
{{- range .Fields }}
{{- if .IsResolve }}
{{ $query := .ResolveSubField $.Services }}
"{{ .FieldName }}": &graphql.Field{
Type: {{ $query.QueryType }},
{{- if $query.Comment }}
Description: ` + "`" + `{{ $query.Comment }}` + "`" + `,
{{- end }}
Args: graphql.FieldConfigArgument{
{{- range $query.Args }}