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;
getShots: Array<ShotGql>;
getUser?: Maybe<UserGql>;
getUserVideos: VideoHistoryGql;
getVideo: VideoGql;
getVideoFeedForUser: VideoFeedGql;
getVideoMakePercentageIntervals: Array<MakePercentageIntervalGql>;
};
@ -293,13 +293,15 @@ export type QueryGetUserArgs = {
userId: Scalars["Int"]["input"];
};
export type QueryGetVideoArgs = {
videoId: Scalars["Int"]["input"];
export type QueryGetUserVideosArgs = {
after?: InputMaybe<Scalars["String"]["input"]>;
filters?: InputMaybe<VideoFilterInput>;
limit?: Scalars["Int"]["input"];
userId?: InputMaybe<Scalars["Int"]["input"]>;
};
export type QueryGetVideoFeedForUserArgs = {
after?: InputMaybe<Scalars["String"]["input"]>;
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<VideoGql>;
export type VideoFilterInput = {
isStreamCompleted?: InputMaybe<Scalars["Boolean"]["input"]>;
};
export type VideoGql = {
@ -409,6 +409,12 @@ export type VideoGql = {
updatedAt?: Maybe<Scalars["DateTime"]["output"]>;
};
export type VideoHistoryGql = {
__typename?: "VideoHistoryGQL";
pageInfo: PageInfoGql;
videos: Array<VideoGql>;
};
export type VideoMetadataInput = {
endStream?: Scalars["Boolean"]["input"];
endTime?: InputMaybe<Scalars["DateTime"]["input"]>;
@ -478,12 +484,13 @@ export type GetDeployedConfigQuery = {
export type GetFeedQueryVariables = Exact<{
limit?: Scalars["Int"]["input"];
after?: InputMaybe<Scalars["String"]["input"]>;
filters?: InputMaybe<VideoFilterInput>;
}>;
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'
* },
* });
*/

View File

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

View File

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