removePermissionFromRole
Requires permission settings:permission:update.
Removes a permission from a role. Returns true on success. Needs settings:permission: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 RemovePermissionFromRole($input: RemovePermissionInput!) {
removePermissionFromRole(input: $input)
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation RemovePermissionFromRole($input: RemovePermissionInput!) {\n removePermissionFromRole(input: $input)\n}",
"variables": {
"input": {
"permissionId": "id",
"roleId": "id"
}
}
}
EOF
Variables:
{
"input": {
"permissionId": "id",
"roleId": "id"
}
}
Response:
{
"data": {
"removePermissionFromRole": true
}
}
removePermissionFromRole(
input: RemovePermissionInput!
): Boolean!
Arguments
removePermissionFromRole.input ● RemovePermissionInput! non-null input
The role and the permission to remove.
Type
Boolean scalar
The Boolean scalar type represents true or false.