diff --git a/src/index.tsx b/src/index.tsx index 3fc588a..f753fef 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -268,8 +268,8 @@ export type Query = { getPlayTime: UserPlayTimeGql; getShots: Array; getUser?: Maybe; + getUserVideos: VideoHistoryGql; getVideo: VideoGql; - getVideoFeedForUser: VideoFeedGql; getVideoMakePercentageIntervals: Array; }; @@ -293,13 +293,15 @@ export type QueryGetUserArgs = { userId: Scalars["Int"]["input"]; }; -export type QueryGetVideoArgs = { - videoId: Scalars["Int"]["input"]; +export type QueryGetUserVideosArgs = { + after?: InputMaybe; + filters?: InputMaybe; + limit?: Scalars["Int"]["input"]; + userId?: InputMaybe; }; -export type QueryGetVideoFeedForUserArgs = { - after?: InputMaybe; - limit?: Scalars["Int"]["input"]; +export type QueryGetVideoArgs = { + videoId: Scalars["Int"]["input"]; }; export type QueryGetVideoMakePercentageIntervalsArgs = { @@ -381,10 +383,8 @@ export type UserPlayTimeGql = { totalSeconds: Scalars["Float"]["output"]; }; -export type VideoFeedGql = { - __typename?: "VideoFeedGQL"; - pageInfo: PageInfoGql; - videos: Array; +export type VideoFilterInput = { + isStreamCompleted?: InputMaybe; }; export type VideoGql = { @@ -409,6 +409,12 @@ export type VideoGql = { updatedAt?: Maybe; }; +export type VideoHistoryGql = { + __typename?: "VideoHistoryGQL"; + pageInfo: PageInfoGql; + videos: Array; +}; + export type VideoMetadataInput = { endStream?: Scalars["Boolean"]["input"]; endTime?: InputMaybe; @@ -478,12 +484,13 @@ export type GetDeployedConfigQuery = { export type GetFeedQueryVariables = Exact<{ limit?: Scalars["Int"]["input"]; after?: InputMaybe; + filters?: InputMaybe; }>; export type GetFeedQuery = { __typename?: "Query"; - getVideoFeedForUser: { - __typename?: "VideoFeedGQL"; + getUserVideos: { + __typename?: "VideoHistoryGQL"; videos: Array<{ __typename?: "VideoGQL"; id: number; @@ -901,8 +908,12 @@ export type GetDeployedConfigQueryResult = Apollo.QueryResult< GetDeployedConfigQueryVariables >; export const GetFeedDocument = gql` - query GetFeed($limit: Int! = 5, $after: String = null) { - getVideoFeedForUser(limit: $limit, after: $after) { + query GetFeed( + $limit: Int! = 5 + $after: String = null + $filters: VideoFilterInput = null + ) { + getUserVideos(limit: $limit, after: $after, filters: $filters) { videos { id owner { @@ -956,6 +967,7 @@ export const GetFeedDocument = gql` * variables: { * limit: // value for 'limit' * after: // value for 'after' + * filters: // value for 'filters' * }, * }); */ diff --git a/src/operations/feed.gql b/src/operations/feed.gql index 4cca4bd..50bc70e 100644 --- a/src/operations/feed.gql +++ b/src/operations/feed.gql @@ -1,5 +1,9 @@ -query GetFeed($limit: Int! = 5, $after: String = null) { - getVideoFeedForUser(limit: $limit, after: $after) { +query GetFeed( + $limit: Int! = 5 + $after: String = null + $filters: VideoFilterInput = null +) { + getUserVideos(limit: $limit, after: $after, filters: $filters) { videos { id owner { diff --git a/src/schema.gql b/src/schema.gql index a460b20..2a341d5 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -12,7 +12,12 @@ type Query { getUser(userId: Int!): UserGQL getLoggedInUser: UserGQL getPlayTime(userId: Int!): UserPlayTimeGQL! - getVideoFeedForUser(limit: Int! = 5, after: String = null): VideoFeedGQL! + getUserVideos( + userId: Int = null + limit: Int! = 5 + after: String = null + filters: VideoFilterInput = null + ): VideoHistoryGQL! getVideo(videoId: Int!): VideoGQL! } @@ -179,7 +184,7 @@ type UserPlayTimeGQL { totalSeconds: Float! } -type VideoFeedGQL { +type VideoHistoryGQL { videos: [VideoGQL!]! pageInfo: PageInfoGQL! } @@ -263,6 +268,10 @@ type PageInfoGQL { endCursor: String } +input VideoFilterInput { + isStreamCompleted: Boolean = null +} + type Mutation { createBucketSet(params: CreateBucketSetInput!): BucketSetGQL! setLoggerLevel(path: String!, level: String!): Boolean!