notifier/notifier.graphql

47 lines
783 B
GraphQL
Raw Normal View History

2023-11-24 02:45:38 +00:00
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!
}
2023-11-24 02:50:27 +00:00
type NotificationSeenResult {
error: String
}
2023-11-24 02:45:38 +00:00
type Query {
loadNotifications(params: NotificationsQueryParams!): NotificationsQueryResult!
}
2023-11-24 02:50:27 +00:00
type Mutation {
markNotificationAsRead(notification_id: Int!): NotificationSeenResult!
markAllNotificationsAsRead: NotificationSeenResult!
}