graphql: expose the humanName field on OAuth 2.0 sessions

This commit is contained in:
Quentin Gliech
2025-04-25 13:51:36 +02:00
parent 7ec87b1855
commit 79868c3ca3
3 changed files with 11 additions and 0 deletions

View File

@@ -128,6 +128,11 @@ impl OAuth2Session {
pub async fn last_active_at(&self) -> Option<DateTime<Utc>> {
self.0.last_active_at
}
/// The user-provided name for this session.
pub async fn human_name(&self) -> Option<&str> {
self.0.human_name.as_deref()
}
}
/// The application type advertised by the client.

View File

@@ -1064,6 +1064,10 @@ type Oauth2Session implements Node & CreationEvent {
The last time the session was active.
"""
lastActiveAt: DateTime
"""
The user-provided name for this session.
"""
humanName: String
}
type Oauth2SessionConnection {

View File

@@ -776,6 +776,8 @@ export type Oauth2Session = CreationEvent & Node & {
createdAt: Scalars['DateTime']['output'];
/** When the session ended. */
finishedAt?: Maybe<Scalars['DateTime']['output']>;
/** The user-provided name for this session. */
humanName?: Maybe<Scalars['String']['output']>;
/** ID of the object. */
id: Scalars['ID']['output'];
/** The last time the session was active. */