Can you create constraints on the relations?

CREATE CONSTRAINT unique_relationship ON (a:A)-[r:MAJOR|MINOR]->(b:B) ASSERT (SIZE((a)-[:MAJOR|MINOR]-(b)) <= 1)

trying to create this unique constraint where there can only exist one type of relation that is MAJOR or MINOR between these 2 nodes

getting this error

Invalid input '-': expected "ASSERT" or "REQUIRE" (line 2, column 18 (offset: 55)) "ON (a:GuessAnime)-[r:MAJOR|MINOR]->(b:GuessEmoji)

Not valid. You could look at using an apoc trigger to determine the size and throw an error when it doesn’t meet your requirement.