Samet
06/07/2020, 9:06 AMCompany -> Service -> Specialty -> Sub-Specialty
Each table will have only unique records. I tried creating a relations table but couldn't figure it out. How can I create this structure? Here is the datamodel I have right now:
type Company {
id: ID! @id
name: String! @unique
}
type Service {
id: ID! @id
name: String! @unique
companies: [Company]! @relation
specialties: [Specialty] @relation
}
type Specialty {
id: ID! @id
name: String! @unique
companies: [Company]! @relation
services: [Service] @relation
sub_specialties: [Specialty] @relation
}
Sachin Jani
06/08/2020, 5:35 AMSachin Jani
06/08/2020, 5:36 AMCompany
gotta have :
services: [Service!] @relation
specialties: [Specialty] @relation
Sachin Jani
06/08/2020, 5:37 AMSamet
06/08/2020, 7:30 AMSachin Jani
06/08/2020, 7:34 AMSamet
06/08/2020, 9:42 AM