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:
- GraphQL
- cURL
mutation RemoveUserFromRole($input: RemoveUserFromRoleInput!) {
removeUserFromRole(input: $input)
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation RemoveUserFromRole($input: RemoveUserFromRoleInput!) {\n removeUserFromRole(input: $input)\n}",
"variables": {
"input": {
"roleId": "id",
"userId": "id"
}
}
}
EOF
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.