Skip to main content

GRAPH.DELETE

Completely removes a graph and all of its entities (nodes and relationships).

Syntax

GRAPH.DELETE graph_name

Arguments:

  • graph_name - Name of the graph to delete

Returns: String indicating if the operation succeeded or failed.

Examples

graph.delete()

Deleting Individual Nodes

Note: To delete specific nodes or relationships (not the entire graph), use the Cypher DELETE clause with a MATCH query:

graph.query("MATCH (x:Y {propname: propvalue}) DELETE x")

⚠️ Warning: When you delete a node using the Cypher DELETE clause, all of the node's incoming and outgoing relationships are also automatically removed.