title: Delete node and its relationships (if it has any) in Neo4j
body: <p>I'm trying to execute following query:</p>
  
  <pre><code>MATCH (movie:Movie {title:"test"})-[r]-() DELETE movie, r
  </code></pre>
  
  <p>to delete a :Movie node and all its relationships. It's all good, except if the query doesn't have any relationships, it fails to MATCH the movie. I've tried with OPTIONAL MATCH, but no luck.</p>
  
  <p>I'm looking for a way to DELETE a movie node no matter if it has or doesn't have any relationships, but if it has, to DELETE them as well. </p>