Skip to content

Commit bb55793

Browse files
committed
fix example, connection CREATED must be labeled
1 parent 510e19a commit bb55793

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

examples/RedisGraphExample.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,18 @@ graph
99
return graph.query("CREATE (:person{name:'amit',age:30})");
1010
})
1111
.then( () => {
12-
return graph.query("MATCH (a:person), (b:person) WHERE (a.name = 'roi' AND b.name='amit') CREATE (a)-[knows]->(a)")
12+
return graph.query("MATCH (a:person), (b:person) WHERE (a.name = 'roi' AND b.name='amit') CREATE (a)-[:knows]->(a)");
1313
})
1414
.then( () => {
15-
return graph.query("MATCH (a:person)-[knows]->(:person) RETURN a")
15+
return graph.query("MATCH (a:person)-[:knows]->(:person) RETURN a");
1616
})
1717
.then( (res) => {
1818
while(res.hasNext()){
1919
let record = res.next();
2020
console.log(record.getString('a.name'));
2121
}
2222
console.log(res.getStatistics().queryExecutionTime());
23+
})
24+
.catch((err) => {
25+
console.log(err);
2326
});

0 commit comments

Comments
 (0)