@sbres So in general if your backend endpoint is <name>.<region>.<Identity Provided>.dgraph.io, then grpc endpoint would be <name>.grpc.<region>.<Identity Provided>.dgraph.io difference is grpc tag between name and region. Here is the sample I have tested.
pool, err := x509.SystemCertPool()
if err != nil {
panic(err)
}
conn, err := grpc.Dial("grpc_url:443", grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{
RootCAs: pool,
ServerName: strings.Split("grpc_url:443", ":")[0],
})),
grpc.WithPerRPCCredentials({authorization object}))
if err != nil {
panic(err)
}
dgraphClient := api.NewDgraphClient(conn)
client := dgo.NewDgraphClient(dgraphClient)
mut := "{\n queryPerson(func: type(Person)) {\n Person.name\n Person.age\n Person.country\n }\n}"
do, err := client.NewTxn().Do(context.Background(), &api.Request{
Query: mut,
})
if err != nil {
panic(err)
}
log.Print(do)
This is the schema I am using.
type Person {
name: String! @search(by: [fulltext])
age: Int
country: String
}
One thing to note is that ACL is still not implemented in Slash. So login endpoint will not work for now.