From e2f4995cad07b8aa1bb5f8a1e93d53c1f0a37c67 Mon Sep 17 00:00:00 2001 From: Loewy Date: Tue, 29 Oct 2024 17:59:18 -0700 Subject: [PATCH] use getOrderedShots when requesting getShotsWithVideoGql --- src/index.tsx | 16 +++++++++++++--- src/operations/shots.gql | 12 ++++++++++-- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index b866242..b880ffa 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -2804,12 +2804,13 @@ export type UpdateShotAnnotationsMutation = { export type GetShotsWithVideoGqlQueryVariables = Exact<{ filterInput: FilterInput; + shotsOrdering?: InputMaybe; limit?: InputMaybe; }>; export type GetShotsWithVideoGqlQuery = { __typename?: "Query"; - getShotsWithMetadata: { + getOrderedShots: { __typename?: "GetShotsResult"; shots: Array<{ __typename?: "ShotGQL"; @@ -4465,8 +4466,16 @@ export type UpdateShotAnnotationsMutationOptions = Apollo.BaseMutationOptions< UpdateShotAnnotationsMutationVariables >; export const GetShotsWithVideoGqlDocument = gql` - query GetShotsWithVideoGql($filterInput: FilterInput!, $limit: Int) { - getShotsWithMetadata(filterInput: $filterInput, limit: $limit) { + query GetShotsWithVideoGql( + $filterInput: FilterInput! + $shotsOrdering: GetShotsOrdering + $limit: Int + ) { + getOrderedShots( + filterInput: $filterInput + shotsOrdering: $shotsOrdering + limit: $limit + ) { shots { id videoId @@ -4492,6 +4501,7 @@ export const GetShotsWithVideoGqlDocument = gql` * const { data, loading, error } = useGetShotsWithVideoGqlQuery({ * variables: { * filterInput: // value for 'filterInput' + * shotsOrdering: // value for 'shotsOrdering' * limit: // value for 'limit' * }, * }); diff --git a/src/operations/shots.gql b/src/operations/shots.gql index 3d71420..27798c4 100644 --- a/src/operations/shots.gql +++ b/src/operations/shots.gql @@ -40,8 +40,16 @@ mutation UpdateShotAnnotations( } } -query GetShotsWithVideoGql($filterInput: FilterInput!, $limit: Int) { - getShotsWithMetadata(filterInput: $filterInput, limit: $limit) { +query GetShotsWithVideoGql( + $filterInput: FilterInput! + $shotsOrdering: GetShotsOrdering + $limit: Int +) { + getOrderedShots( + filterInput: $filterInput + shotsOrdering: $shotsOrdering + limit: $limit + ) { shots { id videoId -- 2.46.1