Hi, I can’t seem to figure out how to remove a relationship.
I have a very simple schema:
type User {
id: ID!
email: String! @id
following: [User] @hasInverse(field: "followers")
followers: [User] @hasInverse(field: "following")
}
and a GQL operations:
mutation followUser($id: ID!, $followUserId: ID!) {
updateUser(
input: { filter: { id: [$id] }, set: { following: { id: $followUserId } } }
) {
user {
...UserFields
}
}
}
mutation unfollowUser($id: ID!, $followUserId: ID!) {
# ?
}
I can’t for the life of me figure out how to remove a relation. All relation operations seem to be additive.
Any suggestions?