How can namespaces be used in Dgraph v25? I’m creating a dgraph client in Golang like this: dgraphClient, err := dgo.NewClient(endpoint, dgo.WithNamespace(2)), but when I then later on do queries or mutations the default namespace (0) is still used.
The namespace must already exist. And you’ll need to login that user via the client. See: Multi-Tenancy - Dgraph
and
So namespaces can only be used with ACL?
Practically, yes. Technically, no.
Over gRPC, you could attach outgoing metadata (namespace: <int>) and queries and mutations would run in a non-ACL cluster. If all you’re doing is using gRPC, then fine. But of course, practically, other (non-gRPC) access to the cluster is probably desired (HTTP, Ratel, etc) which do not share the outgoing metadata mechanism that gRPC uses.
1 Like
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.