I created a trigger with apoc.trigger.add:
CALL apoc.trigger.add('increase_followings_and_followers',
'UNWIND {createdRelationships} AS rel
WITH rel, STARTNODE(rel) as follower, ENDNODE(rel) AS followed WITH rel, follower, followed
WHERE TYPE(rel)="FOLLOW" and labels(followed)="User" and labels(follower)="User"
SET follower.followings = follower.followings +1, followed.followers= followed.followers+1',
{phase:'after'})
I build a socialnetwork, When a user follow another, trigger will auto increase follower number and following number. But It don't work and I can't create new relationship "FOLLLOW" between two User node