Add a lightweight query to get video thumbnail and info from getShotsResultGql #71
105
src/index.tsx
105
src/index.tsx
@ -2401,6 +2401,29 @@ export type GetShotAnnotationTypesQuery = {
|
||||
}>;
|
||||
};
|
||||
|
||||
export type GetShotsWithVideoGqlQueryVariables = Exact<{
|
||||
filterInput: FilterInput;
|
||||
limit?: InputMaybe<Scalars["Int"]["input"]>;
|
||||
}>;
|
||||
|
||||
export type GetShotsWithVideoGqlQuery = {
|
||||
__typename?: "Query";
|
||||
getShotsWithMetadata: {
|
||||
__typename?: "GetShotsResult";
|
||||
ids: Array<number>;
|
||||
shots: Array<{
|
||||
__typename?: "ShotGQL";
|
||||
id: number;
|
||||
videoId: number;
|
||||
video?: {
|
||||
__typename?: "VideoGQL";
|
||||
screenshotUri?: string | null;
|
||||
endTime?: any | null;
|
||||
} | null;
|
||||
}>;
|
||||
};
|
||||
};
|
||||
|
||||
export type GetShotsWithMetadataQueryVariables = Exact<{
|
||||
filterInput: FilterInput;
|
||||
shotsPagination?: InputMaybe<GetShotsPagination>;
|
||||
@ -3652,6 +3675,88 @@ export type GetShotAnnotationTypesQueryResult = Apollo.QueryResult<
|
||||
GetShotAnnotationTypesQuery,
|
||||
GetShotAnnotationTypesQueryVariables
|
||||
>;
|
||||
export const GetShotsWithVideoGqlDocument = gql`
|
||||
query GetShotsWithVideoGql($filterInput: FilterInput!, $limit: Int) {
|
||||
getShotsWithMetadata(filterInput: $filterInput, limit: $limit) {
|
||||
ids
|
||||
shots {
|
||||
id
|
||||
videoId
|
||||
video {
|
||||
screenshotUri
|
||||
endTime
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
/**
|
||||
* __useGetShotsWithVideoGqlQuery__
|
||||
*
|
||||
* To run a query within a React component, call `useGetShotsWithVideoGqlQuery` and pass it any options that fit your needs.
|
||||
* When your component renders, `useGetShotsWithVideoGqlQuery` 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 } = useGetShotsWithVideoGqlQuery({
|
||||
* variables: {
|
||||
* filterInput: // value for 'filterInput'
|
||||
* limit: // value for 'limit'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useGetShotsWithVideoGqlQuery(
|
||||
baseOptions: Apollo.QueryHookOptions<
|
||||
GetShotsWithVideoGqlQuery,
|
||||
GetShotsWithVideoGqlQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useQuery<
|
||||
GetShotsWithVideoGqlQuery,
|
||||
GetShotsWithVideoGqlQueryVariables
|
||||
>(GetShotsWithVideoGqlDocument, options);
|
||||
}
|
||||
export function useGetShotsWithVideoGqlLazyQuery(
|
||||
baseOptions?: Apollo.LazyQueryHookOptions<
|
||||
GetShotsWithVideoGqlQuery,
|
||||
GetShotsWithVideoGqlQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useLazyQuery<
|
||||
GetShotsWithVideoGqlQuery,
|
||||
GetShotsWithVideoGqlQueryVariables
|
||||
>(GetShotsWithVideoGqlDocument, options);
|
||||
}
|
||||
export function useGetShotsWithVideoGqlSuspenseQuery(
|
||||
baseOptions?: Apollo.SuspenseQueryHookOptions<
|
||||
GetShotsWithVideoGqlQuery,
|
||||
GetShotsWithVideoGqlQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useSuspenseQuery<
|
||||
GetShotsWithVideoGqlQuery,
|
||||
GetShotsWithVideoGqlQueryVariables
|
||||
>(GetShotsWithVideoGqlDocument, options);
|
||||
}
|
||||
export type GetShotsWithVideoGqlQueryHookResult = ReturnType<
|
||||
typeof useGetShotsWithVideoGqlQuery
|
||||
>;
|
||||
export type GetShotsWithVideoGqlLazyQueryHookResult = ReturnType<
|
||||
typeof useGetShotsWithVideoGqlLazyQuery
|
||||
>;
|
||||
export type GetShotsWithVideoGqlSuspenseQueryHookResult = ReturnType<
|
||||
typeof useGetShotsWithVideoGqlSuspenseQuery
|
||||
>;
|
||||
export type GetShotsWithVideoGqlQueryResult = Apollo.QueryResult<
|
||||
GetShotsWithVideoGqlQuery,
|
||||
GetShotsWithVideoGqlQueryVariables
|
||||
>;
|
||||
export const GetShotsWithMetadataDocument = gql`
|
||||
query GetShotsWithMetadata(
|
||||
$filterInput: FilterInput!
|
||||
|
@ -17,6 +17,20 @@ query GetShotAnnotationTypes {
|
||||
}
|
||||
}
|
||||
|
||||
query GetShotsWithVideoGql($filterInput: FilterInput!, $limit: Int) {
|
||||
getShotsWithMetadata(filterInput: $filterInput, limit: $limit) {
|
||||
ids
|
||||
shots {
|
||||
id
|
||||
videoId
|
||||
video {
|
||||
screenshotUri
|
||||
endTime
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query GetShotsWithMetadata(
|
||||
$filterInput: FilterInput!
|
||||
$shotsPagination: GetShotsPagination
|
||||
|
Loading…
Reference in New Issue
Block a user