I am quite new to Neo4J and struggling with the following:
I want to set property only if it does not exist yet (if it's null) and do not want to set property if it exists. How can I modify the query below to achieve that
MATCH (u:User)
WHERE u.uuid=$userId
SET u.unsubscribedAt = timestamp()
RETURN u
Thanks in advance
UPDATE 1:
One thing I forgot to mention: I still want to return the node regardless, so cannot add AND u.unsubscribedAt is null
in where clause