Core objects for managing users, authentication, and permissions in Wisdom AI.

Overview

User objects provide comprehensive user management capabilities, including authentication, preferences, and permission systems for controlling access to resources.

Core Objects

User

id
ID!
required
A unique identifier for the user.
email
String!
required
The user’s email address.
firstName
String
The user’s first name.
lastName
String
The user’s last name.
displayName
String!
required
The user’s display name (typically first name + last name or email).
avatar
String
URL to the user’s avatar image.
role
UserRole!
required
The user’s role in the system.
status
UserStatus!
required
The current status of the user account.
createdAt
DateTime!
required
The date and time when the user account was created.
updatedAt
DateTime!
required
The date and time when the user account was last updated.
lastLoginAt
DateTime
The date and time when the user last logged in.
preferences
UserPreferences
The user’s personal preferences and settings.
permissions
[Permission!]
The permissions granted to this user.

UserPreferences

theme
Theme
The user’s preferred UI theme.
language
String
The user’s preferred language code.
timezone
String
The user’s timezone.
notifications
NotificationPreferences
The user’s notification preferences.
defaultDomain
ID
The ID of the user’s default domain.

NotificationPreferences

email
Boolean!
required
Whether to receive email notifications.
inApp
Boolean!
required
Whether to receive in-app notifications.
digest
Boolean!
required
Whether to receive digest notifications.
frequency
NotificationFrequency!
required
How frequently to receive notifications.

Permission

id
ID!
required
A unique identifier for the permission.
name
String!
required
The name of the permission.
description
String
A description of what the permission allows.
resource
String
The resource this permission applies to.
action
String!
required
The action this permission allows.
scope
PermissionScope
The scope of the permission.

Enums

UserRole

The role of a user in the system. Values:
  • ADMIN - System administrator with full access
  • EDITOR - Can create and edit content
  • VIEWER - Can view content but not edit
  • ANALYST - Can perform data analysis
  • GUEST - Limited access guest user

UserStatus

The status of a user account. Values:
  • ACTIVE - User account is active
  • INACTIVE - User account is inactive
  • SUSPENDED - User account is suspended
  • PENDING - User account is pending activation
  • DELETED - User account has been deleted

Theme

UI theme options. Values:
  • LIGHT - Light theme
  • DARK - Dark theme
  • AUTO - Automatically switch based on system preference

NotificationFrequency

Frequency options for notifications. Values:
  • IMMEDIATE - Send notifications immediately
  • HOURLY - Send notifications hourly
  • DAILY - Send notifications daily
  • WEEKLY - Send notifications weekly
  • NEVER - Never send notifications

PermissionScope

The scope of a permission. Values:
  • GLOBAL - Permission applies globally
  • DOMAIN - Permission applies to specific domains
  • CONNECTION - Permission applies to specific connections
  • USER - Permission applies to specific users

Scalar Types

DateTime

A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the date-time format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar.

JSON

The JSON scalar type represents JSON values as specified by ECMA-404.

ID

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable.

String

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

Boolean

The Boolean scalar type represents true or false.

Int

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

Additional Resources