Hey I have a schema, where I want to replace posts...
# prisma-whats-new
p
Hey I have a schema, where I want to replace posts on update
Copy code
type User {
name: String,
posts: [Post!]!
}
I want to replace the posts for the user. But I am not sure how. If I do
Copy code
mutation {
updateUser(
where: {id: "123"},
data: {
posts: {
create: [{title: 'hi}, {title: 'hey'}]
}
}
)
}
It just appends the posts, instead of replacing them