notifications schema

This commit is contained in:
2025-11-05 11:46:27 -08:00
parent 5c62d45068
commit c73e66cbe8
2 changed files with 96 additions and 0 deletions

View File

@@ -28,6 +28,12 @@ type Query {
when: DateTime = null
): CountLeaderboardGQL!
getMedals(scope: MedalScope!, userId: Int = null): RequestedMedalsGQL!
notifications(
limit: Int! = 20
offset: Int! = 0
filters: NotificationFilters = null
): NotificationConnection!
unreadNotificationCount: Int!
getRuns(
filterInput: RunFilterInput!
runIds: [Int!] = null
@@ -714,6 +720,36 @@ input MedalScope @oneOf {
datetimeRange: DatetimeRangeAggregationInput
}
type NotificationConnection {
notifications: [NotificationGQL!]!
totalCount: Int!
unreadCount: Int!
hasMore: Boolean!
}
type NotificationGQL {
id: Int!
notificationType: NotificationTypeEnum!
actor: UserGQL!
videoId: Int
comment: CommentGQL
reactionType: String
isRead: Boolean!
createdAt: DateTime!
readAt: DateTime
}
enum NotificationTypeEnum {
COMMENT
COMMENT_REPLY
REACTION
}
input NotificationFilters {
isRead: Boolean = null
notificationTypes: [NotificationTypeEnum!] = null
}
type GetRunsResult {
runs: [RunGQL!]!
count: Int
@@ -915,6 +951,10 @@ type Mutation {
reason: ReportReasonEnum!
customReason: String = null
): Boolean!
markNotificationAsRead(notificationId: Int!): Boolean!
markAllNotificationsAsRead: Boolean!
markNotificationsAsRead(notificationIds: [Int!]!): Boolean!
deleteNotification(notificationId: Int!): Boolean!
addAnnotationToShot(
shotId: Int!
annotationName: String!