title: How to introduce parameters in a cypher query?
body: <p>I have this cypher query in a Python program:</p>
  
  <pre><code>prevNode = graph_db.data("OPTIONAL MATCH (n:Node) WHERE n.property = {param} RETURN n")
  </code></pre>
  
  <p>The line of code above gives this error:</p>
  
  <blockquote>
    <p>'py2neo.database.status.ClientError: Expected a parameter named param'</p>
  </blockquote>
  
  <p>param is well defined at this point of the program because I print it a line before executing the query.</p>
  
  <p>I have tried to put the value in the query instead of the parameter, like this:</p>
  
  <pre><code>prevNode = graph_db.data("OPTIONAL MATCH (n:Node) WHERE n.property = '1234' RETURN n")
  </code></pre>
  
  <p>And worked well.</p>
  
  <p>Does anyone knows where is the mistake?</p>
  
  <p>Thanks in advance. </p>