diff --git a/src/index.tsx b/src/index.tsx index 9fdd2a6..9679d75 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -4213,6 +4213,21 @@ export type VideoCardFieldsFragment = { }>; }; +export type GetVideoFeedSessionCountQueryVariables = Exact<{ + limit?: Scalars["Int"]["input"]; + filters?: InputMaybe; + includePrivate?: InputMaybe; + feedInput?: InputMaybe; +}>; + +export type GetVideoFeedSessionCountQuery = { + __typename?: "Query"; + getFeedVideos: { + __typename?: "VideoHistoryGQL"; + videos: Array<{ __typename?: "VideoGQL"; id: number; totalShots: number }>; + }; +}; + export type GetVideoFeedQueryVariables = Exact<{ limit?: Scalars["Int"]["input"]; after?: InputMaybe; @@ -8522,6 +8537,95 @@ export type GetFeedQueryResult = Apollo.QueryResult< GetFeedQuery, GetFeedQueryVariables >; +export const GetVideoFeedSessionCountDocument = gql` + query GetVideoFeedSessionCount( + $limit: Int! = 100 + $filters: VideoFilterInput = null + $includePrivate: IncludePrivateEnum = MINE + $feedInput: VideoFeedInputGQL = null + ) { + getFeedVideos( + limit: $limit + filters: $filters + includePrivate: $includePrivate + feedInput: $feedInput + ) { + videos { + id + totalShots + } + } + } +`; + +/** + * __useGetVideoFeedSessionCountQuery__ + * + * To run a query within a React component, call `useGetVideoFeedSessionCountQuery` and pass it any options that fit your needs. + * When your component renders, `useGetVideoFeedSessionCountQuery` 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 } = useGetVideoFeedSessionCountQuery({ + * variables: { + * limit: // value for 'limit' + * filters: // value for 'filters' + * includePrivate: // value for 'includePrivate' + * feedInput: // value for 'feedInput' + * }, + * }); + */ +export function useGetVideoFeedSessionCountQuery( + baseOptions?: Apollo.QueryHookOptions< + GetVideoFeedSessionCountQuery, + GetVideoFeedSessionCountQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery< + GetVideoFeedSessionCountQuery, + GetVideoFeedSessionCountQueryVariables + >(GetVideoFeedSessionCountDocument, options); +} +export function useGetVideoFeedSessionCountLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + GetVideoFeedSessionCountQuery, + GetVideoFeedSessionCountQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + GetVideoFeedSessionCountQuery, + GetVideoFeedSessionCountQueryVariables + >(GetVideoFeedSessionCountDocument, options); +} +export function useGetVideoFeedSessionCountSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + GetVideoFeedSessionCountQuery, + GetVideoFeedSessionCountQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery< + GetVideoFeedSessionCountQuery, + GetVideoFeedSessionCountQueryVariables + >(GetVideoFeedSessionCountDocument, options); +} +export type GetVideoFeedSessionCountQueryHookResult = ReturnType< + typeof useGetVideoFeedSessionCountQuery +>; +export type GetVideoFeedSessionCountLazyQueryHookResult = ReturnType< + typeof useGetVideoFeedSessionCountLazyQuery +>; +export type GetVideoFeedSessionCountSuspenseQueryHookResult = ReturnType< + typeof useGetVideoFeedSessionCountSuspenseQuery +>; +export type GetVideoFeedSessionCountQueryResult = Apollo.QueryResult< + GetVideoFeedSessionCountQuery, + GetVideoFeedSessionCountQueryVariables +>; export const GetVideoFeedDocument = gql` query GetVideoFeed( $limit: Int! = 5 diff --git a/src/operations/feed.gql b/src/operations/feed.gql index 68cbfe0..5ce24c9 100644 --- a/src/operations/feed.gql +++ b/src/operations/feed.gql @@ -90,6 +90,26 @@ fragment VideoCardFields on VideoGQL { } } +# Lightweight version of GetVideoFeed for counting sessions only +query GetVideoFeedSessionCount( + $limit: Int! = 100 + $filters: VideoFilterInput = null + $includePrivate: IncludePrivateEnum = MINE + $feedInput: VideoFeedInputGQL = null +) { + getFeedVideos( + limit: $limit + filters: $filters + includePrivate: $includePrivate + feedInput: $feedInput + ) { + videos { + id + totalShots + } + } +} + query GetVideoFeed( $limit: Int! = 5 $after: String = null