From 41169e284813d8c5140c67e810d15428351c4388 Mon Sep 17 00:00:00 2001 From: Mike Kalange Date: Mon, 26 Aug 2024 15:54:43 -0700 Subject: [PATCH] Dummy query to get it working for now --- src/index.tsx | 98 ++++++++++++++++++++++++++++++++++++++++ src/operations/shots.gql | 12 +++++ 2 files changed, 110 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index 2eea419..e1c47f0 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1782,6 +1782,25 @@ export type GetShotsQuery = { }>; }; +export type GetSerializedShotPathsQueryVariables = Exact<{ + filterInput: FilterInput; +}>; + +export type GetSerializedShotPathsQuery = { + __typename?: "Query"; + getShots: Array<{ + __typename?: "ShotGQL"; + id: number; + videoId: number; + startFrame: number; + endFrame: number; + serializedShotPaths?: { + __typename?: "SerializedShotPathsGQL"; + b64EncodedBuffer?: string | null; + } | null; + }>; +}; + export type GetShotAnnotationTypesQueryVariables = Exact<{ [key: string]: never; }>; @@ -2790,6 +2809,85 @@ export type GetShotsQueryResult = Apollo.QueryResult< GetShotsQuery, GetShotsQueryVariables >; +export const GetSerializedShotPathsDocument = gql` + query GetSerializedShotPaths($filterInput: FilterInput!) { + getShots(filterInput: $filterInput) { + id + videoId + startFrame + endFrame + serializedShotPaths { + b64EncodedBuffer + } + } + } +`; + +/** + * __useGetSerializedShotPathsQuery__ + * + * To run a query within a React component, call `useGetSerializedShotPathsQuery` and pass it any options that fit your needs. + * When your component renders, `useGetSerializedShotPathsQuery` 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 } = useGetSerializedShotPathsQuery({ + * variables: { + * filterInput: // value for 'filterInput' + * }, + * }); + */ +export function useGetSerializedShotPathsQuery( + baseOptions: Apollo.QueryHookOptions< + GetSerializedShotPathsQuery, + GetSerializedShotPathsQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery< + GetSerializedShotPathsQuery, + GetSerializedShotPathsQueryVariables + >(GetSerializedShotPathsDocument, options); +} +export function useGetSerializedShotPathsLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + GetSerializedShotPathsQuery, + GetSerializedShotPathsQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + GetSerializedShotPathsQuery, + GetSerializedShotPathsQueryVariables + >(GetSerializedShotPathsDocument, options); +} +export function useGetSerializedShotPathsSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + GetSerializedShotPathsQuery, + GetSerializedShotPathsQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery< + GetSerializedShotPathsQuery, + GetSerializedShotPathsQueryVariables + >(GetSerializedShotPathsDocument, options); +} +export type GetSerializedShotPathsQueryHookResult = ReturnType< + typeof useGetSerializedShotPathsQuery +>; +export type GetSerializedShotPathsLazyQueryHookResult = ReturnType< + typeof useGetSerializedShotPathsLazyQuery +>; +export type GetSerializedShotPathsSuspenseQueryHookResult = ReturnType< + typeof useGetSerializedShotPathsSuspenseQuery +>; +export type GetSerializedShotPathsQueryResult = Apollo.QueryResult< + GetSerializedShotPathsQuery, + GetSerializedShotPathsQueryVariables +>; export const GetShotAnnotationTypesDocument = gql` query GetShotAnnotationTypes { getShotAnnotationTypes { diff --git a/src/operations/shots.gql b/src/operations/shots.gql index fc8f652..741aba3 100644 --- a/src/operations/shots.gql +++ b/src/operations/shots.gql @@ -52,6 +52,18 @@ query GetShots( } } +query GetSerializedShotPaths($filterInput: FilterInput!) { + getShots(filterInput: $filterInput) { + id + videoId + startFrame + endFrame + serializedShotPaths { + b64EncodedBuffer + } + } +} + query GetShotAnnotationTypes { getShotAnnotationTypes { id -- 2.45.2