38 lines
582 B
GraphQL
38 lines
582 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 Query {
|
|
loadNotifications(params: NotificationsQueryParams!): NotificationsQueryResult!
|
|
}
|