From 592dea0ca2a0e2bed712dd07494b7361818baaab Mon Sep 17 00:00:00 2001 From: Mike Kalange Date: Mon, 11 Nov 2024 18:50:00 -0800 Subject: [PATCH] Add filters for getPlayTime --- src/index.tsx | 2 ++ src/schema.gql | 13 +++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 1da0e32..89e6edf 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -2227,6 +2227,7 @@ export type QueryGetOrderedShotsArgs = { }; export type QueryGetPlayTimeArgs = { + filters?: InputMaybe; userId: Scalars["Int"]["input"]; }; @@ -2607,6 +2608,7 @@ export type UserRelationshipsResult = { }; export type VideoFilterInput = { + createdAt?: InputMaybe; isStreamCompleted?: InputMaybe; requireCursorCompletion?: Scalars["Boolean"]["input"]; }; diff --git a/src/schema.gql b/src/schema.gql index 60f8c79..61ba160 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -46,7 +46,7 @@ type Query { limit: Int = 100 after: String = null ): UserRelationshipsResult! - getPlayTime(userId: Int!): UserPlayTimeGQL! + getPlayTime(userId: Int!, filters: VideoFilterInput = null): UserPlayTimeGQL! getUserVideos( userId: Int = null limit: Int! = 5 @@ -624,6 +624,12 @@ type UserPlayTimeGQL { totalSeconds: Float! } +input VideoFilterInput { + isStreamCompleted: Boolean = null + requireCursorCompletion: Boolean! = true + createdAt: DateRangeFilter +} + type VideoHistoryGQL { videos: [VideoGQL!]! pageInfo: PageInfoGQL! @@ -634,11 +640,6 @@ type PageInfoGQL { endCursor: String } -input VideoFilterInput { - isStreamCompleted: Boolean = null - requireCursorCompletion: Boolean! = true -} - type TagGQL { name: String! id: Int!