Is it possible to link two nodes together directly...
# prisma-whats-new
m
Is it possible to link two nodes together directly, like two
users
that are connected in a social network? Or would that have to occur via a secondary data table?
n
@martin you can define a many-to-many self-relation on the
User
type for this example 🙂 I personally prefer using a "through" type though that manages the relation and any additional information.
m
Thanks, @nilan. What do you mean by a “through” type? I guess a separate data table (“type”) that manages all relationships?
n
Exactly! In this case the type could be named
Friendship
with two
one-to-many
relations from
Friendship
to
User
👍🏽 1
m
Nice! 😊