Support shots pagination #30

Merged
kkathuang merged 1 commits from kat/paginate-get-shots into master 2024-08-09 15:12:52 -06:00
2 changed files with 18 additions and 2 deletions
Showing only changes of commit 8c8dcdd8e1 - Show all commits

View File

@ -1574,6 +1574,8 @@ export type GetVideoMakePercentageIntervalsQuery = {
export type GetShotsQueryVariables = Exact<{ export type GetShotsQueryVariables = Exact<{
filterInput: FilterInput; filterInput: FilterInput;
shotsPagination: GetShotsPagination;
limit?: InputMaybe<Scalars["Int"]["input"]>;
includeCreatedAt?: Scalars["Boolean"]["input"]; includeCreatedAt?: Scalars["Boolean"]["input"];
includeUpdatedAt?: Scalars["Boolean"]["input"]; includeUpdatedAt?: Scalars["Boolean"]["input"];
includeCueObjectFeatures?: Scalars["Boolean"]["input"]; includeCueObjectFeatures?: Scalars["Boolean"]["input"];
@ -2433,6 +2435,8 @@ export type GetVideoMakePercentageIntervalsQueryResult = Apollo.QueryResult<
export const GetShotsDocument = gql` export const GetShotsDocument = gql`
query GetShots( query GetShots(
$filterInput: FilterInput! $filterInput: FilterInput!
$shotsPagination: GetShotsPagination!
$limit: Int
$includeCreatedAt: Boolean! = false $includeCreatedAt: Boolean! = false
$includeUpdatedAt: Boolean! = false $includeUpdatedAt: Boolean! = false
$includeCueObjectFeatures: Boolean! = false $includeCueObjectFeatures: Boolean! = false
@ -2445,7 +2449,11 @@ export const GetShotsDocument = gql`
$includeMake: Boolean! = false $includeMake: Boolean! = false
$includeIntendedPocketType: Boolean! = false $includeIntendedPocketType: Boolean! = false
) { ) {
getShots(filterInput: $filterInput) { getShots(
filterInput: $filterInput
shotsPagination: $shotsPagination
limit: $limit
) {
id id
videoId videoId
startFrame startFrame
@ -2485,6 +2493,8 @@ export const GetShotsDocument = gql`
* const { data, loading, error } = useGetShotsQuery({ * const { data, loading, error } = useGetShotsQuery({
* variables: { * variables: {
* filterInput: // value for 'filterInput' * filterInput: // value for 'filterInput'
* shotsPagination: // value for 'shotsPagination'
* limit: // value for 'limit'
* includeCreatedAt: // value for 'includeCreatedAt' * includeCreatedAt: // value for 'includeCreatedAt'
* includeUpdatedAt: // value for 'includeUpdatedAt' * includeUpdatedAt: // value for 'includeUpdatedAt'
* includeCueObjectFeatures: // value for 'includeCueObjectFeatures' * includeCueObjectFeatures: // value for 'includeCueObjectFeatures'

View File

@ -1,5 +1,7 @@
query GetShots( query GetShots(
$filterInput: FilterInput! $filterInput: FilterInput!
$shotsPagination: GetShotsPagination!
$limit: Int
$includeCreatedAt: Boolean! = false $includeCreatedAt: Boolean! = false
$includeUpdatedAt: Boolean! = false $includeUpdatedAt: Boolean! = false
$includeCueObjectFeatures: Boolean! = false $includeCueObjectFeatures: Boolean! = false
@ -12,7 +14,11 @@ query GetShots(
$includeMake: Boolean! = false $includeMake: Boolean! = false
$includeIntendedPocketType: Boolean! = false $includeIntendedPocketType: Boolean! = false
) { ) {
getShots(filterInput: $filterInput) { getShots(
filterInput: $filterInput
shotsPagination: $shotsPagination
limit: $limit
) {
id id
videoId videoId
startFrame startFrame