title: How to use parameter in neo4j cypher query
body: <p>The Cypher official documentation seems to be inconsistent and misleading when it comes to assigning parameter values..we have the following examples in the refcard:</p>
  
  <pre><code>SET n.property1 = $value1
  </code></pre>
  
  <p>where value1 is a parameter defined</p>
  
  <pre><code>{
   "value1": somevalue
  }
  </code></pre>
  
  <p>However if you use this SET syntax you get an error value1 not defined. The correct syntax seems to be:</p>
  
  <pre><code>SET n.property1 = {value1}
  </code></pre>
  
  <p>also if its a MATCH query the parameter looks like this:</p>
  
  <pre><code>  {
       email: someemail
      }
  </code></pre>
  
  <p>note no quotes around email
  So if you have a MATCH and SET query with parameters you parameters definition looks like this:</p>
  
  <pre><code>{
  email: someemail,
  "status" : somestatus
  }
  </code></pre>
  
  <p>Can someone explain this apparent inconsistency?</p>
  
  <p>EDIT:
  This is also an example from the neo4j docs:</p>
  
  <p>using parameter with SET clause:</p>
  
  <pre><code>{
    "surname" : "Taylor"
  }
  
  MATCH (n { name: 'Andres' })
  SET n.surname = $surname
  RETURN n
  </code></pre>
  
  <p>This returns surname undefined.</p>