Files
speckle-server/packages/server/test/graphql/notifications.ts
T
Daniel Gak Anagrov 3ca4a11ca3 feat(notifications): basic listener structure, notification record, delayed mechanism (#5432)
* feat: basic notification listener sturcuture

* feat: clean up generated gql

* chore: edited structure

* feat: added basic repo

* feat: ported comment email to job queue

* feat: ported stream access request accepted

* feat: added notification insertion

* fix: minor typings

* feat: delayed notifications

* updated types

* feat: fixed gql

* notifications are listed

* index on notifications

* feat: while loop skiping for update locked

* delayed notification for access request

* take into account user prefrences

* on comment view, notification is marked as read

* feat: added gql notifications

* feat: avoid raising errors

* fix: error added scopes

* fix: mr comments

* fix: cursor and service method

* feat: added stronger types to notifications and versioning logic

* minor: rows updated
2025-10-06 12:19:12 +01:00

37 lines
751 B
TypeScript

import gql from 'graphql-tag'
export const getUserNotifications = gql`
query GetUserNotifications($limit: Int, $cursor: String) {
activeUser {
notifications(limit: $limit, cursor: $cursor) {
items {
id
type
createdAt
payload
read
updatedAt
}
cursor
totalCount
}
}
}
`
export const deleteUserNotifications = gql`
mutation UserBulkDeleteNotidication($ids: [String!]!) {
notificationMutations {
bulkDelete(ids: $ids)
}
}
`
export const updateUserNotifications = gql`
mutation UserBulkUpdateNotifications($input: [NotificationUpdateInput!]!) {
notificationMutations {
bulkUpdate(input: $input)
}
}
`