mirror of
https://github.com/unraid/api.git
synced 2026-01-05 16:09:49 -06:00
## 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.
23 lines
502 B
TypeScript
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
|
|
}
|
|
}
|
|
}
|
|
`);
|