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!