RoleDefinition
No description
type RoleDefinition {
id: ID!
name: String!
descriptions: [LocalizedString!]!
defaultAccess: RoleAccess!
createdAt: DateTime!
lastModifiedAt: DateTime!
createdBy: Int
lastModifiedBy: Int
roles(
userId: Int!
): [Role!]!
}
Fields
RoleDefinition.id
● ID!
non-null scalar
Unique identifier for the role definition.
Generated automatically when the role definition is created and used to reference the definition throughout the authorization system. This identifier remains constant for the lifetime of the definition.
RoleDefinition.name
● String!
non-null scalar
The domain name of the role definition.
Unique identifier name for the role definition domain, limited to 64 characters. Used to categorize and organize roles within the authorization system and must be unique across all definitions.
RoleDefinition.descriptions
● [LocalizedString!]!
non-null object
Localized descriptions of the role definition in multiple languages.
Provides human-readable descriptions of the role definition's purpose and scope in different languages for internationalization support. Must contain at least one description entry.
RoleDefinition.defaultAccess
● RoleAccess!
non-null enum
The default access level for roles created from this definition.
Specifies the default permission level that will be assigned when creating new roles based on this definition. Can be overridden during individual role creation to grant different access levels.
RoleDefinition.createdAt
● DateTime!
non-null scalar
Timestamp when the role definition was created.
Automatically set when the role definition is first created and never changes thereafter. Used for audit trails and chronological ordering of definitions.
RoleDefinition.lastModifiedAt
● DateTime!
non-null scalar
Timestamp when the role definition was last modified.
Automatically updated whenever the role definition properties are changed. Used for tracking definition modifications and determining the most recent changes.
RoleDefinition.createdBy
● Int
scalar
Identifier of the user who created this role definition.
Tracks the user responsible for initially creating the role definition for audit and accountability purposes. May be null for system-generated definitions or legacy data.
RoleDefinition.lastModifiedBy
● Int
scalar
Identifier of the user who last modified this role definition.
Tracks the user responsible for the most recent changes to the role definition for audit and accountability purposes. May be null for system-generated modifications or legacy data.
RoleDefinition.roles
● [Role!]!
non-null object
Collection of roles created from this role definition.
Contains all active roles that are based on this definition, showing which users have been assigned roles within this domain and their respective access levels.
RoleDefinition.roles.userId
● Int!
non-null scalar
Unique identifier of the user to retrieve roles for.
Must be a positive integer representing a valid user ID in the system.
Returned By
roleDefinition
query ● roleDefinitionCreate
mutation ● roleDefinitionUpdate
mutation
Member Of
Role
object ● RoleDefinitionResponse
object