notifier/notifier.graphql
Untone 8ef12063b0
All checks were successful
deploy / deploy (push) Successful in 1m45s
mutation-fi
2023-11-24 05:50:27 +03:00

47 lines
783 B
GraphQL

enum NotificationAction {
CREATE,
UPDATE,
DELETE,
SEEN
}
enum NotificationEntity {
SHOUT,
REACTION
}
type Notification {
id: Int!
action: NotificationAction!
entity: NotificationEntity!
created_at: Int!
seen: Boolean!
data: String # JSON
occurrences: Int
}
input NotificationsQueryParams {
limit: Int
offset: Int
}
type NotificationsQueryResult {
notifications: [Notification]!
total: Int!
unread: Int!
}
type NotificationSeenResult {
error: String
}
type Query {
loadNotifications(params: NotificationsQueryParams!): NotificationsQueryResult!
}
type Mutation {
markNotificationAsRead(notification_id: Int!): NotificationSeenResult!
markAllNotificationsAsRead: NotificationSeenResult!
}