adam-cowley/neode

old parameter syntax `{param}` is no longer supported "running-a-cypher-query" example

mafrego opened this issue · 1 comments

https://github.com/adam-cowley/neode#running-a-cypher-query

instance.cypher('MATCH (p:Person {name: {name}}) RETURN p', {name: "Adam"})
.then(res => {
console.log(res.records.length);
})

Gives:
Neo4jError: The old parameter syntax {param} is no longer supported. Please use $param instead

Thanks for the heads up, I've updated the README. The syntax should now be

instance.cypher('MATCH (p:Person {name: $name}) RETURN p', {name: "Adam"})
  .then(res => {
    console.log(res.records.length);
  })