You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
awaitdgraphClientStub.loginIntoNamespace("groot", "password", 123); // where 123 is the namespaceId
109
+
awaitdgraphClient.loginIntoNamespace("groot", "password", 123); // where 123 is the namespaceId
111
110
```
112
111
113
112
In the example above, the client logs into namespace `123` using username `groot` and password `password`.
114
113
Once logged in, the client can perform all the operations allowed to the `groot` user of namespace `123`.
115
114
115
+
If you're connecting to Dgraph Cloud, call `setCloudApiKey` before calling `loginIntoNamespace`.
116
+
116
117
### Create a Client for Dgraph Cloud Endpoint
117
118
118
119
If you want to connect to Dgraph running on your [Dgraph Cloud](https://cloud.dgraph.io) instance, then all you need is the URL of your Dgraph Cloud endpoint and the API key. You can get a client using them as follows:
0 commit comments