Skip to main content

restoreRole

Requires permission settings:role:update.

Restores a soft-deleted role. Refused if the role is not deleted. 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 RestoreRole($id: ID!) {
restoreRole(id: $id) {
id
name
displayName
createdAt
deletedAt
deletedBy
permissions {
id
name
createdAt
action
description
direct
}
}
}

Variables:

{
"id": "id"
}

Response:

{
"data": {
"restoreRole": {
"id": "id",
"name": "string",
"displayName": "string",
"createdAt": "2025-01-15T00:00:00Z",
"deletedAt": "2025-01-15T00:00:00Z",
"deletedBy": "string",
"permissions": [
{
"id": "id",
"name": "string",
"createdAt": "2025-01-15T00:00:00Z",
"action": "string",
"description": "string",
"direct": true
}
]
}
}
}
restoreRole(
id: ID!
): Role!

Arguments​

restoreRole.id ● ID! non-null scalar​

The ID of the role.

Type​

Role object​

A role: a named set of permissions that can be given to users.