Social products are a classic graph use case: people (or accounts) are nodes, and follows, likes, friendships, and messages are edges, often with timestamps or weights on the edge row.
SurrealDB fits this well because edges are tables: you can store how strong a tie is, or derive strength from repeated interactions, without cramming that into either user profile.
Weight on the edge record
These examples use a small npc population and random pairwise interactions. Each knows edge accumulates a greeted counter whenever two NPCs interact again.
Counting parallel edges instead
If each interaction is its own edge row, aggregate to find the strongest ties:
Friendship and symmetric ties
For mutual “friend” relations where direction should not matter, combine unique indexes on sorted endpoints with <-> traversal so you query both orientations consistently.
Related guides
Record links vs graph relations, when edges win for interaction metadata and scoring.
Graph traversal, arrow syntax for multi-hop social feeds.