Add pagination to getShots

This commit is contained in:
Ivan Malison 2024-08-01 19:49:57 -06:00
parent 04308b1003
commit c18628a4ca
2 changed files with 37 additions and 10 deletions

View File

@ -102,6 +102,10 @@ export type CreateUploadStreamReturn = {
videoId: Scalars["Int"]["output"];
};
export type CreatedAfter =
| { createdAt: Scalars["DateTime"]["input"]; videoId?: never }
| { createdAt?: never; videoId: Scalars["Int"]["input"] };
export type CueObjectFeaturesGql = {
__typename?: "CueObjectFeaturesGQL";
cueBallSpeed?: Maybe<Scalars["Float"]["output"]>;
@ -1029,6 +1033,11 @@ export type FilterInput =
videoId: Array<Scalars["Int"]["input"]>;
};
export type GetShotsPagination = {
createdAfter: CreatedAfter;
startFrameAfter: Scalars["Int"]["input"];
};
export type GetUploadLinkReturn = {
__typename?: "GetUploadLinkReturn";
headers: Array<Maybe<Header>>;
@ -1201,6 +1210,8 @@ export type QueryGetPlayTimeArgs = {
export type QueryGetShotsArgs = {
filterInput: FilterInput;
limit?: Scalars["Int"]["input"];
shotsPagination?: InputMaybe<GetShotsPagination>;
};
export type QueryGetUserArgs = {
@ -1284,6 +1295,7 @@ export type ShotGql = {
startFrame: Scalars["Int"]["output"];
updatedAt?: Maybe<Scalars["DateTime"]["output"]>;
user?: Maybe<UserGql>;
video?: Maybe<VideoGql>;
videoId: Scalars["Int"]["output"];
};

View File

@ -8,7 +8,11 @@ type Query {
videoId: ID!
intervalDuration: Int! = 300
): [MakePercentageIntervalGQL!]!
getShots(filterInput: FilterInput!): [ShotGQL!]!
getShots(
filterInput: FilterInput!
shotsPagination: GetShotsPagination = null
limit: Int! = 10
): [ShotGQL!]!
getShotAnnotationTypes: [ShotAnnotationTypeGQL!]!
getUser(userId: Int!): UserGQL
getLoggedInUser: UserGQL
@ -168,6 +172,7 @@ type ShotGQL {
user: UserGQL
annotations: [ShotAnnotationGQL!]!
falsePositiveScore: Float
video: VideoGQL
}
"""
@ -229,15 +234,6 @@ type ShotAnnotationTypeGQL {
name: String!
}
type UserPlayTimeGQL {
totalSeconds: Float!
}
type VideoHistoryGQL {
videos: [VideoGQL!]!
pageInfo: PageInfoGQL!
}
type VideoGQL {
id: Int!
owner: UserGQL
@ -364,6 +360,25 @@ type VideoProcessingErrorGQL {
endSegmentIndex: Int
}
input GetShotsPagination {
createdAfter: CreatedAfter!
startFrameAfter: Int!
}
input CreatedAfter @oneOf {
videoId: Int
createdAt: DateTime
}
type UserPlayTimeGQL {
totalSeconds: Float!
}
type VideoHistoryGQL {
videos: [VideoGQL!]!
pageInfo: PageInfoGQL!
}
type PageInfoGQL {
hasNextPage: Boolean!
endCursor: String