Ah, sorry. This is not a deep mutation. You are just changing an edge of the parent node. So if the other role already exist then you will just need the id of the other role node.
Let’s assume the role you want to add is 0x6 to the user with od 0x3. If you want to add a new one not existing you can also do that.
Since it is a one-to-one relationship you can do it all in a single mutation.
mutation changeRole {
updateUser(input: {
filter: { id: ["0x3"] }
set: {
role: {
id: "0x6"
}
}
}) {
user {
id
email
userName
role {
id
type
}
}
}
}