This commit is contained in:
parent
3f2e5d331f
commit
145c2f9558
103
src/index.tsx
103
src/index.tsx
@ -3074,6 +3074,28 @@ export type GetVideoFeedQuery = {
|
||||
};
|
||||
};
|
||||
|
||||
export type GetMakesLeaderboardQueryVariables = Exact<{
|
||||
interval?: InputMaybe<TimeInterval>;
|
||||
when?: InputMaybe<Scalars["DateTime"]["input"]>;
|
||||
}>;
|
||||
|
||||
export type GetMakesLeaderboardQuery = {
|
||||
__typename?: "Query";
|
||||
getMakesLeaderboard: {
|
||||
__typename?: "CountLeaderboardGQL";
|
||||
entries: Array<{
|
||||
__typename?: "IntUserLeaderboardEntry";
|
||||
value: number;
|
||||
user: {
|
||||
__typename?: "UserGQL";
|
||||
id: number;
|
||||
username: string;
|
||||
profileImageUri?: string | null;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
};
|
||||
|
||||
export type GetVideoMakePercentageIntervalsQueryVariables = Exact<{
|
||||
videoId: Scalars["ID"]["input"];
|
||||
intervalDuration: Scalars["Int"]["input"];
|
||||
@ -5111,6 +5133,87 @@ export type GetVideoFeedQueryResult = Apollo.QueryResult<
|
||||
GetVideoFeedQuery,
|
||||
GetVideoFeedQueryVariables
|
||||
>;
|
||||
export const GetMakesLeaderboardDocument = gql`
|
||||
query GetMakesLeaderboard($interval: TimeInterval, $when: DateTime) {
|
||||
getMakesLeaderboard(interval: $interval, when: $when) {
|
||||
entries {
|
||||
user {
|
||||
id
|
||||
username
|
||||
profileImageUri
|
||||
}
|
||||
value
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
/**
|
||||
* __useGetMakesLeaderboardQuery__
|
||||
*
|
||||
* To run a query within a React component, call `useGetMakesLeaderboardQuery` and pass it any options that fit your needs.
|
||||
* When your component renders, `useGetMakesLeaderboardQuery` 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 } = useGetMakesLeaderboardQuery({
|
||||
* variables: {
|
||||
* interval: // value for 'interval'
|
||||
* when: // value for 'when'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useGetMakesLeaderboardQuery(
|
||||
baseOptions?: Apollo.QueryHookOptions<
|
||||
GetMakesLeaderboardQuery,
|
||||
GetMakesLeaderboardQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useQuery<
|
||||
GetMakesLeaderboardQuery,
|
||||
GetMakesLeaderboardQueryVariables
|
||||
>(GetMakesLeaderboardDocument, options);
|
||||
}
|
||||
export function useGetMakesLeaderboardLazyQuery(
|
||||
baseOptions?: Apollo.LazyQueryHookOptions<
|
||||
GetMakesLeaderboardQuery,
|
||||
GetMakesLeaderboardQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useLazyQuery<
|
||||
GetMakesLeaderboardQuery,
|
||||
GetMakesLeaderboardQueryVariables
|
||||
>(GetMakesLeaderboardDocument, options);
|
||||
}
|
||||
export function useGetMakesLeaderboardSuspenseQuery(
|
||||
baseOptions?: Apollo.SuspenseQueryHookOptions<
|
||||
GetMakesLeaderboardQuery,
|
||||
GetMakesLeaderboardQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useSuspenseQuery<
|
||||
GetMakesLeaderboardQuery,
|
||||
GetMakesLeaderboardQueryVariables
|
||||
>(GetMakesLeaderboardDocument, options);
|
||||
}
|
||||
export type GetMakesLeaderboardQueryHookResult = ReturnType<
|
||||
typeof useGetMakesLeaderboardQuery
|
||||
>;
|
||||
export type GetMakesLeaderboardLazyQueryHookResult = ReturnType<
|
||||
typeof useGetMakesLeaderboardLazyQuery
|
||||
>;
|
||||
export type GetMakesLeaderboardSuspenseQueryHookResult = ReturnType<
|
||||
typeof useGetMakesLeaderboardSuspenseQuery
|
||||
>;
|
||||
export type GetMakesLeaderboardQueryResult = Apollo.QueryResult<
|
||||
GetMakesLeaderboardQuery,
|
||||
GetMakesLeaderboardQueryVariables
|
||||
>;
|
||||
export const GetVideoMakePercentageIntervalsDocument = gql`
|
||||
query GetVideoMakePercentageIntervals(
|
||||
$videoId: ID!
|
||||
|
12
src/operations/leaderboards.gql
Normal file
12
src/operations/leaderboards.gql
Normal file
@ -0,0 +1,12 @@
|
||||
query GetMakesLeaderboard($interval: TimeInterval, $when: DateTime) {
|
||||
getMakesLeaderboard(interval: $interval, when: $when) {
|
||||
entries {
|
||||
user {
|
||||
id
|
||||
username
|
||||
profileImageUri
|
||||
}
|
||||
value
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user