diff --git a/src/index.tsx b/src/index.tsx index 596a0cd..a312f5c 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -2973,6 +2973,20 @@ export type GetShotsWithVideoGqlQuery = { }; }; +export type GetShotsWithJustIdsQueryVariables = Exact<{ + filterInput: FilterInput; + shotsOrdering?: InputMaybe; + limit?: InputMaybe; +}>; + +export type GetShotsWithJustIdsQuery = { + __typename?: "Query"; + getOrderedShots: { + __typename?: "GetShotsResult"; + shots: Array<{ __typename?: "ShotGQL"; id: number; videoId: number }>; + }; +}; + export type GetShotsWithMetadataFilterResultQueryVariables = Exact<{ filterInput: FilterInput; shotsOrdering?: InputMaybe; @@ -4881,6 +4895,92 @@ export type GetShotsWithVideoGqlQueryResult = Apollo.QueryResult< GetShotsWithVideoGqlQuery, GetShotsWithVideoGqlQueryVariables >; +export const GetShotsWithJustIdsDocument = gql` + query GetShotsWithJustIds( + $filterInput: FilterInput! + $shotsOrdering: GetShotsOrdering + $limit: Int + ) { + getOrderedShots( + filterInput: $filterInput + shotsOrdering: $shotsOrdering + limit: $limit + ) { + shots { + id + videoId + } + } + } +`; + +/** + * __useGetShotsWithJustIdsQuery__ + * + * To run a query within a React component, call `useGetShotsWithJustIdsQuery` and pass it any options that fit your needs. + * When your component renders, `useGetShotsWithJustIdsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetShotsWithJustIdsQuery({ + * variables: { + * filterInput: // value for 'filterInput' + * shotsOrdering: // value for 'shotsOrdering' + * limit: // value for 'limit' + * }, + * }); + */ +export function useGetShotsWithJustIdsQuery( + baseOptions: Apollo.QueryHookOptions< + GetShotsWithJustIdsQuery, + GetShotsWithJustIdsQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery< + GetShotsWithJustIdsQuery, + GetShotsWithJustIdsQueryVariables + >(GetShotsWithJustIdsDocument, options); +} +export function useGetShotsWithJustIdsLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + GetShotsWithJustIdsQuery, + GetShotsWithJustIdsQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + GetShotsWithJustIdsQuery, + GetShotsWithJustIdsQueryVariables + >(GetShotsWithJustIdsDocument, options); +} +export function useGetShotsWithJustIdsSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + GetShotsWithJustIdsQuery, + GetShotsWithJustIdsQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery< + GetShotsWithJustIdsQuery, + GetShotsWithJustIdsQueryVariables + >(GetShotsWithJustIdsDocument, options); +} +export type GetShotsWithJustIdsQueryHookResult = ReturnType< + typeof useGetShotsWithJustIdsQuery +>; +export type GetShotsWithJustIdsLazyQueryHookResult = ReturnType< + typeof useGetShotsWithJustIdsLazyQuery +>; +export type GetShotsWithJustIdsSuspenseQueryHookResult = ReturnType< + typeof useGetShotsWithJustIdsSuspenseQuery +>; +export type GetShotsWithJustIdsQueryResult = Apollo.QueryResult< + GetShotsWithJustIdsQuery, + GetShotsWithJustIdsQueryVariables +>; export const GetShotsWithMetadataFilterResultDocument = gql` query GetShotsWithMetadataFilterResult( $filterInput: FilterInput! diff --git a/src/operations/shots.gql b/src/operations/shots.gql index 8473f10..4e6ab40 100644 --- a/src/operations/shots.gql +++ b/src/operations/shots.gql @@ -40,6 +40,7 @@ mutation UpdateShotAnnotations( } } +## Should be deprecated query GetShotsWithVideoGql( $filterInput: FilterInput! $shotsOrdering: GetShotsOrdering @@ -61,6 +62,23 @@ query GetShotsWithVideoGql( } } +query GetShotsWithJustIds( + $filterInput: FilterInput! + $shotsOrdering: GetShotsOrdering + $limit: Int +) { + getOrderedShots( + filterInput: $filterInput + shotsOrdering: $shotsOrdering + limit: $limit + ) { + shots { + id + videoId + } + } +} + ## Reserved for playlists (which are created from a filter) query GetShotsWithMetadataFilterResult( $filterInput: FilterInput!