Compare commits

...

2 Commits

Author SHA1 Message Date
63deef3508 remove dasystreak
All checks were successful
Tests / Tests (pull_request) Successful in 9s
2024-11-15 12:51:46 -08:00
84a7c439aa Medals
All checks were successful
Tests / Tests (pull_request) Successful in 8s
2024-11-15 20:27:37 +01:00
2 changed files with 245 additions and 0 deletions

View File

@ -2942,6 +2942,41 @@ export type GetVideoMakePercentageIntervalsQuery = {
}>;
};
export type GetMedalsQueryVariables = Exact<{
scope: MedalScope;
userId?: InputMaybe<Scalars["Int"]["input"]>;
}>;
export type GetMedalsQuery = {
__typename?: "Query";
getMedals: {
__typename?: "RequestedMedalsGQL";
distanceOver66?: { __typename?: "MedalGQL"; count: number } | null;
distanceOver78?: { __typename?: "MedalGQL"; count: number } | null;
distanceOver90?: { __typename?: "MedalGQL"; count: number } | null;
runLength3?: { __typename?: "MedalGQL"; count: number } | null;
runLength5?: { __typename?: "MedalGQL"; count: number } | null;
runLength8?: { __typename?: "MedalGQL"; count: number } | null;
runLength10?: { __typename?: "MedalGQL"; count: number } | null;
runLength15?: { __typename?: "MedalGQL"; count: number } | null;
runLength20?: { __typename?: "MedalGQL"; count: number } | null;
runLength25?: { __typename?: "MedalGQL"; count: number } | null;
runLength30?: { __typename?: "MedalGQL"; count: number } | null;
runLength40?: { __typename?: "MedalGQL"; count: number } | null;
runLength50?: { __typename?: "MedalGQL"; count: number } | null;
totalMakes25?: { __typename?: "MedalGQL"; count: number } | null;
totalMakes50?: { __typename?: "MedalGQL"; count: number } | null;
totalMakes75?: { __typename?: "MedalGQL"; count: number } | null;
totalMakes100?: { __typename?: "MedalGQL"; count: number } | null;
totalMakes200?: { __typename?: "MedalGQL"; count: number } | null;
totalMakes300?: { __typename?: "MedalGQL"; count: number } | null;
totalMakes400?: { __typename?: "MedalGQL"; count: number } | null;
totalMakes500?: { __typename?: "MedalGQL"; count: number } | null;
totalMakes750?: { __typename?: "MedalGQL"; count: number } | null;
totalMakes1000?: { __typename?: "MedalGQL"; count: number } | null;
};
};
export type GetSerializedShotPathsQueryVariables = Exact<{
filterInput: FilterInput;
}>;
@ -4766,6 +4801,143 @@ export type GetVideoMakePercentageIntervalsQueryResult = Apollo.QueryResult<
GetVideoMakePercentageIntervalsQuery,
GetVideoMakePercentageIntervalsQueryVariables
>;
export const GetMedalsDocument = gql`
query getMedals($scope: MedalScope!, $userId: Int) {
getMedals(scope: $scope, userId: $userId) {
distanceOver66 {
count
}
distanceOver78 {
count
}
distanceOver90 {
count
}
runLength3 {
count
}
runLength5 {
count
}
runLength8 {
count
}
runLength10 {
count
}
runLength15 {
count
}
runLength20 {
count
}
runLength25 {
count
}
runLength30 {
count
}
runLength40 {
count
}
runLength50 {
count
}
totalMakes25 {
count
}
totalMakes50 {
count
}
totalMakes75 {
count
}
totalMakes100 {
count
}
totalMakes200 {
count
}
totalMakes300 {
count
}
totalMakes400 {
count
}
totalMakes500 {
count
}
totalMakes750 {
count
}
totalMakes1000 {
count
}
}
}
`;
/**
* __useGetMedalsQuery__
*
* To run a query within a React component, call `useGetMedalsQuery` and pass it any options that fit your needs.
* When your component renders, `useGetMedalsQuery` 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 } = useGetMedalsQuery({
* variables: {
* scope: // value for 'scope'
* userId: // value for 'userId'
* },
* });
*/
export function useGetMedalsQuery(
baseOptions: Apollo.QueryHookOptions<GetMedalsQuery, GetMedalsQueryVariables>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useQuery<GetMedalsQuery, GetMedalsQueryVariables>(
GetMedalsDocument,
options,
);
}
export function useGetMedalsLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<
GetMedalsQuery,
GetMedalsQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<GetMedalsQuery, GetMedalsQueryVariables>(
GetMedalsDocument,
options,
);
}
export function useGetMedalsSuspenseQuery(
baseOptions?: Apollo.SuspenseQueryHookOptions<
GetMedalsQuery,
GetMedalsQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useSuspenseQuery<GetMedalsQuery, GetMedalsQueryVariables>(
GetMedalsDocument,
options,
);
}
export type GetMedalsQueryHookResult = ReturnType<typeof useGetMedalsQuery>;
export type GetMedalsLazyQueryHookResult = ReturnType<
typeof useGetMedalsLazyQuery
>;
export type GetMedalsSuspenseQueryHookResult = ReturnType<
typeof useGetMedalsSuspenseQuery
>;
export type GetMedalsQueryResult = Apollo.QueryResult<
GetMedalsQuery,
GetMedalsQueryVariables
>;
export const GetSerializedShotPathsDocument = gql`
query GetSerializedShotPaths($filterInput: FilterInput!) {
getShots(filterInput: $filterInput) {

73
src/operations/medals.gql Normal file
View File

@ -0,0 +1,73 @@
query getMedals($scope: MedalScope!, $userId: Int) {
getMedals(scope: $scope, userId: $userId) {
distanceOver66 {
count
}
distanceOver78 {
count
}
distanceOver90 {
count
}
runLength3 {
count
}
runLength5 {
count
}
runLength8 {
count
}
runLength10 {
count
}
runLength15 {
count
}
runLength20 {
count
}
runLength25 {
count
}
runLength30 {
count
}
runLength40 {
count
}
runLength50 {
count
}
totalMakes25 {
count
}
totalMakes50 {
count
}
totalMakes75 {
count
}
totalMakes100 {
count
}
totalMakes200 {
count
}
totalMakes300 {
count
}
totalMakes400 {
count
}
totalMakes500 {
count
}
totalMakes750 {
count
}
totalMakes1000 {
count
}
}
}