Cypher icon

Cypher

Interact with a graph database via the Bolt protocol using Cypher queries

Delete Node

AI-generated

Summary

Delete node(s) matching a specified label and property value from the Neo4j graph database, optionally removing connected relationships.

Inputs

  • Label (required) — The label of the node to delete.
  • Match Property (required) — The property name used to identify the node(s).
  • Match Value (required) — The property value to match for identifying the node(s) to delete.
  • Detach Relationships — Whether to also delete all relationships connected to the node (true for DETACH DELETE), or fail if relationships exist (false). Defaults to true.

Output shape

a single JSON object per item indicating success, number of nodes deleted, and number of relationships deleted

Returns an object with 'success' (boolean), 'nodesDeleted' (number), and 'relationshipsDeleted' (number) fields for each input item processed, paired with the input item index.

Links

Discussion