githubEdit

userUser

User Type

Represents a user in the system. Users are authenticated entities that can perform operations within their assigned tenant and roles.

Fields

Field
Type
Description

id

ID!

Unique identifier of the user

createdAt

Time!

Creation timestamp

createdBy

UUID!

User identifier who created this user

updatedAt

Time

Last update timestamp

updatedBy

UUID

User identifier who last updated this user

deletedAt

Time

Deletion timestamp

deletedBy

UUID

User identifier who deleted this user

tenantID

UUID!

Tenant identifier

idpID

String!

Identity provider user identifier

username

String!

Username for the user

email

String!

Email address of the user

firstName

String!

First name of the user

lastName

String!

Last name of the user

isAdmin

Boolean!

Whether the user has administrative privileges

legacyRoles

[String!]!

DEPRECATED: Legacy JSONB column for backward compatibility

tenant

Tenant!

Associated tenant

Connection Fields

The roles, groups, and deviceUsersUsers fields return Connection objects that support pagination, filtering, and ordering.

roles Connection

groups Connection

deviceUsersUsers Connection

Argument
Type
Description

after

Cursor

Returns elements after this cursor

first

Int

Returns the first n elements

before

Cursor

Returns elements before this cursor

last

Int

Returns the last n elements

orderBy

*Order

Ordering options (specific to each connection)

where

*WhereInput

Filtering options (specific to each connection)

Interfaces

  • Node

Usage Example

Query with Filtering on Roles

Relations

  • User N:1 Tenant: A user belongs to one tenant

  • User M:N Role: A user can have multiple roles

  • User M:N Group: A user can belong to multiple groups

  • User 1:N DeviceUser: A user can be associated with multiple devices

Authentication

Users are authenticated through external identity providers (IDP) using the idpID field. The system supports role-based access control (RBAC) through the relationships with roles and groups.

Last updated

Was this helpful?