Compare commits

...

8 Commits

Author SHA1 Message Date
dean
5fbc134c42 feat: Add following and followers to GetUser query
All checks were successful
Tests / Tests (pull_request) Successful in 21s
Adds following and followers arrays to the GetUser query to support
displaying follower/following counts on other users' profiles.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 15:53:59 -08:00
f67288d387 Merge pull request 'feat: Add GetAverageDifficultyForVideo query' (#216) from dean/add-avg-difficulty-for-video-query into master
Reviewed-on: #216
2025-12-16 04:22:56 +00:00
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
47339caa74 Merge pull request 'Add averageDifficulty to aggregate operation' (#215) from loewy/add-average-difficulty-field into master
Reviewed-on: #215
2025-12-16 04:06:05 +00:00
3c8be1d647 add averageDifficulty to aggregate operation
All checks were successful
Tests / Tests (pull_request) Successful in 10s
2025-12-10 11:43:58 -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
5 changed files with 119 additions and 0 deletions

View File

@@ -3535,6 +3535,7 @@ export type GetAggregatedShotMetricsQuery = {
__typename?: "TargetMetricsGQL"; __typename?: "TargetMetricsGQL";
count: number; count: number;
makePercentage?: number | null; makePercentage?: number | null;
averageDifficulty?: number | null;
}; };
}>; }>;
}; };
@@ -4017,6 +4018,7 @@ export type GetFeedQuery = {
private: boolean; private: boolean;
elapsedTime?: number | null; elapsedTime?: number | null;
tableSize: number; tableSize: number;
pocketSize?: number | null;
owner?: { owner?: {
__typename?: "UserGQL"; __typename?: "UserGQL";
id: number; id: number;
@@ -4118,6 +4120,7 @@ export type VideoCardFieldsFragment = {
private: boolean; private: boolean;
elapsedTime?: number | null; elapsedTime?: number | null;
tableSize: number; tableSize: number;
pocketSize?: number | null;
owner?: { owner?: {
__typename?: "UserGQL"; __typename?: "UserGQL";
id: number; id: number;
@@ -4215,6 +4218,7 @@ export type GetVideoFeedQuery = {
private: boolean; private: boolean;
elapsedTime?: number | null; elapsedTime?: number | null;
tableSize: number; tableSize: number;
pocketSize?: number | null;
owner?: { owner?: {
__typename?: "UserGQL"; __typename?: "UserGQL";
id: number; id: number;
@@ -5383,6 +5387,8 @@ export type GetUserQuery = {
updatedAt?: any | null; updatedAt?: any | null;
videosPrivateByDefault?: boolean | null; videosPrivateByDefault?: boolean | null;
agreesToMarketing?: boolean | null; agreesToMarketing?: boolean | null;
following?: Array<{ __typename?: "UserGQL"; id: number }> | null;
followers?: Array<{ __typename?: "UserGQL"; id: number }> | null;
} | null; } | null;
}; };
@@ -5682,6 +5688,7 @@ export type GetVideoDetailsQuery = {
endTime?: any | null; endTime?: any | null;
makePercentage: number; makePercentage: number;
medianRun?: number | null; medianRun?: number | null;
averageDifficulty?: number | null;
startTime?: any | null; startTime?: any | null;
totalShots: number; totalShots: number;
totalShotsMade: number; totalShotsMade: number;
@@ -5947,6 +5954,19 @@ export type GetMedianRunForVideoQuery = {
getVideo: { __typename?: "VideoGQL"; id: number; medianRun?: number | null }; 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 = { export type StreamWithEndFramesFragment = {
__typename?: "UploadStreamGQL"; __typename?: "UploadStreamGQL";
id: string; id: string;
@@ -6382,6 +6402,7 @@ export const VideoCardFieldsFragmentDoc = gql`
streamSegmentType streamSegmentType
} }
tableSize tableSize
pocketSize
tags { tags {
tagClasses { tagClasses {
name name
@@ -6689,6 +6710,7 @@ export const GetAggregatedShotMetricsDocument = gql`
targetMetrics { targetMetrics {
count count
makePercentage makePercentage
averageDifficulty
} }
} }
} }
@@ -10874,6 +10896,12 @@ export const GetUserDocument = gql`
query GetUser($userId: Int!) { query GetUser($userId: Int!) {
getUser(userId: $userId) { getUser(userId: $userId) {
...UserFragment ...UserFragment
following {
id
}
followers {
id
}
} }
} }
${UserFragmentFragmentDoc} ${UserFragmentFragmentDoc}
@@ -11953,6 +11981,7 @@ export const GetVideoDetailsDocument = gql`
endTime endTime
makePercentage makePercentage
medianRun medianRun
averageDifficulty
startTime startTime
totalShots totalShots
totalShotsMade totalShotsMade
@@ -12606,6 +12635,80 @@ export type GetMedianRunForVideoQueryResult = Apollo.QueryResult<
GetMedianRunForVideoQuery, GetMedianRunForVideoQuery,
GetMedianRunForVideoQueryVariables 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` export const GetVideoForClipTimesDocument = gql`
query GetVideoForClipTimes($videoId: Int!) { query GetVideoForClipTimes($videoId: Int!) {
getVideo(videoId: $videoId) { getVideo(videoId: $videoId) {

View File

@@ -7,6 +7,7 @@ query GetAggregatedShotMetrics($aggregateInput: AggregateInputGQL!) {
targetMetrics { targetMetrics {
count count
makePercentage makePercentage
averageDifficulty
} }
} }
} }

View File

@@ -50,6 +50,7 @@ fragment VideoCardFields on VideoGQL {
streamSegmentType streamSegmentType
} }
tableSize tableSize
pocketSize
tags { tags {
tagClasses { tagClasses {
name name

View File

@@ -34,6 +34,12 @@ query getLoggedInUser {
query GetUser($userId: Int!) { query GetUser($userId: Int!) {
getUser(userId: $userId) { getUser(userId: $userId) {
...UserFragment ...UserFragment
following {
id
}
followers {
id
}
} }
} }

View File

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