Mutations

circle-exclamation

roleAssign

Assigns a role to an actor.

roleAssign(
    input: RoleAssignInput!
  ): ActorRolePayload

Arguments

Name
Type
Description

input

RoleAssignInput!

The input fields for assigning the role.

Input types:

chevron-rightRoleAssignInputhashtag

Input for assigning a role to an actor.

Field
Type
Description

actorId

ID!

The actor ID (user or integration).

roleId

ID!

The role ID to assign.

expireDate

DateTime

The expiration date. Null means the role is permanent.

Output types:

chevron-rightActorRolePayloadhashtag

The result of a role assignment mutation.

Field
Type
Description

actorRole

The created role assignment.

chevron-rightActorRole (entity)hashtag

An assignment of a role to an actor.

Implements: Node

Field
Type
Description

id

ID!

A globally unique identifier. This ID is opaque and should not be parsed by clients.

actor

The actor receiving the role.

role

The role being assigned.

assignedAt

DateTime!

The date and time when the role was assigned.

assignedBy

The actor who assigned the role.

expireDate

DateTime

The date and time when the role expires. Null means the role is permanent.


roleRevoke

Revokes a role from an actor.

Arguments

Name
Type
Description

input

RoleRevokeInput!

The input fields for revoking the role.

Input types:

chevron-rightRoleRevokeInputhashtag

Input for revoking a role from an actor.

Field
Type
Description

actorRoleId

ID!

The actor role assignment ID to revoke.

Output types:

chevron-rightDeletePayloadhashtag

The result of a delete mutation.

Field
Type
Description

deletedId

ID!

The ID of the deleted entity.


permissionGrant

Grants a permission to a role.

Arguments

Name
Type
Description

input

PermissionGrantInput!

The input fields for granting the permission.

Input types:

chevron-rightPermissionGrantInputhashtag

Input for granting a permission to a role.

Field
Type
Description

roleId

ID!

The role ID.

permissionScopeId

ID!

The permission scope ID.

targetEntityId

ID

The specific entity ID. Null means all entities of the type.

actions

The actions to allow.

Output types:

chevron-rightRolePermissionPayloadhashtag

The result of a permission grant mutation.

Field
Type
Description

rolePermission

The created permission.

chevron-rightRolePermission (entity)hashtag

A permission granted to a role.

Implements: Node

Field
Type
Description

id

ID!

A globally unique identifier. This ID is opaque and should not be parsed by clients.

role

The role receiving the permission.

permissionScope

The permission scope being granted.

targetEntityId

ID

The specific entity ID this permission applies to. Null means all entities of the type.

actions

The actions allowed by this permission.

grantedAt

DateTime!

The date and time when the permission was granted.

grantedBy

The actor who granted the permission.


permissionRevoke

Revokes a permission from a role.

Arguments

Name
Type
Description

input

PermissionRevokeInput!

The input fields for revoking the permission.

Input types:

chevron-rightPermissionRevokeInputhashtag

Input for revoking a permission from a role.

Field
Type
Description

permissionId

ID!

The role permission ID to revoke.

Output types:

chevron-rightDeletePayloadhashtag

The result of a delete mutation.

Field
Type
Description

deletedId

ID!

The ID of the deleted entity.


userScopeSet

Sets a user scope restriction.

Arguments

Name
Type
Description

input

UserScopeSetInput!

The input fields for setting the user scope.

Input types:

chevron-rightUserScopeSetInputhashtag

Input for setting a user scope restriction.

Field
Type
Description

actorId

ID!

The actor ID to restrict.

permissionScopeId

ID!

The permission scope ID.

targetEntityId

ID!

The specific entity ID to allow access to.

actions

The actions to allow.

Output types:

chevron-rightUserScopePayloadhashtag

The result of a user scope mutation.

Field
Type
Description

userScope

The created user scope restriction.

chevron-rightUserScope (entity)hashtag

A whitelist filter that restricts an actor's access to specific entities. When present, effective permissions = role permissions ∩ user scope.

Implements: Node

Field
Type
Description

id

ID!

A globally unique identifier. This ID is opaque and should not be parsed by clients.

actor

The actor being restricted.

permissionScope

The permission scope being filtered.

targetEntityId

ID!

The specific entity the actor can access.

actions

The actions allowed on this specific entity.


userScopeRemove

Removes a user scope restriction.

Arguments

Name
Type
Description

input

UserScopeRemoveInput!

The input fields for removing the user scope.

Input types:

chevron-rightUserScopeRemoveInputhashtag

Input for removing a user scope restriction.

Field
Type
Description

userScopeId

ID!

The user scope ID to remove.

Output types:

chevron-rightDeletePayloadhashtag

The result of a delete mutation.

Field
Type
Description

deletedId

ID!

The ID of the deleted entity.


roleCreate

Creates a new role.

Arguments

Name
Type
Description

input

RoleCreateInput!

The input fields for creating the role.

Input types:

chevron-rightRoleCreateInputhashtag

Input for creating a role.

Field
Type
Description

organizationId

ID!

The organization that will own the item.

code

Code!

The machine-readable code.

title

String!

The display name.

order

Int

The display order.

meta

The display properties.

chevron-rightCatalogItemMetaInputhashtag

Display properties for catalog items.

Field
Type
Description

description

String

The description.

hidden

Boolean

Whether the item is hidden from regular UI lists.

textColor

HexColorCode

The text color for UI display.

backgroundColor

HexColorCode

The background color for UI display.

icon

String

A relative URL to the icon.

Output types:

chevron-rightRolePayloadhashtag

The result of a role mutation.

Field
Type
Description

role

The created or updated role.

chevron-rightRole (entity)hashtag

A role that can be assigned to actors to grant permissions.

Implements: CatalogItem, Node, Versioned, Titled

Field
Type
Description

id

ID!

A globally unique identifier.

version

Int!

The version number for optimistic locking.

title

String!

The human-readable display name. Can be localized.

code

Code!

A machine-readable code, unique within the catalog scope.

order

Int!

The display order within the same level or category.

catalog

The catalog this item belongs to.

organization

The organization that owns this item. Null for system items.

meta

Metadata about this item including description, origin, and display properties.

permissions

The permissions assigned to this role.


roleUpdate

Updates a role.

Arguments

Name
Type
Description

input

RoleUpdateInput!

The input fields for updating the role.

Input types:

chevron-rightRoleUpdateInputhashtag

Input for updating a role.

Field
Type
Description

id

ID!

The item ID to update.

version

Int!

The current version for optimistic locking.

title

String

The new display name.

order

Int

The new display order.

meta

The display properties.

chevron-rightCatalogItemMetaInputhashtag

Display properties for catalog items.

Field
Type
Description

description

String

The description.

hidden

Boolean

Whether the item is hidden from regular UI lists.

textColor

HexColorCode

The text color for UI display.

backgroundColor

HexColorCode

The background color for UI display.

icon

String

A relative URL to the icon.

Output types:

chevron-rightRolePayloadhashtag

The result of a role mutation.

Field
Type
Description

role

The created or updated role.

chevron-rightRole (entity)hashtag

A role that can be assigned to actors to grant permissions.

Implements: CatalogItem, Node, Versioned, Titled

Field
Type
Description

id

ID!

A globally unique identifier.

version

Int!

The version number for optimistic locking.

title

String!

The human-readable display name. Can be localized.

code

Code!

A machine-readable code, unique within the catalog scope.

order

Int!

The display order within the same level or category.

catalog

The catalog this item belongs to.

organization

The organization that owns this item. Null for system items.

meta

Metadata about this item including description, origin, and display properties.

permissions

The permissions assigned to this role.


roleDelete

Deletes a role.

Arguments

Name
Type
Description

input

CatalogItemDeleteInput!

The input fields for deleting the role.

Input types:

chevron-rightCatalogItemDeleteInputhashtag

Input for deleting a catalog item.

Field
Type
Description

id

ID!

The catalog item ID to delete.

version

Int!

The current version for optimistic locking.

Output types:

chevron-rightDeletePayloadhashtag

The result of a delete mutation.

Field
Type
Description

deletedId

ID!

The ID of the deleted entity.


Last updated

Was this helpful?