File tree Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ Using the `open` function with a connection string:
8080
8181``` js
8282// open a connection to an ACL-enabled, non-TLS cluster and login as groot
83- const client = dgraph .open (" dgraph://groot:password@localhost:8090" )
83+ const client = await dgraph .open (" dgraph://groot:password@localhost:8090" )
8484// Use the client
8585
8686// this will close all the client stubs
@@ -381,7 +381,7 @@ const SERVER_ADDR = "localhost:9080"
381381const SERVER_CREDENTIALS = grpc .credentials .createInsecure ()
382382
383383// Create instances of DgraphClient.
384- const client = dgraph .open (" dgraph://groot:password@${SERVER_ADDR}" )
384+ const client = await dgraph .open (" dgraph://groot:password@${SERVER_ADDR}" )
385385
386386// ...
387387// Use dgraphClient
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ async function queryData(dgraphClient) {
115115}
116116
117117async function main ( ) {
118- const dgraphClient = dgraph . open ( )
118+ const dgraphClient = await dgraph . open ( )
119119 await dropAll ( dgraphClient )
120120 await setSchema ( dgraphClient )
121121 await createData ( dgraphClient )
Original file line number Diff line number Diff line change 11{
22 "name" : " dgraph-js" ,
33 "version" : " 24.1.0" ,
4- "type" : " module" ,
54 "description" : " Official javascript client for Dgraph" ,
65 "license" : " Apache-2.0" ,
76 "repository" : {
You can’t perform that action at this time.
0 commit comments