AccountViewer
The authenticated human user (account).
Returned by the viewer query when the request is authenticated with a user session or
on behalf of a human account. Contains profile information, organization memberships,
linked OAuth identities, and pending group invitations.
Use organizations to build an org switcher, defaultOrganization to set an initial
context, and invites to show pending invitations the user can accept.
type AccountViewer {
id: ID!
email: String!
firstName: String
lastName: String
createdAt: DateTime!
updatedAt: DateTime!
avatar: AvatarViewer
organizations(
sort: ViewerOrganizationsSort
cursor: Cursor
): ViewerOrganizationsPage
defaultOrganization: ViewerOrganization
identities(
sort: IdentitiesSort
cursor: Cursor
): IdentitiesViewerPage
invites(
sort: InvitesSort
cursor: Cursor
): InvitesViewerPage
}
Fields
AccountViewer.id ● ID! non-null scalar {#id}
Unique identifier for this account.
AccountViewer.email ● String! non-null scalar {#email}
Primary email address associated with the account.
AccountViewer.firstName ● String scalar {#first-name}
First name, if set in the user's profile.
AccountViewer.lastName ● String scalar {#last-name}
Last name, if set in the user's profile.
AccountViewer.createdAt ● DateTime! non-null scalar {#created-at}
When this account was created (UTC).
AccountViewer.updatedAt ● DateTime! non-null scalar {#updated-at}
When this account's profile was last modified (UTC).
AccountViewer.avatar ● AvatarViewer object {#avatar}
The user's profile avatar image, or null if none has been uploaded.
AccountViewer.organizations ● ViewerOrganizationsPage object {#organizations}
Organizations you are a member of.
Returns a paginated list of all organizations where you have at least one group membership. Defaults to alphabetical order by name.
AccountViewer.organizations.sort ● ViewerOrganizationsSort input {#account-viewer-organizations-sort}
Sort field and direction. Defaults to name ascending.
AccountViewer.organizations.cursor ● Cursor input {#account-viewer-organizations-cursor}
Pagination cursor from a previous response to fetch the next page.
AccountViewer.defaultOrganization ● ViewerOrganization object {#default-organization}
Your most recently joined organization.
Useful for setting a default context when the user first opens the application.
Returns null if the user does not belong to any organization.
AccountViewer.identities ● IdentitiesViewerPage object {#identities}
OAuth and OIDC provider identities linked to your account.
Lists all external authentication providers (e.g., Google, GitHub) that you have connected. You can sign in with any linked identity.
AccountViewer.identities.sort ● IdentitiesSort input {#account-viewer-identities-sort}
Sort field and direction. Defaults to provider name ascending.
AccountViewer.identities.cursor ● Cursor input {#account-viewer-identities-cursor}
Pagination cursor from a previous response to fetch the next page.
AccountViewer.invites ● InvitesViewerPage object {#invites}
Pending group membership invitations.
Lists invitations from organizations you have not yet accepted. Use the
acceptGroupInvite mutation to accept an invitation and join the group.
Defaults to newest first.
AccountViewer.invites.sort ● InvitesSort input {#account-viewer-invites-sort}
Sort field and direction. Defaults to newest first.
AccountViewer.invites.cursor ● Cursor input {#account-viewer-invites-cursor}
Pagination cursor from a previous response to fetch the next page.
Implemented By
Viewer union