79443469

Date: 2025-02-16 16:03:38
Score: 8.5 🚩
Natty:
Report link

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

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Blacklisted phrase (1): this article
  • Blacklisted phrase (0.5): I need
  • Blacklisted phrase (1): m facing the same problem
  • Blacklisted phrase (1): anyone knows
  • RegEx Blacklisted phrase (2): Urgent
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Me too answer (2.5): I'm facing the same problem
  • Low reputation (1):
Posted by: Assia Nour