add lightweigth gql call to get video header info
All checks were successful
Tests / Tests (pull_request) Successful in 15s
All checks were successful
Tests / Tests (pull_request) Successful in 15s
This commit is contained in:
parent
c8cf97421b
commit
c426e753cd
@ -2970,6 +2970,20 @@ export type GetVideoForClipTimesQuery = {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type GetHeaderInfoByVideoIdQueryVariables = Exact<{
|
||||||
|
videoId: Scalars["Int"]["input"];
|
||||||
|
}>;
|
||||||
|
|
||||||
|
export type GetHeaderInfoByVideoIdQuery = {
|
||||||
|
__typename?: "Query";
|
||||||
|
getVideo: {
|
||||||
|
__typename?: "VideoGQL";
|
||||||
|
id: number;
|
||||||
|
name?: string | null;
|
||||||
|
startTime?: any | null;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
export type CreateUploadStreamMutationVariables = Exact<{
|
export type CreateUploadStreamMutationVariables = Exact<{
|
||||||
videoMetadataInput: VideoMetadataInput;
|
videoMetadataInput: VideoMetadataInput;
|
||||||
}>;
|
}>;
|
||||||
@ -5227,6 +5241,81 @@ export type GetVideoForClipTimesQueryResult = Apollo.QueryResult<
|
|||||||
GetVideoForClipTimesQuery,
|
GetVideoForClipTimesQuery,
|
||||||
GetVideoForClipTimesQueryVariables
|
GetVideoForClipTimesQueryVariables
|
||||||
>;
|
>;
|
||||||
|
export const GetHeaderInfoByVideoIdDocument = gql`
|
||||||
|
query GetHeaderInfoByVideoId($videoId: Int!) {
|
||||||
|
getVideo(videoId: $videoId) {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
startTime
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __useGetHeaderInfoByVideoIdQuery__
|
||||||
|
*
|
||||||
|
* To run a query within a React component, call `useGetHeaderInfoByVideoIdQuery` and pass it any options that fit your needs.
|
||||||
|
* When your component renders, `useGetHeaderInfoByVideoIdQuery` 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 } = useGetHeaderInfoByVideoIdQuery({
|
||||||
|
* variables: {
|
||||||
|
* videoId: // value for 'videoId'
|
||||||
|
* },
|
||||||
|
* });
|
||||||
|
*/
|
||||||
|
export function useGetHeaderInfoByVideoIdQuery(
|
||||||
|
baseOptions: Apollo.QueryHookOptions<
|
||||||
|
GetHeaderInfoByVideoIdQuery,
|
||||||
|
GetHeaderInfoByVideoIdQueryVariables
|
||||||
|
>,
|
||||||
|
) {
|
||||||
|
const options = { ...defaultOptions, ...baseOptions };
|
||||||
|
return Apollo.useQuery<
|
||||||
|
GetHeaderInfoByVideoIdQuery,
|
||||||
|
GetHeaderInfoByVideoIdQueryVariables
|
||||||
|
>(GetHeaderInfoByVideoIdDocument, options);
|
||||||
|
}
|
||||||
|
export function useGetHeaderInfoByVideoIdLazyQuery(
|
||||||
|
baseOptions?: Apollo.LazyQueryHookOptions<
|
||||||
|
GetHeaderInfoByVideoIdQuery,
|
||||||
|
GetHeaderInfoByVideoIdQueryVariables
|
||||||
|
>,
|
||||||
|
) {
|
||||||
|
const options = { ...defaultOptions, ...baseOptions };
|
||||||
|
return Apollo.useLazyQuery<
|
||||||
|
GetHeaderInfoByVideoIdQuery,
|
||||||
|
GetHeaderInfoByVideoIdQueryVariables
|
||||||
|
>(GetHeaderInfoByVideoIdDocument, options);
|
||||||
|
}
|
||||||
|
export function useGetHeaderInfoByVideoIdSuspenseQuery(
|
||||||
|
baseOptions?: Apollo.SuspenseQueryHookOptions<
|
||||||
|
GetHeaderInfoByVideoIdQuery,
|
||||||
|
GetHeaderInfoByVideoIdQueryVariables
|
||||||
|
>,
|
||||||
|
) {
|
||||||
|
const options = { ...defaultOptions, ...baseOptions };
|
||||||
|
return Apollo.useSuspenseQuery<
|
||||||
|
GetHeaderInfoByVideoIdQuery,
|
||||||
|
GetHeaderInfoByVideoIdQueryVariables
|
||||||
|
>(GetHeaderInfoByVideoIdDocument, options);
|
||||||
|
}
|
||||||
|
export type GetHeaderInfoByVideoIdQueryHookResult = ReturnType<
|
||||||
|
typeof useGetHeaderInfoByVideoIdQuery
|
||||||
|
>;
|
||||||
|
export type GetHeaderInfoByVideoIdLazyQueryHookResult = ReturnType<
|
||||||
|
typeof useGetHeaderInfoByVideoIdLazyQuery
|
||||||
|
>;
|
||||||
|
export type GetHeaderInfoByVideoIdSuspenseQueryHookResult = ReturnType<
|
||||||
|
typeof useGetHeaderInfoByVideoIdSuspenseQuery
|
||||||
|
>;
|
||||||
|
export type GetHeaderInfoByVideoIdQueryResult = Apollo.QueryResult<
|
||||||
|
GetHeaderInfoByVideoIdQuery,
|
||||||
|
GetHeaderInfoByVideoIdQueryVariables
|
||||||
|
>;
|
||||||
export const CreateUploadStreamDocument = gql`
|
export const CreateUploadStreamDocument = gql`
|
||||||
mutation CreateUploadStream($videoMetadataInput: VideoMetadataInput!) {
|
mutation CreateUploadStream($videoMetadataInput: VideoMetadataInput!) {
|
||||||
createUploadStream(videoMetadata: $videoMetadataInput) {
|
createUploadStream(videoMetadata: $videoMetadataInput) {
|
||||||
|
@ -237,3 +237,11 @@ query GetVideoForClipTimes($videoId: Int!) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
query GetHeaderInfoByVideoId($videoId: Int!) {
|
||||||
|
getVideo(videoId: $videoId) {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
startTime
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user