Skip to main content

removeUserFromRole

Requires permission settings:role:update.

Removes a user from a role. Returns true on success. Needs settings:role:update.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation RemoveUserFromRole($input: RemoveUserFromRoleInput!) {
removeUserFromRole(input: $input)
}

Variables:

{
"input": {
"roleId": "id",
"userId": "id"
}
}

Response:

{
"data": {
"removeUserFromRole": true
}
}
removeUserFromRole(
input: RemoveUserFromRoleInput!
): Boolean!

Arguments​

removeUserFromRole.input ● RemoveUserFromRoleInput! non-null input​

The user and the role to remove them from.

Type​

Boolean scalar​

The Boolean scalar type represents true or false.