Ecker
03/24/2019, 2:28 PMparent: User/Team!
directly.
type User {
id: ID! @unique
stats: Stats
}
type Team {
id: ID! @unique
stats: Stats
}
type Stats {
id: ID! @unique
parent: ID! # ← Is it possible to make this relationship point to a Team or a User, depending on which it belongs to?
parentType: String! # Is this needed? Is there a better approach?
}
Jscott388
03/24/2019, 4:58 PMEcker
03/24/2019, 5:11 PMJscott388
03/24/2019, 7:06 PMJscott388
03/24/2019, 7:12 PMEcker
03/24/2019, 8:56 PMEcker
03/24/2019, 9:20 PMunion
, except it's not supported yet: https://github.com/prisma/prisma/issues/165