INNER CODE UNIT · Go

func

ysugimoto/grpc-graphql-gateway · protoc-gen-graphql/template.go:245

	return conn, func() { conn.Close() }, nil
}
// GetQueries returns acceptable graphql.Fields for Query.
func (x *graphql__resolver_{{ $service.Name }}) GetQueries(conn *grpc.ClientConn) graphql.Fields {
	return graphql.Fields{
{{- range .Queries }}
	{{- if not .IsResolver }}
	   "{{ .QueryName }}": &graphql.Field{
			Type: {{ .QueryType }},
			{{- if .Comment }}
			Description: ` + "`" + `{{ .Comment }}` + "`" + `,
			{{- end }}
			Args: graphql.FieldConfigArgument{
			{{- range .Args }}
				"{{ .FieldName }}": &graphql.ArgumentConfig{
					Type: {{ .FieldTypeInput $.RootPackage.Name }},
					{{- if .Comment }}
					Description: ` + "`" + `{{ .Comment }}` + "`" + `,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…