GRPC can safely use a single connection and it’s going to be multiplexed, and limited only by the HTTP/2 max concurrent connections.
An according to the graph client in the client.go code you can find the following:
// A single client is thread safe for sharing with multiple go routines.
func NewDgraphClient(clients ...api.DgraphClient) *Dgraph {
dg := &Dgraph{
dc: clients,
}
return dg
}
So its seems that you can inject the reference of client to every handler, but this can be confirmed by the contributors.