I'm facing the same problem, I need to update relations but the integer "id" field is required for this and I didn't get it from anywhere , in my case I have "users" collection that have a many-to-one relationship with "position" collection my update graphql looks like this:
mutation AssignUserToPosition($id: ID!,
$data:UsersPermissionsUserInput!) {
updateUsersPermissionsUser(id: $id, data: $data) {
data {
documentId
}
}}
when I pass this for variables:
{
id: "asdfghjkdsjkgjdvgskl",
data: { position: "laskfjfpgiewjgwp" }
}
I found it like this in strapi v5 documentation this article
So please it's Urgent If anyone knows a solution or can give us a hint of how to preceed with this.
Thank you