notifications operations
This commit is contained in:
58
src/operations/notifications.gql
Normal file
58
src/operations/notifications.gql
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user