Compare commits

..

10 Commits

Author SHA1 Message Date
de653ba54c Merge pull request 'Add tagClasses to getUserTags operation' (#161) from loewy/getUserTags-operation into master
Reviewed-on: #161
2025-02-05 13:51:14 -07:00
2657628a54 add tagClasses to operation
All checks were successful
Tests / Tests (pull_request) Successful in 8s
2025-02-05 12:48:56 -08:00
cd20cfcb40 Add get runs for highlights 2025-02-04 20:57:22 -07:00
2657a9baf7 Merge pull request 'Return tag classes with tag' (#160) from kat/return-tag-classes-with-tag into master
Reviewed-on: #160
2025-02-04 19:16:15 -07:00
9bb4b7c513 Return tag classes with tag
All checks were successful
Tests / Tests (pull_request) Successful in 15s
2025-02-04 19:14:55 -07:00
a5050ed08d Merge pull request 'Revert previous commit 021cd35278ea74f6971ae021b33ddc1bba020e6d' (#159) from loewy/revert-adding-group into master
Reviewed-on: #159
2025-02-04 15:42:41 -07:00
b9e26243e9 revert
All checks were successful
Tests / Tests (pull_request) Successful in 9s
2025-02-04 14:41:11 -08:00
021cd35278 Merge pull request 'Add group in return for user tags' (#158) from loewy/add-group-to-get-user-tags into master
Reviewed-on: #158
2025-02-04 14:48:11 -07:00
8dda81236a add group to return for user tags
All checks were successful
Tests / Tests (pull_request) Successful in 16s
2025-02-04 13:44:58 -08:00
c7ff615fe4 Create tags in video metadata (#157)
Reviewed-on: #157
2025-02-03 16:43:25 -07:00
4 changed files with 166 additions and 6 deletions

View File

@ -2708,13 +2708,19 @@ export type SuccessfulAddAddShotAnnotationErrors =
| AddShotAnnotationErrors
| SuccessfulAdd;
export type TagGql = {
__typename?: "TagGQL";
group?: Maybe<Scalars["String"]["output"]>;
export type TagClassGql = {
__typename?: "TagClassGQL";
id: Scalars["Int"]["output"];
name: Scalars["String"]["output"];
};
export type TagGql = {
__typename?: "TagGQL";
id: Scalars["Int"]["output"];
name: Scalars["String"]["output"];
tagClasses?: Maybe<Array<TagClassGql>>;
};
export type TargetMetricsGql = {
__typename?: "TargetMetricsGQL";
averageDifficulty?: Maybe<Scalars["Float"]["output"]>;
@ -3383,6 +3389,28 @@ export type GetMedalsQuery = {
};
};
export type GetRunsForHighlightsQueryVariables = Exact<{
filterInput: RunFilterInput;
runIds?: InputMaybe<Array<Scalars["Int"]["input"]> | Scalars["Int"]["input"]>;
runsOrdering?: InputMaybe<GetRunsOrdering>;
}>;
export type GetRunsForHighlightsQuery = {
__typename?: "Query";
getRuns: {
__typename?: "GetRunsResult";
count?: number | null;
runIds: Array<number>;
runs: Array<{
__typename?: "RunGQL";
id: number;
runLength: number;
userId: number;
videoId: number;
}>;
};
};
export type GetSerializedShotPathsQueryVariables = Exact<{
filterInput: FilterInput;
}>;
@ -3930,7 +3958,16 @@ export type GetUserTagsQueryVariables = Exact<{ [key: string]: never }>;
export type GetUserTagsQuery = {
__typename?: "Query";
getUserTags: Array<{ __typename?: "TagGQL"; id: number; name: string }>;
getUserTags: Array<{
__typename?: "TagGQL";
id: number;
name: string;
tagClasses?: Array<{
__typename?: "TagClassGQL";
id: number;
name: string;
}> | null;
}>;
};
export type FollowUserMutationVariables = Exact<{
@ -5715,6 +5752,96 @@ export type GetMedalsQueryResult = Apollo.QueryResult<
GetMedalsQuery,
GetMedalsQueryVariables
>;
export const GetRunsForHighlightsDocument = gql`
query GetRunsForHighlights(
$filterInput: RunFilterInput!
$runIds: [Int!] = null
$runsOrdering: GetRunsOrdering
) {
getRuns(
filterInput: $filterInput
runIds: $runIds
runsOrdering: $runsOrdering
) {
count
runs {
id
runLength
userId
videoId
}
runIds
}
}
`;
/**
* __useGetRunsForHighlightsQuery__
*
* To run a query within a React component, call `useGetRunsForHighlightsQuery` and pass it any options that fit your needs.
* When your component renders, `useGetRunsForHighlightsQuery` 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 } = useGetRunsForHighlightsQuery({
* variables: {
* filterInput: // value for 'filterInput'
* runIds: // value for 'runIds'
* runsOrdering: // value for 'runsOrdering'
* },
* });
*/
export function useGetRunsForHighlightsQuery(
baseOptions: Apollo.QueryHookOptions<
GetRunsForHighlightsQuery,
GetRunsForHighlightsQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useQuery<
GetRunsForHighlightsQuery,
GetRunsForHighlightsQueryVariables
>(GetRunsForHighlightsDocument, options);
}
export function useGetRunsForHighlightsLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<
GetRunsForHighlightsQuery,
GetRunsForHighlightsQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<
GetRunsForHighlightsQuery,
GetRunsForHighlightsQueryVariables
>(GetRunsForHighlightsDocument, options);
}
export function useGetRunsForHighlightsSuspenseQuery(
baseOptions?: Apollo.SuspenseQueryHookOptions<
GetRunsForHighlightsQuery,
GetRunsForHighlightsQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useSuspenseQuery<
GetRunsForHighlightsQuery,
GetRunsForHighlightsQueryVariables
>(GetRunsForHighlightsDocument, options);
}
export type GetRunsForHighlightsQueryHookResult = ReturnType<
typeof useGetRunsForHighlightsQuery
>;
export type GetRunsForHighlightsLazyQueryHookResult = ReturnType<
typeof useGetRunsForHighlightsLazyQuery
>;
export type GetRunsForHighlightsSuspenseQueryHookResult = ReturnType<
typeof useGetRunsForHighlightsSuspenseQuery
>;
export type GetRunsForHighlightsQueryResult = Apollo.QueryResult<
GetRunsForHighlightsQuery,
GetRunsForHighlightsQueryVariables
>;
export const GetSerializedShotPathsDocument = gql`
query GetSerializedShotPaths($filterInput: FilterInput!) {
getShots(filterInput: $filterInput) {
@ -6935,6 +7062,10 @@ export const GetUserTagsDocument = gql`
getUserTags {
id
name
tagClasses {
id
name
}
}
}
`;

20
src/operations/runs.gql Normal file
View File

@ -0,0 +1,20 @@
query GetRunsForHighlights(
$filterInput: RunFilterInput!
$runIds: [Int!] = null
$runsOrdering: GetRunsOrdering
) {
getRuns(
filterInput: $filterInput
runIds: $runIds
runsOrdering: $runsOrdering
) {
count
runs {
id
runLength
userId
videoId
}
runIds
}
}

View File

@ -79,6 +79,10 @@ query GetUserTags {
getUserTags {
id
name
tagClasses {
id
name
}
}
}

View File

@ -714,9 +714,14 @@ type PageInfoGQL {
}
type TagGQL {
name: String!
id: Int!
group: String
name: String!
tagClasses: [TagClassGQL!]
}
type TagClassGQL {
id: Int!
name: String!
}
"""