add averageTimePerShot, elapsedTime and MedianRun forVideo queries
All checks were successful
Tests / Tests (pull_request) Successful in 8s

This commit is contained in:
Loewy 2024-06-04 23:20:47 -07:00
parent 9ee4d43c89
commit 14da2ae388
2 changed files with 265 additions and 4 deletions

View File

@ -1044,6 +1044,36 @@ export type GetVideoQuery = {
}; };
}; };
export type GetAverageTimePerShotForVideoQueryVariables = Exact<{
videoId: Scalars["Int"]["input"];
}>;
export type GetAverageTimePerShotForVideoQuery = {
__typename?: "Query";
getVideo: {
__typename?: "VideoGQL";
averageTimeBetweenShots?: number | null;
};
};
export type GetElapsedTimeForVideoQueryVariables = Exact<{
videoId: Scalars["Int"]["input"];
}>;
export type GetElapsedTimeForVideoQuery = {
__typename?: "Query";
getVideo: { __typename?: "VideoGQL"; elapsedTime?: number | null };
};
export type GetMedianRunForVideoQueryVariables = Exact<{
videoId: Scalars["Int"]["input"];
}>;
export type GetMedianRunForVideoQuery = {
__typename?: "Query";
getVideo: { __typename?: "VideoGQL"; medianRun?: number | null };
};
export type CreateUploadStreamMutationVariables = Exact<{ export type CreateUploadStreamMutationVariables = Exact<{
videoMetadataInput: VideoMetadataInput; videoMetadataInput: VideoMetadataInput;
}>; }>;
@ -2115,11 +2145,9 @@ export const GetVideoDetailsDocument = gql`
elapsedTime elapsedTime
endTime endTime
makePercentage makePercentage
makePercentage
medianRun medianRun
startTime startTime
totalShots totalShots
totalShots
totalShotsMade totalShotsMade
createdAt createdAt
updatedAt updatedAt
@ -2363,6 +2391,225 @@ export type GetVideoQueryResult = Apollo.QueryResult<
GetVideoQuery, GetVideoQuery,
GetVideoQueryVariables GetVideoQueryVariables
>; >;
export const GetAverageTimePerShotForVideoDocument = gql`
query GetAverageTimePerShotForVideo($videoId: Int!) {
getVideo(videoId: $videoId) {
averageTimeBetweenShots
}
}
`;
/**
* __useGetAverageTimePerShotForVideoQuery__
*
* To run a query within a React component, call `useGetAverageTimePerShotForVideoQuery` and pass it any options that fit your needs.
* When your component renders, `useGetAverageTimePerShotForVideoQuery` 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 } = useGetAverageTimePerShotForVideoQuery({
* variables: {
* videoId: // value for 'videoId'
* },
* });
*/
export function useGetAverageTimePerShotForVideoQuery(
baseOptions: Apollo.QueryHookOptions<
GetAverageTimePerShotForVideoQuery,
GetAverageTimePerShotForVideoQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useQuery<
GetAverageTimePerShotForVideoQuery,
GetAverageTimePerShotForVideoQueryVariables
>(GetAverageTimePerShotForVideoDocument, options);
}
export function useGetAverageTimePerShotForVideoLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<
GetAverageTimePerShotForVideoQuery,
GetAverageTimePerShotForVideoQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<
GetAverageTimePerShotForVideoQuery,
GetAverageTimePerShotForVideoQueryVariables
>(GetAverageTimePerShotForVideoDocument, options);
}
export function useGetAverageTimePerShotForVideoSuspenseQuery(
baseOptions?: Apollo.SuspenseQueryHookOptions<
GetAverageTimePerShotForVideoQuery,
GetAverageTimePerShotForVideoQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useSuspenseQuery<
GetAverageTimePerShotForVideoQuery,
GetAverageTimePerShotForVideoQueryVariables
>(GetAverageTimePerShotForVideoDocument, options);
}
export type GetAverageTimePerShotForVideoQueryHookResult = ReturnType<
typeof useGetAverageTimePerShotForVideoQuery
>;
export type GetAverageTimePerShotForVideoLazyQueryHookResult = ReturnType<
typeof useGetAverageTimePerShotForVideoLazyQuery
>;
export type GetAverageTimePerShotForVideoSuspenseQueryHookResult = ReturnType<
typeof useGetAverageTimePerShotForVideoSuspenseQuery
>;
export type GetAverageTimePerShotForVideoQueryResult = Apollo.QueryResult<
GetAverageTimePerShotForVideoQuery,
GetAverageTimePerShotForVideoQueryVariables
>;
export const GetElapsedTimeForVideoDocument = gql`
query GetElapsedTimeForVideo($videoId: Int!) {
getVideo(videoId: $videoId) {
elapsedTime
}
}
`;
/**
* __useGetElapsedTimeForVideoQuery__
*
* To run a query within a React component, call `useGetElapsedTimeForVideoQuery` and pass it any options that fit your needs.
* When your component renders, `useGetElapsedTimeForVideoQuery` 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 } = useGetElapsedTimeForVideoQuery({
* variables: {
* videoId: // value for 'videoId'
* },
* });
*/
export function useGetElapsedTimeForVideoQuery(
baseOptions: Apollo.QueryHookOptions<
GetElapsedTimeForVideoQuery,
GetElapsedTimeForVideoQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useQuery<
GetElapsedTimeForVideoQuery,
GetElapsedTimeForVideoQueryVariables
>(GetElapsedTimeForVideoDocument, options);
}
export function useGetElapsedTimeForVideoLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<
GetElapsedTimeForVideoQuery,
GetElapsedTimeForVideoQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<
GetElapsedTimeForVideoQuery,
GetElapsedTimeForVideoQueryVariables
>(GetElapsedTimeForVideoDocument, options);
}
export function useGetElapsedTimeForVideoSuspenseQuery(
baseOptions?: Apollo.SuspenseQueryHookOptions<
GetElapsedTimeForVideoQuery,
GetElapsedTimeForVideoQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useSuspenseQuery<
GetElapsedTimeForVideoQuery,
GetElapsedTimeForVideoQueryVariables
>(GetElapsedTimeForVideoDocument, options);
}
export type GetElapsedTimeForVideoQueryHookResult = ReturnType<
typeof useGetElapsedTimeForVideoQuery
>;
export type GetElapsedTimeForVideoLazyQueryHookResult = ReturnType<
typeof useGetElapsedTimeForVideoLazyQuery
>;
export type GetElapsedTimeForVideoSuspenseQueryHookResult = ReturnType<
typeof useGetElapsedTimeForVideoSuspenseQuery
>;
export type GetElapsedTimeForVideoQueryResult = Apollo.QueryResult<
GetElapsedTimeForVideoQuery,
GetElapsedTimeForVideoQueryVariables
>;
export const GetMedianRunForVideoDocument = gql`
query GetMedianRunForVideo($videoId: Int!) {
getVideo(videoId: $videoId) {
medianRun
}
}
`;
/**
* __useGetMedianRunForVideoQuery__
*
* To run a query within a React component, call `useGetMedianRunForVideoQuery` and pass it any options that fit your needs.
* When your component renders, `useGetMedianRunForVideoQuery` 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 } = useGetMedianRunForVideoQuery({
* variables: {
* videoId: // value for 'videoId'
* },
* });
*/
export function useGetMedianRunForVideoQuery(
baseOptions: Apollo.QueryHookOptions<
GetMedianRunForVideoQuery,
GetMedianRunForVideoQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useQuery<
GetMedianRunForVideoQuery,
GetMedianRunForVideoQueryVariables
>(GetMedianRunForVideoDocument, options);
}
export function useGetMedianRunForVideoLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<
GetMedianRunForVideoQuery,
GetMedianRunForVideoQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<
GetMedianRunForVideoQuery,
GetMedianRunForVideoQueryVariables
>(GetMedianRunForVideoDocument, options);
}
export function useGetMedianRunForVideoSuspenseQuery(
baseOptions?: Apollo.SuspenseQueryHookOptions<
GetMedianRunForVideoQuery,
GetMedianRunForVideoQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useSuspenseQuery<
GetMedianRunForVideoQuery,
GetMedianRunForVideoQueryVariables
>(GetMedianRunForVideoDocument, options);
}
export type GetMedianRunForVideoQueryHookResult = ReturnType<
typeof useGetMedianRunForVideoQuery
>;
export type GetMedianRunForVideoLazyQueryHookResult = ReturnType<
typeof useGetMedianRunForVideoLazyQuery
>;
export type GetMedianRunForVideoSuspenseQueryHookResult = ReturnType<
typeof useGetMedianRunForVideoSuspenseQuery
>;
export type GetMedianRunForVideoQueryResult = Apollo.QueryResult<
GetMedianRunForVideoQuery,
GetMedianRunForVideoQueryVariables
>;
export const CreateUploadStreamDocument = gql` export const CreateUploadStreamDocument = gql`
mutation CreateUploadStream($videoMetadataInput: VideoMetadataInput!) { mutation CreateUploadStream($videoMetadataInput: VideoMetadataInput!) {
createUploadStream(videoMetadata: $videoMetadataInput) { createUploadStream(videoMetadata: $videoMetadataInput) {

View File

@ -91,11 +91,9 @@ query GetVideoDetails($videoId: Int!) {
elapsedTime elapsedTime
endTime endTime
makePercentage makePercentage
makePercentage
medianRun medianRun
startTime startTime
totalShots totalShots
totalShots
totalShotsMade totalShotsMade
createdAt createdAt
updatedAt updatedAt
@ -148,3 +146,19 @@ query GetVideo($videoId: Int!) {
} }
} }
} }
query GetAverageTimePerShotForVideo($videoId: Int!) {
getVideo(videoId: $videoId) {
averageTimeBetweenShots
}
}
query GetElapsedTimeForVideo($videoId: Int!) {
getVideo(videoId: $videoId) {
elapsedTime
}
}
query GetMedianRunForVideo($videoId: Int!) {
getVideo(videoId: $videoId) {
medianRun
}
}