I was wondering if someone could help with seeding...
# orm-help
d
I was wondering if someone could help with seeding this schema. Or if i am doing it completely wrong please tell me.
Copy code
type Tenant {
  id: ID! @unique
}

type User {
  id: ID! @unique

  owns: [Project!] @relation(name: "EquipmentToOwners")
  rents: [Project!] @relation(name: "EquipmentToRenters")

  tenants: [Tenant!]!
}

type Equipment {
  id ID! @unique

  owners: [User!] @relation(name: "EquipmentToOwners")
  renters: [User!] @relation(name: "EquipmentToRenters")

  tenant: Tenant!
}
n
how are you trying to seed it?
d
Through the seed.graphql
When I create a user with create tenant then create equipment since it wants the tenant on equipment too but don’t know how to attach it to the one created.
n
I recommend posting your question here: https://www.graph.cool/forum/c/questions Including schema, seed.graphql etc. 🙂