This code seems to work
session
//.run('MATCH (n) WITH n MATCH (n)-->(m) WHERE id(m)>0 RETURN id(n) as source, id(m) as target LIMIT $limit', { limit: neo4j.int(100) })
.run('MATCH (n:Person) RETURN labels(n) as labels,n.name as name,n.born as born,n.died as died ORDER BY n.born,n.died LIMIT $limit', { limit: neo4j.int(100) })
.subscribe({
onKeys: keys => {
console.log('Result columns are:')
//console.log(keys)
},
onNext: record => {
console.log(`Processing ${record.get('name')}`)
},
onCompleted: () => {
session.close() // returns a Promise
},
onError: error => {
console.log(error)
}
})
.catch(function (error) {
console.log(error);
});
However you still get this error
Uncaught TypeError: session.run(...).subscribe(...) is undefined
I got this code from this example. Should I just ignore it, or is there a better example