Identity of impacted nodes/relationships following a write query

I am using neo4j java client. When a write query is successful, I know it is possible to know how many nodes have been created, updated or deleted, and same for relationships via SummaryCounters. However, is there a way to know exactly which nodes and relationships have been created/updated/deleted ?


You could use a serverside TransactionEventHandler. In it's afterCommit method you get a callback with exactly that information.
APOC Triggers (Neo4j APOC Procedures User Guide) leverage exactly that functionality.

As far as I know, TransactionEventHandler is not available in neo4j-java-driver. I have to add neo4j-graph-api dependency. Is it correct ?

TransactionEventHandlers are a server-side concept - so that code should be a separate module from your client -side part.

See Triggers in Neo4j | Max De Marzi for an example.