removeRole
Requires permission settings:role:delete.
Deletes a role by soft-deleting it. System roles cannot be deleted. Returns true on success. Needs settings:role:delete.
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 RemoveRole($id: ID!) {
removeRole(id: $id)
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation RemoveRole($id: ID!) {\n removeRole(id: $id)\n}",
"variables": {
"id": "id"
}
}
EOF
Variables:
{
"id": "id"
}
Response:
{
"data": {
"removeRole": true
}
}
removeRole(
id: ID!
): Boolean!
Arguments
removeRole.id ● ID! non-null scalar
The ID of the role.
Type
Boolean scalar
The Boolean scalar type represents true or false.