Merge pull request 'Add filters for getPlayTime' (#126) from mk/add-filter-for-play-time into master

Reviewed-on: #126
This commit is contained in:
countablecloud 2024-11-11 19:52:36 -07:00
commit 58e1c18034
2 changed files with 9 additions and 6 deletions

View File

@ -2227,6 +2227,7 @@ export type QueryGetOrderedShotsArgs = {
};
export type QueryGetPlayTimeArgs = {
filters?: InputMaybe<VideoFilterInput>;
userId: Scalars["Int"]["input"];
};
@ -2607,6 +2608,7 @@ export type UserRelationshipsResult = {
};
export type VideoFilterInput = {
createdAt?: InputMaybe<DateRangeFilter>;
isStreamCompleted?: InputMaybe<Scalars["Boolean"]["input"]>;
requireCursorCompletion?: Scalars["Boolean"]["input"];
};

View File

@ -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!