You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-11-20 12:02:22 +03:00
Have a new viewer and viewerSession graphql query member
This deprecates `currentUser` and `currentBrowserSession`, but doesn't remove them (yet). Also start to split the root query in multiple objects
This commit is contained in:
@@ -30,6 +30,11 @@ export type AddEmailInput = {
|
||||
userId: Scalars['ID'];
|
||||
};
|
||||
|
||||
export type Anonymous = Node & {
|
||||
__typename?: 'Anonymous';
|
||||
id: Scalars['ID'];
|
||||
};
|
||||
|
||||
/**
|
||||
* An authentication records when a user enter their credential in a browser
|
||||
* session.
|
||||
@@ -249,9 +254,15 @@ export type RootQuery = {
|
||||
__typename?: 'RootQuery';
|
||||
/** Fetch a browser session by its ID. */
|
||||
browserSession?: Maybe<BrowserSession>;
|
||||
/** Get the current logged in browser session */
|
||||
/**
|
||||
* Get the current logged in browser session
|
||||
* @deprecated Use `viewerSession` instead.
|
||||
*/
|
||||
currentBrowserSession?: Maybe<BrowserSession>;
|
||||
/** Get the current logged in user */
|
||||
/**
|
||||
* Get the current logged in user
|
||||
* @deprecated Use `viewer` instead.
|
||||
*/
|
||||
currentUser?: Maybe<User>;
|
||||
/** Fetches an object given its ID. */
|
||||
node?: Maybe<Node>;
|
||||
@@ -267,6 +278,10 @@ export type RootQuery = {
|
||||
user?: Maybe<User>;
|
||||
/** Fetch a user email by its ID. */
|
||||
userEmail?: Maybe<UserEmail>;
|
||||
/** Get the viewer */
|
||||
viewer: Viewer;
|
||||
/** Get the viewer's session */
|
||||
viewerSession: ViewerSession;
|
||||
};
|
||||
|
||||
|
||||
@@ -501,6 +516,12 @@ export type VerifyEmailInput = {
|
||||
userEmailId: Scalars['ID'];
|
||||
};
|
||||
|
||||
/** Represents the current viewer */
|
||||
export type Viewer = Anonymous | User;
|
||||
|
||||
/** Represents the current viewer's session */
|
||||
export type ViewerSession = Anonymous | BrowserSession;
|
||||
|
||||
export type BrowserSession_SessionFragment = { __typename?: 'BrowserSession', id: string, createdAt: any, lastAuthentication?: { __typename?: 'Authentication', id: string, createdAt: any } | null } & { ' $fragmentName'?: 'BrowserSession_SessionFragment' };
|
||||
|
||||
export type BrowserSessionList_UserFragment = { __typename?: 'User', browserSessions: { __typename?: 'BrowserSessionConnection', edges: Array<{ __typename?: 'BrowserSessionEdge', cursor: string, node: (
|
||||
|
||||
Reference in New Issue
Block a user