Skip to main content

Role

No description

type Role {
id: ID!
roleDefinition: RoleDefinition!
userId: Int!
access: RoleAccess!
createdAt: DateTime!
lastModifiedAt: DateTime!
createdBy: Int
lastModifiedBy: Int
}

Fields

Role.id ● ID! non-null scalar

Unique identifier for the role.

Generated automatically when the role is created and used to reference the role throughout the authorization system. This identifier remains constant for the lifetime of the role.

Role.roleDefinition ● RoleDefinition! non-null object

The role definition that serves as the template for this role.

Defines the domain, available permissions, and default access level that this role is based on. Contains the structural information that determines what this role can access.

Role.userId ● Int! non-null scalar

The identifier of the user assigned to this role.

References the user who has been granted the permissions defined by this role within the specified domain. Must be a positive integer representing a valid user.

Role.access ● RoleAccess! non-null enum

The access level granted by this role.

Determines the scope of permissions the user has within the role definition's domain. Higher access levels include all permissions from lower levels, creating a hierarchical permission structure.

Role.createdAt ● DateTime! non-null scalar

Timestamp when the role was created.

Automatically set when the role is first created and never changes thereafter. Used for audit trails and chronological ordering of roles.

Role.lastModifiedAt ● DateTime! non-null scalar

Timestamp when the role was last modified.

Automatically updated whenever the role properties are changed. Used for tracking role modifications and determining the most recent changes.

Role.createdBy ● Int scalar

Identifier of the user who created this role.

Tracks the user responsible for initially creating the role for audit and accountability purposes. May be null for system-generated roles or legacy data.

Role.lastModifiedBy ● Int scalar

Identifier of the user who last modified this role.

Tracks the user responsible for the most recent changes to the role for audit and accountability purposes. May be null for system-generated modifications or legacy data.

Returned By

role query ● roleCreate mutation ● roleUpdate mutation

Member Of

RoleDefinition object ● RoleResponse object