The APOC library contains a procedure that that can be used to delete graph data.
The below example will further explain this procedure.
CALL apoc.nodes.delete(s, 1000) YIELD value
apoc.nodes.delete calls the Cypher query
DETACH DELETE to delete nodes in batches.
Cypher can also be used to delete nodes with a given id in batches.
DETACH DELETE s
} IN TRANSACTIONS OF 1000 ROWS