From 47df3adce53efeaa3a02c1fdab72d098398264b7 Mon Sep 17 00:00:00 2001 From: Kat Huang Date: Tue, 5 Mar 2024 01:24:03 -0700 Subject: [PATCH] Update GetVideoMakePercentage query --- src/index.tsx | 91 +++++++++++++++++++ .../make_percentage_time_series.gql | 10 +- 2 files changed, 95 insertions(+), 6 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index d2b7ad9..4cfbbbe 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -456,6 +456,21 @@ export type GetFeedQuery = { }; }; +export type GetVideoMakePercentageIntervalsQueryVariables = Exact<{ + videoId: Scalars["ID"]["input"]; +}>; + +export type GetVideoMakePercentageIntervalsQuery = { + __typename?: "Query"; + getVideoMakePercentageIntervals: Array<{ + __typename?: "MakePercentageIntervalGQL"; + startFrame: number; + endFrame: number; + framesPerSecond: number; + makePercentage: number; + }>; +}; + export type GetShotsQueryVariables = Exact<{ filterInput?: InputMaybe; includeCueObjectDistance?: Scalars["Boolean"]["input"]; @@ -721,6 +736,82 @@ export type GetFeedQueryResult = Apollo.QueryResult< GetFeedQuery, GetFeedQueryVariables >; +export const GetVideoMakePercentageIntervalsDocument = gql` + query GetVideoMakePercentageIntervals($videoId: ID!) { + getVideoMakePercentageIntervals(videoId: $videoId) { + startFrame + endFrame + framesPerSecond + makePercentage + } + } +`; + +/** + * __useGetVideoMakePercentageIntervalsQuery__ + * + * To run a query within a React component, call `useGetVideoMakePercentageIntervalsQuery` and pass it any options that fit your needs. + * When your component renders, `useGetVideoMakePercentageIntervalsQuery` 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 } = useGetVideoMakePercentageIntervalsQuery({ + * variables: { + * videoId: // value for 'videoId' + * }, + * }); + */ +export function useGetVideoMakePercentageIntervalsQuery( + baseOptions: Apollo.QueryHookOptions< + GetVideoMakePercentageIntervalsQuery, + GetVideoMakePercentageIntervalsQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery< + GetVideoMakePercentageIntervalsQuery, + GetVideoMakePercentageIntervalsQueryVariables + >(GetVideoMakePercentageIntervalsDocument, options); +} +export function useGetVideoMakePercentageIntervalsLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + GetVideoMakePercentageIntervalsQuery, + GetVideoMakePercentageIntervalsQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + GetVideoMakePercentageIntervalsQuery, + GetVideoMakePercentageIntervalsQueryVariables + >(GetVideoMakePercentageIntervalsDocument, options); +} +export function useGetVideoMakePercentageIntervalsSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + GetVideoMakePercentageIntervalsQuery, + GetVideoMakePercentageIntervalsQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery< + GetVideoMakePercentageIntervalsQuery, + GetVideoMakePercentageIntervalsQueryVariables + >(GetVideoMakePercentageIntervalsDocument, options); +} +export type GetVideoMakePercentageIntervalsQueryHookResult = ReturnType< + typeof useGetVideoMakePercentageIntervalsQuery +>; +export type GetVideoMakePercentageIntervalsLazyQueryHookResult = ReturnType< + typeof useGetVideoMakePercentageIntervalsLazyQuery +>; +export type GetVideoMakePercentageIntervalsSuspenseQueryHookResult = ReturnType< + typeof useGetVideoMakePercentageIntervalsSuspenseQuery +>; +export type GetVideoMakePercentageIntervalsQueryResult = Apollo.QueryResult< + GetVideoMakePercentageIntervalsQuery, + GetVideoMakePercentageIntervalsQueryVariables +>; export const GetShotsDocument = gql` query GetShots( $filterInput: FilterInput diff --git a/src/operations/make_percentage_time_series.gql b/src/operations/make_percentage_time_series.gql index 3e34e0b..863a8b0 100644 --- a/src/operations/make_percentage_time_series.gql +++ b/src/operations/make_percentage_time_series.gql @@ -1,10 +1,8 @@ query GetVideoMakePercentageIntervals($videoId: ID!) { getVideoMakePercentageIntervals(videoId: $videoId) { - makePercentageIntervals { - startFrame - endFrame - framesPerSecond - makePercentage - } + startFrame + endFrame + framesPerSecond + makePercentage } }