I know that there is no restriction on naming relationships, although it is difficult to get one guide and work with it on all the relationships that we may encounter.
You would go with something like this:
(u:User)-[:LIKES]->(p:Post)
(u:User)-[:LIKES]->(c:Comment)
and then a label-based query; Or something like this:
(u:User)-[:LIKES_POST]->(p:Post)
(u:User)-[:LIKES_COMMENT]->(c:Comment)
Another case is a streaming chat application in which it Usercan start a stream with several other users, here is the structure I have in mind:
# the thread
CREATE (ct:ChatThread {created_at: timestamp()})
# the thread starter
(u:User {user: 1})<-[:IN_THREAD {type: 'owner'}]-(ct)
# members of the thread
(u:User {user: 2})<-[:IN_THREAD {type: 'member'}]-(ct)
(u:User {user: 3})<-[:IN_THREAD {type: 'member'}]-(ct)
source
share