mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
feat(server): support read all notifications (#13083)
close AF-2719 #### PR Dependency Tree * **PR #13083** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added the ability to mark all notifications as read with a single action. * **Bug Fixes** * Ensured notifications marked as read are no longer shown as unread. * **Tests** * Introduced new tests to verify the functionality of marking all notifications as read. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -1989,6 +1989,14 @@ export const quotaQuery = {
|
||||
deprecations: ["'storageQuota' is deprecated: use `UserQuotaType['usedStorageQuota']` instead"],
|
||||
};
|
||||
|
||||
export const readAllNotificationsMutation = {
|
||||
id: 'readAllNotificationsMutation' as const,
|
||||
op: 'readAllNotifications',
|
||||
query: `mutation readAllNotifications {
|
||||
readAllNotifications
|
||||
}`,
|
||||
};
|
||||
|
||||
export const readNotificationMutation = {
|
||||
id: 'readNotificationMutation' as const,
|
||||
op: 'readNotification',
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
mutation readAllNotifications {
|
||||
readAllNotifications
|
||||
}
|
||||
@@ -1371,6 +1371,8 @@ export interface Mutation {
|
||||
publishPage: DocType;
|
||||
/** queue workspace doc embedding */
|
||||
queueWorkspaceEmbedding: Scalars['Boolean']['output'];
|
||||
/** mark all notifications as read */
|
||||
readAllNotifications: Scalars['Boolean']['output'];
|
||||
/** mark notification as read */
|
||||
readNotification: Scalars['Boolean']['output'];
|
||||
recoverDoc: Scalars['DateTime']['output'];
|
||||
@@ -5218,6 +5220,15 @@ export type QuotaQuery = {
|
||||
} | null;
|
||||
};
|
||||
|
||||
export type ReadAllNotificationsMutationVariables = Exact<{
|
||||
[key: string]: never;
|
||||
}>;
|
||||
|
||||
export type ReadAllNotificationsMutation = {
|
||||
__typename?: 'Mutation';
|
||||
readAllNotifications: boolean;
|
||||
};
|
||||
|
||||
export type ReadNotificationMutationVariables = Exact<{
|
||||
id: Scalars['String']['input'];
|
||||
}>;
|
||||
@@ -6352,6 +6363,11 @@ export type Mutations =
|
||||
variables: PublishPageMutationVariables;
|
||||
response: PublishPageMutation;
|
||||
}
|
||||
| {
|
||||
name: 'readAllNotificationsMutation';
|
||||
variables: ReadAllNotificationsMutationVariables;
|
||||
response: ReadAllNotificationsMutation;
|
||||
}
|
||||
| {
|
||||
name: 'readNotificationMutation';
|
||||
variables: ReadNotificationMutationVariables;
|
||||
|
||||
Reference in New Issue
Block a user