Joseph Carrington
01/29/2019, 6:38 PMtype CartItem {
id: ID! @unique
quantity: Int! @default(value: 1)
owner: PortalUser! @relation(name: "ItemOnUser")
productId: ID!
createdAt: DateTime!
updatedAt: DateTime!
dummy: String! @default(value: "Dummy")
}
type PortalUser {
portalId: String! @unique
createdAt: DateTime!
updatedAt: DateTime!
cart: [CartItem!]! @relation(name: "ItemOnUser", onDelete: CASCADE)
isGuest: Boolean! @default(value: "true")
dummy: String! @default(value: "Dummy")
}
Now I want to import a cart form one user to another. I’d like to run something like
`
updateManyCartItems(where:
{
owner: oldOwner
} data {
owner: newOwner
})
But I cannot batch edit the owners of cartItems (it’s just not an option under updateManyCartItems’ data arg). Why is this? I am sure this is trying to tell me something, but I am not sure what I should be learning from it. Thanks!