Hey, so maybe this is just a general GraphQL quest...
# orm-help
g
Hey, so maybe this is just a general GraphQL question, but I'm trying to do some basic relations with Prisma. The relation is as follows: There is a table that stores Users and a table that stores Vehicles. A single Vehicle can belong to many Users, and each User can configure things like the display name of that Vehicle. So my schema looks like this:
Copy code
type User {
  id: ID! @unique
  ...
  assets: [UserAsset!]! @relation(name: "UserToAsset", onDelete: CASCADE)
}

type Asset {
  assetId: String! @unique
  assetType: AssetType
  users: [UserAsset!]! @relation(name: "AssetToUser", onDelete: CASCADE)
}

type UserAsset {
  user: User! @relation(name: "UserToAsset")
  asset: Asset! @relation(name: "AssetToUser")
  name: String!
  ...
}
Is this the proper way to go about something like this?
n
consider to post your question in the Forum instead: https://www.prisma.io/forum/c/questions.