Hey there!
I am currently wondering what the recommended approach is to store the state of a relation between two nodes.
For the example, let us set the following social network-y idea:
- Nodes are users
- Friendships are relations
- Friendships need to be requested and can then be accepted or denied.
Point 3. introduces a "state" the friendship can be in (requested, accepted, denied).
My initial approach was to use different relation labels (:friendship_requested
, :friendship_denied
, :friends
). This makes querying for specific states very easy.
But now I start to wonder if it would be better to just have one type of relation, :friends
, and add a parameter to store the friendships state.
How would you recommend to model relations with a state in the graph?