pnicolaou
02/26/2018, 6:08 PMtype User {
name: String,
posts: [Post!]!
}
I want to replace the posts for the user. But I am not sure how.
If I do
mutation {
updateUser(
where: {id: "123"},
data: {
posts: {
create: [{title: 'hi}, {title: 'hey'}]
}
}
)
}
It just appends the posts, instead of replacing themcallmekatootie
02/27/2018, 4:23 AMpnicolaou
03/02/2018, 5:40 PMtype Posts = {
id: ID!
list: [Post!]!
}
And then I can replace it! Hope it helps for now