I did have a bit of a technical question if you've...
# prisma-whats-new
m
I did have a bit of a technical question if you've got a sec...
a
@mewdriller for sure! shoot
m
I'm wondering how to model a many-to-many where there are additional fields on the join.
I was looking through the UI and docs and couldn't find it.
I'm new to GraphQL though so I may be doing something silly.
n
you can use an intermediate model for this! 🙂 What situation do you want to model?
m
It's a basic task management modeling scenario.
Issues have many Iterations, Iterations have many Issues
But IterationIssues have additional fields like status, order, etc.
n
and what additional information do you want to store?
I see 🙂
m
So I should model it like a traditional SQL schema with a join table?
n
So you can create a model
IterationIssues
. One
IterationIssue
is connected to many `Issue`s and many `Iteration`s
Yea
then the
IterationIssue
can also store the status and order
m
OK great. That's easy enough. I was thinking I was supposed to do it on the relation itself.
n
oh wait. what do you want to express with the
order
?
m
It looks like I'm supposed to end it with
__Connection
... is that a thing?
order
is a sort-order within a
status
.
n
oh ok
you can name the model as you wish
m
OK great. Thanks for the help! 🙂
n
cheers! Happy to answer subsequent questions 🙂