From 242afae92b6588c9c26d55fd6721206f06af24fb Mon Sep 17 00:00:00 2001 From: Loewy Date: Wed, 5 Nov 2025 11:46:27 -0800 Subject: [PATCH 1/6] notifications schema --- src/index.tsx | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/schema.gql | 40 ++++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index 92b7f38..d32db42 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -2286,6 +2286,7 @@ export type Mutation = { createSubscription: CreateSubscriptionResultGql; createUploadStream: CreateUploadStreamReturn; deleteComment: Scalars["Boolean"]["output"]; + deleteNotification: Scalars["Boolean"]["output"]; deleteTags: Scalars["Boolean"]["output"]; deleteUser: Scalars["Boolean"]["output"]; deleteVideo: Scalars["Boolean"]["output"]; @@ -2300,6 +2301,9 @@ export type Mutation = { getHlsInitUploadLink: GetUploadLinkReturn; getProfileImageUploadLink: GetProfileUploadLinkReturn; getUploadLink: GetUploadLinkReturn; + markAllNotificationsAsRead: Scalars["Boolean"]["output"]; + markNotificationAsRead: Scalars["Boolean"]["output"]; + markNotificationsAsRead: Scalars["Boolean"]["output"]; reactToVideo: Scalars["Boolean"]["output"]; reportContent: Scalars["Boolean"]["output"]; retireTags: Scalars["Boolean"]["output"]; @@ -2346,6 +2350,10 @@ export type MutationDeleteCommentArgs = { videoId: Scalars["Int"]["input"]; }; +export type MutationDeleteNotificationArgs = { + notificationId: Scalars["Int"]["input"]; +}; + export type MutationDeleteTagsArgs = { tagsToDelete: Array; videoId: Scalars["Int"]["input"]; @@ -2401,6 +2409,14 @@ export type MutationGetUploadLinkArgs = { videoId: Scalars["Int"]["input"]; }; +export type MutationMarkNotificationAsReadArgs = { + notificationId: Scalars["Int"]["input"]; +}; + +export type MutationMarkNotificationsAsReadArgs = { + notificationIds: Array; +}; + export type MutationReactToVideoArgs = { reaction?: InputMaybe; videoId: Scalars["Int"]["input"]; @@ -2441,6 +2457,38 @@ export type NoInitForChunkedUploadErr = { segmentType: StreamSegmentTypeEnum; }; +export type NotificationConnection = { + __typename?: "NotificationConnection"; + hasMore: Scalars["Boolean"]["output"]; + notifications: Array; + totalCount: Scalars["Int"]["output"]; + unreadCount: Scalars["Int"]["output"]; +}; + +export type NotificationFilters = { + isRead?: InputMaybe; + notificationTypes?: InputMaybe>; +}; + +export type NotificationGql = { + __typename?: "NotificationGQL"; + actor: UserGql; + comment?: Maybe; + createdAt: Scalars["DateTime"]["output"]; + id: Scalars["Int"]["output"]; + isRead: Scalars["Boolean"]["output"]; + notificationType: NotificationTypeEnum; + reactionType?: Maybe; + readAt?: Maybe; + videoId?: Maybe; +}; + +export enum NotificationTypeEnum { + Comment = "COMMENT", + CommentReply = "COMMENT_REPLY", + Reaction = "REACTION", +} + export type OtherErrorNeedsNote = { __typename?: "OtherErrorNeedsNote"; msg?: Maybe; @@ -2550,6 +2598,8 @@ export type Query = { getVideo: VideoGql; getVideoMakePercentageIntervals: Array; getVideos: Array; + notifications: NotificationConnection; + unreadNotificationCount: Scalars["Int"]["output"]; waitFor: Scalars["Float"]["output"]; }; @@ -2689,6 +2739,12 @@ export type QueryGetVideosArgs = { videoIds: Array; }; +export type QueryNotificationsArgs = { + filters?: InputMaybe; + limit?: Scalars["Int"]["input"]; + offset?: Scalars["Int"]["input"]; +}; + export type QueryWaitForArgs = { duration: Scalars["Float"]["input"]; }; diff --git a/src/schema.gql b/src/schema.gql index 9ca10fe..d4c9c37 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -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 @@ -715,6 +721,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 @@ -916,6 +952,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! From 58ab272289ebc136321f0e2b16dc44cd66ef4a89 Mon Sep 17 00:00:00 2001 From: Loewy Date: Wed, 5 Nov 2025 15:27:44 -0800 Subject: [PATCH 2/6] add follow enum --- src/index.tsx | 1 + src/schema.gql | 1 + 2 files changed, 2 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index d32db42..8a19c9a 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -2486,6 +2486,7 @@ export type NotificationGql = { export enum NotificationTypeEnum { Comment = "COMMENT", CommentReply = "COMMENT_REPLY", + Follow = "FOLLOW", Reaction = "REACTION", } diff --git a/src/schema.gql b/src/schema.gql index d4c9c37..37866a7 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -744,6 +744,7 @@ enum NotificationTypeEnum { COMMENT COMMENT_REPLY REACTION + FOLLOW } input NotificationFilters { From a3ac769cd411677edfc14386eefc58eb5b1a7244 Mon Sep 17 00:00:00 2001 From: Loewy Date: Wed, 5 Nov 2025 13:30:31 -0800 Subject: [PATCH 3/6] notifications operations --- src/index.tsx | 488 +++++++++++++++++++++++++++++++ src/operations/notifications.gql | 58 ++++ 2 files changed, 546 insertions(+) create mode 100644 src/operations/notifications.gql diff --git a/src/index.tsx b/src/index.tsx index 8a19c9a..c6860e7 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -4013,6 +4013,122 @@ export type GetMedalsQuery = { }; }; +export type GetNotificationsQueryVariables = Exact<{ + limit?: Scalars["Int"]["input"]; + offset?: Scalars["Int"]["input"]; + filters?: InputMaybe; +}>; + +export type GetNotificationsQuery = { + __typename?: "Query"; + notifications: { + __typename?: "NotificationConnection"; + totalCount: number; + unreadCount: number; + hasMore: boolean; + notifications: Array<{ + __typename?: "NotificationGQL"; + id: number; + notificationType: NotificationTypeEnum; + videoId?: number | null; + reactionType?: string | null; + isRead: boolean; + createdAt: any; + readAt?: any | null; + actor: { + __typename?: "UserGQL"; + id: number; + username: string; + profileImageUri?: string | null; + }; + comment?: { + __typename?: "CommentGQL"; + id: number; + message: string; + user: { + __typename?: "UserGQL"; + id: number; + username: string; + profileImageUri?: string | null; + }; + } | null; + }>; + }; +}; + +export type GetUnreadNotificationCountQueryVariables = Exact<{ + [key: string]: never; +}>; + +export type GetUnreadNotificationCountQuery = { + __typename?: "Query"; + unreadNotificationCount: number; +}; + +export type MarkNotificationAsReadMutationVariables = Exact<{ + notificationId: Scalars["Int"]["input"]; +}>; + +export type MarkNotificationAsReadMutation = { + __typename?: "Mutation"; + markNotificationAsRead: boolean; +}; + +export type MarkNotificationsAsReadMutationVariables = Exact<{ + notificationIds: Array | Scalars["Int"]["input"]; +}>; + +export type MarkNotificationsAsReadMutation = { + __typename?: "Mutation"; + markNotificationsAsRead: boolean; +}; + +export type MarkAllNotificationsAsReadMutationVariables = Exact<{ + [key: string]: never; +}>; + +export type MarkAllNotificationsAsReadMutation = { + __typename?: "Mutation"; + markAllNotificationsAsRead: boolean; +}; + +export type DeleteNotificationMutationVariables = Exact<{ + notificationId: Scalars["Int"]["input"]; +}>; + +export type DeleteNotificationMutation = { + __typename?: "Mutation"; + deleteNotification: boolean; +}; + +export type NotificationFragmentFragment = { + __typename?: "NotificationGQL"; + id: number; + notificationType: NotificationTypeEnum; + videoId?: number | null; + reactionType?: string | null; + isRead: boolean; + createdAt: any; + readAt?: any | null; + actor: { + __typename?: "UserGQL"; + id: number; + username: string; + profileImageUri?: string | null; + }; + comment?: { + __typename?: "CommentGQL"; + id: number; + message: string; + user: { + __typename?: "UserGQL"; + id: number; + username: string; + profileImageUri?: string | null; + }; + } | null; +}; + export type EnsureStripeCustomerExistsMutationVariables = Exact<{ [key: string]: never; }>; @@ -5827,6 +5943,31 @@ export const MedalFieldsFragmentDoc = gql` nickname } `; +export const NotificationFragmentFragmentDoc = gql` + fragment NotificationFragment on NotificationGQL { + id + notificationType + actor { + id + username + profileImageUri + } + videoId + comment { + id + message + user { + id + username + profileImageUri + } + } + reactionType + isRead + createdAt + readAt + } +`; export const PocketingIntentionFragmentFragmentDoc = gql` fragment PocketingIntentionFragment on PocketingIntentionFeaturesGQL { make @@ -7086,6 +7227,353 @@ export type GetMedalsQueryResult = Apollo.QueryResult< GetMedalsQuery, GetMedalsQueryVariables >; +export const GetNotificationsDocument = gql` + query GetNotifications( + $limit: Int! = 20 + $offset: Int! = 0 + $filters: NotificationFilters = null + ) { + notifications(limit: $limit, offset: $offset, filters: $filters) { + notifications { + ...NotificationFragment + } + totalCount + unreadCount + hasMore + } + } + ${NotificationFragmentFragmentDoc} +`; + +/** + * __useGetNotificationsQuery__ + * + * To run a query within a React component, call `useGetNotificationsQuery` and pass it any options that fit your needs. + * When your component renders, `useGetNotificationsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetNotificationsQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * filters: // value for 'filters' + * }, + * }); + */ +export function useGetNotificationsQuery( + baseOptions?: Apollo.QueryHookOptions< + GetNotificationsQuery, + GetNotificationsQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery( + GetNotificationsDocument, + options, + ); +} +export function useGetNotificationsLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + GetNotificationsQuery, + GetNotificationsQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + GetNotificationsQuery, + GetNotificationsQueryVariables + >(GetNotificationsDocument, options); +} +export function useGetNotificationsSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + GetNotificationsQuery, + GetNotificationsQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery< + GetNotificationsQuery, + GetNotificationsQueryVariables + >(GetNotificationsDocument, options); +} +export type GetNotificationsQueryHookResult = ReturnType< + typeof useGetNotificationsQuery +>; +export type GetNotificationsLazyQueryHookResult = ReturnType< + typeof useGetNotificationsLazyQuery +>; +export type GetNotificationsSuspenseQueryHookResult = ReturnType< + typeof useGetNotificationsSuspenseQuery +>; +export type GetNotificationsQueryResult = Apollo.QueryResult< + GetNotificationsQuery, + GetNotificationsQueryVariables +>; +export const GetUnreadNotificationCountDocument = gql` + query GetUnreadNotificationCount { + unreadNotificationCount + } +`; + +/** + * __useGetUnreadNotificationCountQuery__ + * + * To run a query within a React component, call `useGetUnreadNotificationCountQuery` and pass it any options that fit your needs. + * When your component renders, `useGetUnreadNotificationCountQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetUnreadNotificationCountQuery({ + * variables: { + * }, + * }); + */ +export function useGetUnreadNotificationCountQuery( + baseOptions?: Apollo.QueryHookOptions< + GetUnreadNotificationCountQuery, + GetUnreadNotificationCountQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery< + GetUnreadNotificationCountQuery, + GetUnreadNotificationCountQueryVariables + >(GetUnreadNotificationCountDocument, options); +} +export function useGetUnreadNotificationCountLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + GetUnreadNotificationCountQuery, + GetUnreadNotificationCountQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + GetUnreadNotificationCountQuery, + GetUnreadNotificationCountQueryVariables + >(GetUnreadNotificationCountDocument, options); +} +export function useGetUnreadNotificationCountSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + GetUnreadNotificationCountQuery, + GetUnreadNotificationCountQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery< + GetUnreadNotificationCountQuery, + GetUnreadNotificationCountQueryVariables + >(GetUnreadNotificationCountDocument, options); +} +export type GetUnreadNotificationCountQueryHookResult = ReturnType< + typeof useGetUnreadNotificationCountQuery +>; +export type GetUnreadNotificationCountLazyQueryHookResult = ReturnType< + typeof useGetUnreadNotificationCountLazyQuery +>; +export type GetUnreadNotificationCountSuspenseQueryHookResult = ReturnType< + typeof useGetUnreadNotificationCountSuspenseQuery +>; +export type GetUnreadNotificationCountQueryResult = Apollo.QueryResult< + GetUnreadNotificationCountQuery, + GetUnreadNotificationCountQueryVariables +>; +export const MarkNotificationAsReadDocument = gql` + mutation MarkNotificationAsRead($notificationId: Int!) { + markNotificationAsRead(notificationId: $notificationId) + } +`; +export type MarkNotificationAsReadMutationFn = Apollo.MutationFunction< + MarkNotificationAsReadMutation, + MarkNotificationAsReadMutationVariables +>; + +/** + * __useMarkNotificationAsReadMutation__ + * + * To run a mutation, you first call `useMarkNotificationAsReadMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useMarkNotificationAsReadMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [markNotificationAsReadMutation, { data, loading, error }] = useMarkNotificationAsReadMutation({ + * variables: { + * notificationId: // value for 'notificationId' + * }, + * }); + */ +export function useMarkNotificationAsReadMutation( + baseOptions?: Apollo.MutationHookOptions< + MarkNotificationAsReadMutation, + MarkNotificationAsReadMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation< + MarkNotificationAsReadMutation, + MarkNotificationAsReadMutationVariables + >(MarkNotificationAsReadDocument, options); +} +export type MarkNotificationAsReadMutationHookResult = ReturnType< + typeof useMarkNotificationAsReadMutation +>; +export type MarkNotificationAsReadMutationResult = + Apollo.MutationResult; +export type MarkNotificationAsReadMutationOptions = Apollo.BaseMutationOptions< + MarkNotificationAsReadMutation, + MarkNotificationAsReadMutationVariables +>; +export const MarkNotificationsAsReadDocument = gql` + mutation MarkNotificationsAsRead($notificationIds: [Int!]!) { + markNotificationsAsRead(notificationIds: $notificationIds) + } +`; +export type MarkNotificationsAsReadMutationFn = Apollo.MutationFunction< + MarkNotificationsAsReadMutation, + MarkNotificationsAsReadMutationVariables +>; + +/** + * __useMarkNotificationsAsReadMutation__ + * + * To run a mutation, you first call `useMarkNotificationsAsReadMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useMarkNotificationsAsReadMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [markNotificationsAsReadMutation, { data, loading, error }] = useMarkNotificationsAsReadMutation({ + * variables: { + * notificationIds: // value for 'notificationIds' + * }, + * }); + */ +export function useMarkNotificationsAsReadMutation( + baseOptions?: Apollo.MutationHookOptions< + MarkNotificationsAsReadMutation, + MarkNotificationsAsReadMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation< + MarkNotificationsAsReadMutation, + MarkNotificationsAsReadMutationVariables + >(MarkNotificationsAsReadDocument, options); +} +export type MarkNotificationsAsReadMutationHookResult = ReturnType< + typeof useMarkNotificationsAsReadMutation +>; +export type MarkNotificationsAsReadMutationResult = + Apollo.MutationResult; +export type MarkNotificationsAsReadMutationOptions = Apollo.BaseMutationOptions< + MarkNotificationsAsReadMutation, + MarkNotificationsAsReadMutationVariables +>; +export const MarkAllNotificationsAsReadDocument = gql` + mutation MarkAllNotificationsAsRead { + markAllNotificationsAsRead + } +`; +export type MarkAllNotificationsAsReadMutationFn = Apollo.MutationFunction< + MarkAllNotificationsAsReadMutation, + MarkAllNotificationsAsReadMutationVariables +>; + +/** + * __useMarkAllNotificationsAsReadMutation__ + * + * To run a mutation, you first call `useMarkAllNotificationsAsReadMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useMarkAllNotificationsAsReadMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [markAllNotificationsAsReadMutation, { data, loading, error }] = useMarkAllNotificationsAsReadMutation({ + * variables: { + * }, + * }); + */ +export function useMarkAllNotificationsAsReadMutation( + baseOptions?: Apollo.MutationHookOptions< + MarkAllNotificationsAsReadMutation, + MarkAllNotificationsAsReadMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation< + MarkAllNotificationsAsReadMutation, + MarkAllNotificationsAsReadMutationVariables + >(MarkAllNotificationsAsReadDocument, options); +} +export type MarkAllNotificationsAsReadMutationHookResult = ReturnType< + typeof useMarkAllNotificationsAsReadMutation +>; +export type MarkAllNotificationsAsReadMutationResult = + Apollo.MutationResult; +export type MarkAllNotificationsAsReadMutationOptions = + Apollo.BaseMutationOptions< + MarkAllNotificationsAsReadMutation, + MarkAllNotificationsAsReadMutationVariables + >; +export const DeleteNotificationDocument = gql` + mutation DeleteNotification($notificationId: Int!) { + deleteNotification(notificationId: $notificationId) + } +`; +export type DeleteNotificationMutationFn = Apollo.MutationFunction< + DeleteNotificationMutation, + DeleteNotificationMutationVariables +>; + +/** + * __useDeleteNotificationMutation__ + * + * To run a mutation, you first call `useDeleteNotificationMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useDeleteNotificationMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [deleteNotificationMutation, { data, loading, error }] = useDeleteNotificationMutation({ + * variables: { + * notificationId: // value for 'notificationId' + * }, + * }); + */ +export function useDeleteNotificationMutation( + baseOptions?: Apollo.MutationHookOptions< + DeleteNotificationMutation, + DeleteNotificationMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation< + DeleteNotificationMutation, + DeleteNotificationMutationVariables + >(DeleteNotificationDocument, options); +} +export type DeleteNotificationMutationHookResult = ReturnType< + typeof useDeleteNotificationMutation +>; +export type DeleteNotificationMutationResult = + Apollo.MutationResult; +export type DeleteNotificationMutationOptions = Apollo.BaseMutationOptions< + DeleteNotificationMutation, + DeleteNotificationMutationVariables +>; export const EnsureStripeCustomerExistsDocument = gql` mutation EnsureStripeCustomerExists { ensureStripeCustomerExists { diff --git a/src/operations/notifications.gql b/src/operations/notifications.gql new file mode 100644 index 0000000..8429b98 --- /dev/null +++ b/src/operations/notifications.gql @@ -0,0 +1,58 @@ +query GetNotifications( + $limit: Int! = 20 + $offset: Int! = 0 + $filters: NotificationFilters = null +) { + notifications(limit: $limit, offset: $offset, filters: $filters) { + notifications { + ...NotificationFragment + } + totalCount + unreadCount + hasMore + } +} + +query GetUnreadNotificationCount { + unreadNotificationCount +} + +mutation MarkNotificationAsRead($notificationId: Int!) { + markNotificationAsRead(notificationId: $notificationId) +} + +mutation MarkNotificationsAsRead($notificationIds: [Int!]!) { + markNotificationsAsRead(notificationIds: $notificationIds) +} + +mutation MarkAllNotificationsAsRead { + markAllNotificationsAsRead +} + +mutation DeleteNotification($notificationId: Int!) { + deleteNotification(notificationId: $notificationId) +} + +fragment NotificationFragment on NotificationGQL { + id + notificationType + actor { + id + username + profileImageUri + } + videoId + comment { + id + message + user { + id + username + profileImageUri + } + } + reactionType + isRead + createdAt + readAt +} From 3b2f88c0e04e0899cab93b44797f120acfe5da5f Mon Sep 17 00:00:00 2001 From: Loewy Date: Wed, 5 Nov 2025 15:09:33 -0800 Subject: [PATCH 4/6] update naming of notification fragment --- src/index.tsx | 10 +++++----- src/operations/notifications.gql | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index c6860e7..66e8615 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -4101,7 +4101,7 @@ export type DeleteNotificationMutation = { deleteNotification: boolean; }; -export type NotificationFragmentFragment = { +export type NotificationFragment = { __typename?: "NotificationGQL"; id: number; notificationType: NotificationTypeEnum; @@ -5943,8 +5943,8 @@ export const MedalFieldsFragmentDoc = gql` nickname } `; -export const NotificationFragmentFragmentDoc = gql` - fragment NotificationFragment on NotificationGQL { +export const NotificationFragmentDoc = gql` + fragment Notification on NotificationGQL { id notificationType actor { @@ -7235,14 +7235,14 @@ export const GetNotificationsDocument = gql` ) { notifications(limit: $limit, offset: $offset, filters: $filters) { notifications { - ...NotificationFragment + ...Notification } totalCount unreadCount hasMore } } - ${NotificationFragmentFragmentDoc} + ${NotificationFragmentDoc} `; /** diff --git a/src/operations/notifications.gql b/src/operations/notifications.gql index 8429b98..fa3747d 100644 --- a/src/operations/notifications.gql +++ b/src/operations/notifications.gql @@ -5,7 +5,7 @@ query GetNotifications( ) { notifications(limit: $limit, offset: $offset, filters: $filters) { notifications { - ...NotificationFragment + ...Notification } totalCount unreadCount @@ -33,7 +33,7 @@ mutation DeleteNotification($notificationId: Int!) { deleteNotification(notificationId: $notificationId) } -fragment NotificationFragment on NotificationGQL { +fragment Notification on NotificationGQL { id notificationType actor { From a74a11e7890bfd5095dbcf78b07ecfce36d7de3e Mon Sep 17 00:00:00 2001 From: Loewy Date: Thu, 6 Nov 2025 12:35:51 -0800 Subject: [PATCH 5/6] update notif operations --- src/index.tsx | 6 ++++++ src/operations/video.gql | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index 66e8615..2e0f93f 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -5214,6 +5214,9 @@ export type GetVideoSocialDetailsByIdQuery = { __typename?: "VideoGQL"; id: number; name?: string | null; + screenshotUri?: string | null; + makePercentage: number; + totalShots: number; owner?: { __typename?: "UserGQL"; id: number; @@ -10260,6 +10263,9 @@ export const GetVideoSocialDetailsByIdDocument = gql` getVideo(videoId: $videoId) { id name + screenshotUri + makePercentage + totalShots owner { id firebaseUid diff --git a/src/operations/video.gql b/src/operations/video.gql index f76405f..5675745 100644 --- a/src/operations/video.gql +++ b/src/operations/video.gql @@ -97,6 +97,9 @@ query GetVideoSocialDetailsById($videoId: Int!) { getVideo(videoId: $videoId) { id name + screenshotUri + makePercentage + totalShots owner { id firebaseUid From cdf438c089b4df770e3ccaff75e3031a57191775 Mon Sep 17 00:00:00 2001 From: Loewy Date: Fri, 7 Nov 2025 11:53:13 -0800 Subject: [PATCH 6/6] add playlist w/ segment durations in gql return --- src/index.tsx | 23 +++++++++++++++++++++++ src/operations/shots.gql | 3 +++ 2 files changed, 26 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index 2e0f93f..ced217a 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -4487,6 +4487,10 @@ export type GetShotsWithMetadataFilterResultQuery = { id: string; streamSegmentType: StreamSegmentTypeEnum; } | null; + playlist?: { + __typename?: "HLSPlaylistGQL"; + segmentDurations: Array; + } | null; } | null; }>; }; @@ -4565,6 +4569,10 @@ export type GetShotsWithMetadataQuery = { id: string; streamSegmentType: StreamSegmentTypeEnum; } | null; + playlist?: { + __typename?: "HLSPlaylistGQL"; + segmentDurations: Array; + } | null; } | null; }>; }; @@ -4632,6 +4640,10 @@ export type GetShotsByIdsQuery = { id: string; streamSegmentType: StreamSegmentTypeEnum; } | null; + playlist?: { + __typename?: "HLSPlaylistGQL"; + segmentDurations: Array; + } | null; } | null; }>; }; @@ -4692,6 +4704,10 @@ export type ShotWithAllFeaturesFragment = { id: string; streamSegmentType: StreamSegmentTypeEnum; } | null; + playlist?: { + __typename?: "HLSPlaylistGQL"; + segmentDurations: Array; + } | null; } | null; }; @@ -4769,6 +4785,10 @@ export type EditShotMutation = { id: string; streamSegmentType: StreamSegmentTypeEnum; } | null; + playlist?: { + __typename?: "HLSPlaylistGQL"; + segmentDurations: Array; + } | null; } | null; } | null; }; @@ -6042,6 +6062,9 @@ export const ShotWithAllFeaturesFragmentDoc = gql` id streamSegmentType } + playlist { + segmentDurations + } } } `; diff --git a/src/operations/shots.gql b/src/operations/shots.gql index 0790651..c0efa2e 100644 --- a/src/operations/shots.gql +++ b/src/operations/shots.gql @@ -191,6 +191,9 @@ fragment ShotWithAllFeatures on ShotGQL { id streamSegmentType } + playlist { + segmentDurations + } } }