Showing results for 
Search instead for 
Did you mean: 

Head's Up! Site migration is underway. Expect disruption to service on Thursday, Feb. 9!

use of 'after' phase in trigger

Node Link

with reference to the:  Solved: Freezed query after implemented AFTER trigger - Neo4j - 14059  , I understood that we should not use 'after' phase selector while creating a trigger for a 'create' event.
I was trying to create a trigger. Which is:

CALL apoc.trigger.add('updateLabela',"UNWIND apoc.trigger.nodesByLabel($removedLabels,'Actor') AS node
MATCH (n:Actor)
REMOVE n:Actor SET n:Person SET node:Person", {phase:'after'})
 basically it's a trigger for update event.
This works fine for 'before' phase, but for 'after' phase the queries never get terminated.

So, now I wonder what are the restrictions on using 'after' phase while creating triggers, what are the cases where we can use 'after' phase and where can we use other phases viz. 'before', 'rollback' and 'afterAync'.

Thank you.

As the tx is about to be committed doing updates on the graph in that phase might mess up the tx state,

better use afterAsync or before for that.

Node Link

Where can we use 'after' phase?