I want to delete node with all incoming and outgoing relationships.
This incoming and outgoing relationships are optional.
(t:Teacher)-[:TEACHES]->(s:Student)
(s:Student)-[:ATTENDS]->(c:Class)
Student node have optional relationship with Teacher and optional relationship with Class.
I want to delete Student node with {id:1}.
I know how to delete all nodes and relationships with:
MATCH (n)
OPTIONAL MATCH (n)-[r]-()
DELETE n,r
But not able to convert it for specific node. Please help.