Compare commits

...

11 Commits

Author SHA1 Message Date
00cca10cb3 Merge pull request 'Use pocketing intention fragment to prevent cache merge issues' (#180) from loewy/update-runs-operations into master
Reviewed-on: #180
2025-04-30 15:58:46 -06:00
ad704cad75 use entire fragment to prevent cache merge issues
All checks were successful
Tests / Tests (pull_request) Successful in 15s
2025-04-30 14:57:54 -07:00
e2743abb59 Merge pull request 'update runs' (#179) from dean/update-run-gql into master
Reviewed-on: #179
Reviewed-by: loewy <loewymalkov@gmail.com>
2025-04-30 12:39:23 -06:00
e109e89a40 update runs
All checks were successful
Tests / Tests (pull_request) Successful in 16s
2025-04-30 18:18:40 +00:00
67bad20d24 Merge pull request 'Add limit and countRespectsLimit args' (#178) from loewy/add-limit-args-to-get-runs into master
Reviewed-on: #178
2025-04-24 13:48:12 -06:00
0160455b9f add limit and countRespectsLimit args
All checks were successful
Tests / Tests (pull_request) Successful in 9s
2025-04-24 12:43:07 -07:00
170ff70b7a Merge pull request 'Add required types to followers in feed operation' (#177) from loewy/add-required-types-to-feed-operation into master
Reviewed-on: #177
2025-04-09 12:48:35 -06:00
8df09b8c93 run just gql
All checks were successful
Tests / Tests (pull_request) Successful in 15s
2025-04-09 11:47:16 -07:00
644ea66e98 add required types to followers in feed operation
Some checks failed
Tests / Tests (pull_request) Failing after 17s
2025-04-09 11:43:27 -07:00
0a5097c5c0 Merge pull request 'Add followers to feed operation for reactions' (#176) from loewy/add-followers-in-reactions into master
Reviewed-on: #176
2025-04-08 18:21:33 -06:00
f4445f7ecb add followers to feed operation for reactions
All checks were successful
Tests / Tests (pull_request) Successful in 10s
2025-04-08 16:48:12 -07:00
3 changed files with 238 additions and 0 deletions

View File

@@ -3219,6 +3219,12 @@ export type GetFeedQuery = {
id: number;
username: string;
profileImageUri?: string | null;
followers?: Array<{
__typename?: "UserGQL";
id: number;
username: string;
profileImageUri?: string | null;
}> | null;
};
}>;
}>;
@@ -3283,6 +3289,12 @@ export type VideoCardFieldsFragment = {
id: number;
username: string;
profileImageUri?: string | null;
followers?: Array<{
__typename?: "UserGQL";
id: number;
username: string;
profileImageUri?: string | null;
}> | null;
};
}>;
};
@@ -3356,6 +3368,12 @@ export type GetVideoFeedQuery = {
id: number;
username: string;
profileImageUri?: string | null;
followers?: Array<{
__typename?: "UserGQL";
id: number;
username: string;
profileImageUri?: string | null;
}> | null;
};
}>;
}>;
@@ -3575,6 +3593,8 @@ export type GetRunsForHighlightsQueryVariables = Exact<{
filterInput: RunFilterInput;
runIds?: InputMaybe<Array<Scalars["Int"]["input"]> | Scalars["Int"]["input"]>;
runsOrdering?: InputMaybe<GetRunsOrdering>;
limit?: Scalars["Int"]["input"];
countRespectsLimit?: Scalars["Boolean"]["input"];
}>;
export type GetRunsForHighlightsQuery = {
@@ -3594,6 +3614,55 @@ export type GetRunsForHighlightsQuery = {
};
};
export type PocketingIntentionFragmentFragment = {
__typename?: "PocketingIntentionFeaturesGQL";
make?: boolean | null;
targetPocketDistance?: number | null;
targetPocketAngle?: number | null;
targetPocketAngleDirection?: ShotDirectionEnum | null;
marginOfErrorInDegrees?: number | null;
intendedPocketType?: PocketEnum | null;
difficulty?: number | null;
};
export type GetRunsWithTimestampsQueryVariables = Exact<{
filterInput: RunFilterInput;
runIds?: InputMaybe<Array<Scalars["Int"]["input"]> | Scalars["Int"]["input"]>;
runsOrdering?: InputMaybe<GetRunsOrdering>;
}>;
export type GetRunsWithTimestampsQuery = {
__typename?: "Query";
getRuns: {
__typename?: "GetRunsResult";
count?: number | null;
runIds: Array<number>;
runs: Array<{
__typename?: "RunGQL";
id: number;
runLength: number;
userId: number;
videoId: number;
shots: Array<{
__typename?: "ShotGQL";
videoId: number;
id: number;
createdAt?: any | null;
pocketingIntentionFeatures?: {
__typename?: "PocketingIntentionFeaturesGQL";
make?: boolean | null;
targetPocketDistance?: number | null;
targetPocketAngle?: number | null;
targetPocketAngleDirection?: ShotDirectionEnum | null;
marginOfErrorInDegrees?: number | null;
intendedPocketType?: PocketEnum | null;
difficulty?: number | null;
} | null;
}>;
}>;
};
};
export type GetSerializedShotPathsQueryVariables = Exact<{
filterInput: FilterInput;
}>;
@@ -5055,6 +5124,11 @@ export const VideoCardFieldsFragmentDoc = gql`
id
username
profileImageUri
followers {
id
username
profileImageUri
}
}
reaction
}
@@ -5066,6 +5140,17 @@ export const MedalFieldsFragmentDoc = gql`
nickname
}
`;
export const PocketingIntentionFragmentFragmentDoc = gql`
fragment PocketingIntentionFragment on PocketingIntentionFeaturesGQL {
make
targetPocketDistance
targetPocketAngle
targetPocketAngleDirection
marginOfErrorInDegrees
intendedPocketType
difficulty
}
`;
export const ShotWithAllFeaturesFragmentDoc = gql`
fragment ShotWithAllFeatures on ShotGQL {
id
@@ -6037,11 +6122,15 @@ export const GetRunsForHighlightsDocument = gql`
$filterInput: RunFilterInput!
$runIds: [Int!] = null
$runsOrdering: GetRunsOrdering
$limit: Int! = 500
$countRespectsLimit: Boolean! = false
) {
getRuns(
filterInput: $filterInput
runIds: $runIds
runsOrdering: $runsOrdering
limit: $limit
countRespectsLimit: $countRespectsLimit
) {
count
runs {
@@ -6074,6 +6163,8 @@ export const GetRunsForHighlightsDocument = gql`
* filterInput: // value for 'filterInput'
* runIds: // value for 'runIds'
* runsOrdering: // value for 'runsOrdering'
* limit: // value for 'limit'
* countRespectsLimit: // value for 'countRespectsLimit'
* },
* });
*/
@@ -6126,6 +6217,105 @@ export type GetRunsForHighlightsQueryResult = Apollo.QueryResult<
GetRunsForHighlightsQuery,
GetRunsForHighlightsQueryVariables
>;
export const GetRunsWithTimestampsDocument = gql`
query GetRunsWithTimestamps(
$filterInput: RunFilterInput!
$runIds: [Int!] = null
$runsOrdering: GetRunsOrdering
) {
getRuns(
filterInput: $filterInput
runIds: $runIds
runsOrdering: $runsOrdering
) {
count
runs {
id
runLength
userId
videoId
shots {
videoId
id
createdAt
pocketingIntentionFeatures {
...PocketingIntentionFragment
}
}
}
runIds
}
}
${PocketingIntentionFragmentFragmentDoc}
`;
/**
* __useGetRunsWithTimestampsQuery__
*
* To run a query within a React component, call `useGetRunsWithTimestampsQuery` and pass it any options that fit your needs.
* When your component renders, `useGetRunsWithTimestampsQuery` 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 } = useGetRunsWithTimestampsQuery({
* variables: {
* filterInput: // value for 'filterInput'
* runIds: // value for 'runIds'
* runsOrdering: // value for 'runsOrdering'
* },
* });
*/
export function useGetRunsWithTimestampsQuery(
baseOptions: Apollo.QueryHookOptions<
GetRunsWithTimestampsQuery,
GetRunsWithTimestampsQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useQuery<
GetRunsWithTimestampsQuery,
GetRunsWithTimestampsQueryVariables
>(GetRunsWithTimestampsDocument, options);
}
export function useGetRunsWithTimestampsLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<
GetRunsWithTimestampsQuery,
GetRunsWithTimestampsQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<
GetRunsWithTimestampsQuery,
GetRunsWithTimestampsQueryVariables
>(GetRunsWithTimestampsDocument, options);
}
export function useGetRunsWithTimestampsSuspenseQuery(
baseOptions?: Apollo.SuspenseQueryHookOptions<
GetRunsWithTimestampsQuery,
GetRunsWithTimestampsQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useSuspenseQuery<
GetRunsWithTimestampsQuery,
GetRunsWithTimestampsQueryVariables
>(GetRunsWithTimestampsDocument, options);
}
export type GetRunsWithTimestampsQueryHookResult = ReturnType<
typeof useGetRunsWithTimestampsQuery
>;
export type GetRunsWithTimestampsLazyQueryHookResult = ReturnType<
typeof useGetRunsWithTimestampsLazyQuery
>;
export type GetRunsWithTimestampsSuspenseQueryHookResult = ReturnType<
typeof useGetRunsWithTimestampsSuspenseQuery
>;
export type GetRunsWithTimestampsQueryResult = Apollo.QueryResult<
GetRunsWithTimestampsQuery,
GetRunsWithTimestampsQueryVariables
>;
export const GetSerializedShotPathsDocument = gql`
query GetSerializedShotPaths($filterInput: FilterInput!) {
getShots(filterInput: $filterInput) {

View File

@@ -64,6 +64,11 @@ fragment VideoCardFields on VideoGQL {
id
username
profileImageUri
followers {
id
username
profileImageUri
}
}
reaction
}

View File

@@ -2,6 +2,45 @@ query GetRunsForHighlights(
$filterInput: RunFilterInput!
$runIds: [Int!] = null
$runsOrdering: GetRunsOrdering
$limit: Int! = 500
$countRespectsLimit: Boolean! = false
) {
getRuns(
filterInput: $filterInput
runIds: $runIds
runsOrdering: $runsOrdering
limit: $limit
countRespectsLimit: $countRespectsLimit
) {
count
runs {
id
runLength
userId
videoId
shots {
videoId
id
}
}
runIds
}
}
fragment PocketingIntentionFragment on PocketingIntentionFeaturesGQL {
make
targetPocketDistance
targetPocketAngle
targetPocketAngleDirection
marginOfErrorInDegrees
intendedPocketType
difficulty
}
query GetRunsWithTimestamps(
$filterInput: RunFilterInput!
$runIds: [Int!] = null
$runsOrdering: GetRunsOrdering
) {
getRuns(
filterInput: $filterInput
@@ -17,6 +56,10 @@ query GetRunsForHighlights(
shots {
videoId
id
createdAt
pocketingIntentionFeatures {
...PocketingIntentionFragment
}
}
}
runIds