notifications operations

This commit is contained in:
2025-11-05 13:30:31 -08:00
parent 2938a78b75
commit 76b5792fd6
2 changed files with 546 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
query GetNotifications(
$limit: Int! = 20
$offset: Int! = 0
$filters: NotificationFilters = null
) {
notifications(limit: $limit, offset: $offset, filters: $filters) {
notifications {
...NotificationFragment
}
totalCount
unreadCount
hasMore
}
}
query GetUnreadNotificationCount {
unreadNotificationCount
}
mutation MarkNotificationAsRead($notificationId: Int!) {
markNotificationAsRead(notificationId: $notificationId)
}
mutation MarkNotificationsAsRead($notificationIds: [Int!]!) {
markNotificationsAsRead(notificationIds: $notificationIds)
}
mutation MarkAllNotificationsAsRead {
markAllNotificationsAsRead
}
mutation DeleteNotification($notificationId: Int!) {
deleteNotification(notificationId: $notificationId)
}
fragment NotificationFragment on NotificationGQL {
id
notificationType
actor {
id
username
profileImageUri
}
videoId
comment {
id
message
user {
id
username
profileImageUri
}
}
reactionType
isRead
createdAt
readAt
}