INNER CODE UNIT · Go
func
ysugimoto/grpc-graphql-gateway · protoc-gen-graphql/template.go:237
return x.conn, func() {}, nil
}
// Otherwise, this handler opens connection with specified host
conn, err := grpc.DialContext(ctx, x.host, x.dialOptions...)
if err != nil {
return nil, nil, err
}
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 }}