Files
api/web/components/Notifications/graphql/notification.subscription.ts
Pujit Mehrotra 7588e0e3cf feat(web): improve notification count syncing (#1148)
## Summary by CodeRabbit

- **New Features**
- Added a refresh button in the notifications sidebar, allowing users to
update notification counts on demand.
- Introduced real-time updates for notification counts through a new
subscription.
- Enhanced GraphQL functionality to support recalculating notification
counts for archived and unread notifications.
  - Added a new mutation for recalculating the notifications overview.
- Implemented a new subscription to receive updates on notification
counts.
- Minor formatting update to the notifications title for improved
readability.
2025-02-19 14:25:04 -05:00

23 lines
502 B
TypeScript

import { graphql } from '~/composables/gql/gql';
export const notificationAddedSubscription = graphql(/* GraphQL */ `
subscription NotificationAddedSub {
notificationAdded {
...NotificationFragment
}
}
`);
export const notificationOverviewSubscription = graphql(/* GraphQL */ `
subscription NotificationOverviewSub {
notificationsOverview {
archive {
...NotificationCountFragment
}
unread {
...NotificationCountFragment
}
}
}
`);