Compare commits

..

4 Commits

Author SHA1 Message Date
dean
71425a22a6 feat: Add GetAverageDifficultyForVideo query
All checks were successful
Tests / Tests (pull_request) Successful in 10s
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 20:21:22 -08:00
09267529cd Merge pull request 'dean/add-challenge-feature' (#212) from dean/add-challenge-feature into master
Reviewed-on: #212
2025-12-10 19:11:18 +00:00
2b48ec48d5 Merge pull request 'feat: Add pocketSize to VideoCardFields fragment' (#214) from dean/feed-pocket-size-v2 into master
Reviewed-on: #214
2025-12-10 18:33:30 +00:00
dean
93bf341c0f feat: Add pocketSize to VideoCardFields fragment
All checks were successful
Tests / Tests (pull_request) Successful in 8s
2025-12-10 10:31:36 -08:00
3 changed files with 101 additions and 4 deletions

View File

@@ -5685,6 +5685,7 @@ export type GetVideoDetailsQuery = {
endTime?: any | null;
makePercentage: number;
medianRun?: number | null;
averageDifficulty?: number | null;
startTime?: any | null;
totalShots: number;
totalShotsMade: number;
@@ -5950,6 +5951,19 @@ export type GetMedianRunForVideoQuery = {
getVideo: { __typename?: "VideoGQL"; id: number; medianRun?: number | null };
};
export type GetAverageDifficultyForVideoQueryVariables = Exact<{
videoId: Scalars["Int"]["input"];
}>;
export type GetAverageDifficultyForVideoQuery = {
__typename?: "Query";
getVideo: {
__typename?: "VideoGQL";
id: number;
averageDifficulty?: number | null;
};
};
export type StreamWithEndFramesFragment = {
__typename?: "UploadStreamGQL";
id: string;
@@ -11957,6 +11971,7 @@ export const GetVideoDetailsDocument = gql`
endTime
makePercentage
medianRun
averageDifficulty
startTime
totalShots
totalShotsMade
@@ -12610,6 +12625,80 @@ export type GetMedianRunForVideoQueryResult = Apollo.QueryResult<
GetMedianRunForVideoQuery,
GetMedianRunForVideoQueryVariables
>;
export const GetAverageDifficultyForVideoDocument = gql`
query GetAverageDifficultyForVideo($videoId: Int!) {
getVideo(videoId: $videoId) {
id
averageDifficulty
}
}
`;
/**
* __useGetAverageDifficultyForVideoQuery__
*
* To run a query within a React component, call `useGetAverageDifficultyForVideoQuery` and pass it any options that fit your needs.
* When your component renders, `useGetAverageDifficultyForVideoQuery` 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 } = useGetAverageDifficultyForVideoQuery({
* variables: {
* videoId: // value for 'videoId'
* },
* });
*/
export function useGetAverageDifficultyForVideoQuery(
baseOptions: Apollo.QueryHookOptions<
GetAverageDifficultyForVideoQuery,
GetAverageDifficultyForVideoQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useQuery<
GetAverageDifficultyForVideoQuery,
GetAverageDifficultyForVideoQueryVariables
>(GetAverageDifficultyForVideoDocument, options);
}
export function useGetAverageDifficultyForVideoLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<
GetAverageDifficultyForVideoQuery,
GetAverageDifficultyForVideoQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<
GetAverageDifficultyForVideoQuery,
GetAverageDifficultyForVideoQueryVariables
>(GetAverageDifficultyForVideoDocument, options);
}
export function useGetAverageDifficultyForVideoSuspenseQuery(
baseOptions?: Apollo.SuspenseQueryHookOptions<
GetAverageDifficultyForVideoQuery,
GetAverageDifficultyForVideoQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useSuspenseQuery<
GetAverageDifficultyForVideoQuery,
GetAverageDifficultyForVideoQueryVariables
>(GetAverageDifficultyForVideoDocument, options);
}
export type GetAverageDifficultyForVideoQueryHookResult = ReturnType<
typeof useGetAverageDifficultyForVideoQuery
>;
export type GetAverageDifficultyForVideoLazyQueryHookResult = ReturnType<
typeof useGetAverageDifficultyForVideoLazyQuery
>;
export type GetAverageDifficultyForVideoSuspenseQueryHookResult = ReturnType<
typeof useGetAverageDifficultyForVideoSuspenseQuery
>;
export type GetAverageDifficultyForVideoQueryResult = Apollo.QueryResult<
GetAverageDifficultyForVideoQuery,
GetAverageDifficultyForVideoQueryVariables
>;
export const GetVideoForClipTimesDocument = gql`
query GetVideoForClipTimes($videoId: Int!) {
getVideo(videoId: $videoId) {

View File

@@ -61,6 +61,7 @@ query GetVideoDetails($videoId: Int!) {
endTime
makePercentage
medianRun
averageDifficulty
startTime
totalShots
totalShotsMade
@@ -211,6 +212,13 @@ query GetMedianRunForVideo($videoId: Int!) {
}
}
query GetAverageDifficultyForVideo($videoId: Int!) {
getVideo(videoId: $videoId) {
id
averageDifficulty
}
}
fragment StreamWithEndFrames on UploadStreamGQL {
id
streamSegmentType

View File

@@ -1108,7 +1108,7 @@ type AddShotAnnotationReturn {
}
union SuccessfulAddAddShotAnnotationErrors =
| SuccessfulAdd
SuccessfulAdd
| AddShotAnnotationErrors
type SuccessfulAdd {
@@ -1120,7 +1120,7 @@ type AddShotAnnotationErrors {
}
union DoesNotOwnShotErrOtherErrorNeedsNote =
| DoesNotOwnShotErr
DoesNotOwnShotErr
| OtherErrorNeedsNote
type DoesNotOwnShotErr {
@@ -1163,7 +1163,7 @@ type GetProfileUploadLinkReturn {
}
union UploadLinkGetProfileUploadLinkErrors =
| UploadLink
UploadLink
| GetProfileUploadLinkErrors
type UploadLink {
@@ -1239,7 +1239,7 @@ type GetUploadLinkErrors {
}
union MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErr =
| MustHaveSetForUploadLinkErr
MustHaveSetForUploadLinkErr
| SegmentAlreadyUploadedErr
| ProcessingFailedErr
| NoInitForChunkedUploadErr