I have two types of nodes: :Person and :Event.
Between these nodes there can be several different relations: :DECEDENT, :SPOUSE, :CHILD, :PARENT, etc.
Q1: Is it possible to set constraint on allowed relation types for specific :Event type?
Example:
For (:Event {id: "9452ae03-8f8c-4675-a7aa-21ed9e868559", type: "Death"}) only allowed relation should be (:Event)-[:DECEDENT]->(:Person) and all other relation types should be banned.
Q2: Is it possible to set limit on relation count per node?
Example: Following above case node :Person should be pointed by [0-1] :DECEDENT relation.
I would imagine syntax to be sth like:
CREATE CONSTRAINT ON (:Event)-(r:DECEDENT)->(:Person) ASSERT count(r) < 2