Rename video endpoint to getUserVideos

This commit is contained in:
Ivan Malison 2024-04-05 15:46:16 -06:00
parent ddd7e2d50b
commit a5f90ab105
3 changed files with 43 additions and 18 deletions

View File

@ -268,8 +268,8 @@ export type Query = {
getPlayTime: UserPlayTimeGql; getPlayTime: UserPlayTimeGql;
getShots: Array<ShotGql>; getShots: Array<ShotGql>;
getUser?: Maybe<UserGql>; getUser?: Maybe<UserGql>;
getUserVideos: VideoHistoryGql;
getVideo: VideoGql; getVideo: VideoGql;
getVideoFeedForUser: VideoFeedGql;
getVideoMakePercentageIntervals: Array<MakePercentageIntervalGql>; getVideoMakePercentageIntervals: Array<MakePercentageIntervalGql>;
}; };
@ -293,13 +293,15 @@ export type QueryGetUserArgs = {
userId: Scalars["Int"]["input"]; userId: Scalars["Int"]["input"];
}; };
export type QueryGetVideoArgs = { export type QueryGetUserVideosArgs = {
videoId: Scalars["Int"]["input"]; after?: InputMaybe<Scalars["String"]["input"]>;
filters?: InputMaybe<VideoFilterInput>;
limit?: Scalars["Int"]["input"];
userId?: InputMaybe<Scalars["Int"]["input"]>;
}; };
export type QueryGetVideoFeedForUserArgs = { export type QueryGetVideoArgs = {
after?: InputMaybe<Scalars["String"]["input"]>; videoId: Scalars["Int"]["input"];
limit?: Scalars["Int"]["input"];
}; };
export type QueryGetVideoMakePercentageIntervalsArgs = { export type QueryGetVideoMakePercentageIntervalsArgs = {
@ -381,10 +383,8 @@ export type UserPlayTimeGql = {
totalSeconds: Scalars["Float"]["output"]; totalSeconds: Scalars["Float"]["output"];
}; };
export type VideoFeedGql = { export type VideoFilterInput = {
__typename?: "VideoFeedGQL"; isStreamCompleted?: InputMaybe<Scalars["Boolean"]["input"]>;
pageInfo: PageInfoGql;
videos: Array<VideoGql>;
}; };
export type VideoGql = { export type VideoGql = {
@ -409,6 +409,12 @@ export type VideoGql = {
updatedAt?: Maybe<Scalars["DateTime"]["output"]>; updatedAt?: Maybe<Scalars["DateTime"]["output"]>;
}; };
export type VideoHistoryGql = {
__typename?: "VideoHistoryGQL";
pageInfo: PageInfoGql;
videos: Array<VideoGql>;
};
export type VideoMetadataInput = { export type VideoMetadataInput = {
endStream?: Scalars["Boolean"]["input"]; endStream?: Scalars["Boolean"]["input"];
endTime?: InputMaybe<Scalars["DateTime"]["input"]>; endTime?: InputMaybe<Scalars["DateTime"]["input"]>;
@ -478,12 +484,13 @@ export type GetDeployedConfigQuery = {
export type GetFeedQueryVariables = Exact<{ export type GetFeedQueryVariables = Exact<{
limit?: Scalars["Int"]["input"]; limit?: Scalars["Int"]["input"];
after?: InputMaybe<Scalars["String"]["input"]>; after?: InputMaybe<Scalars["String"]["input"]>;
filters?: InputMaybe<VideoFilterInput>;
}>; }>;
export type GetFeedQuery = { export type GetFeedQuery = {
__typename?: "Query"; __typename?: "Query";
getVideoFeedForUser: { getUserVideos: {
__typename?: "VideoFeedGQL"; __typename?: "VideoHistoryGQL";
videos: Array<{ videos: Array<{
__typename?: "VideoGQL"; __typename?: "VideoGQL";
id: number; id: number;
@ -901,8 +908,12 @@ export type GetDeployedConfigQueryResult = Apollo.QueryResult<
GetDeployedConfigQueryVariables GetDeployedConfigQueryVariables
>; >;
export const GetFeedDocument = gql` export const GetFeedDocument = gql`
query GetFeed($limit: Int! = 5, $after: String = null) { query GetFeed(
getVideoFeedForUser(limit: $limit, after: $after) { $limit: Int! = 5
$after: String = null
$filters: VideoFilterInput = null
) {
getUserVideos(limit: $limit, after: $after, filters: $filters) {
videos { videos {
id id
owner { owner {
@ -956,6 +967,7 @@ export const GetFeedDocument = gql`
* variables: { * variables: {
* limit: // value for 'limit' * limit: // value for 'limit'
* after: // value for 'after' * after: // value for 'after'
* filters: // value for 'filters'
* }, * },
* }); * });
*/ */

View File

@ -1,5 +1,9 @@
query GetFeed($limit: Int! = 5, $after: String = null) { query GetFeed(
getVideoFeedForUser(limit: $limit, after: $after) { $limit: Int! = 5
$after: String = null
$filters: VideoFilterInput = null
) {
getUserVideos(limit: $limit, after: $after, filters: $filters) {
videos { videos {
id id
owner { owner {

View File

@ -12,7 +12,12 @@ type Query {
getUser(userId: Int!): UserGQL getUser(userId: Int!): UserGQL
getLoggedInUser: UserGQL getLoggedInUser: UserGQL
getPlayTime(userId: Int!): UserPlayTimeGQL! 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! getVideo(videoId: Int!): VideoGQL!
} }
@ -179,7 +184,7 @@ type UserPlayTimeGQL {
totalSeconds: Float! totalSeconds: Float!
} }
type VideoFeedGQL { type VideoHistoryGQL {
videos: [VideoGQL!]! videos: [VideoGQL!]!
pageInfo: PageInfoGQL! pageInfo: PageInfoGQL!
} }
@ -263,6 +268,10 @@ type PageInfoGQL {
endCursor: String endCursor: String
} }
input VideoFilterInput {
isStreamCompleted: Boolean = null
}
type Mutation { type Mutation {
createBucketSet(params: CreateBucketSetInput!): BucketSetGQL! createBucketSet(params: CreateBucketSetInput!): BucketSetGQL!
setLoggerLevel(path: String!, level: String!): Boolean! setLoggerLevel(path: String!, level: String!): Boolean!