import { gql } from '@apollo/client'; import * as Apollo from '@apollo/client'; export type Maybe = T | null; export type Exact = { [K in keyof T]: T[K] }; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { ID: string; String: string; Boolean: boolean; Int: number; Float: number; }; export type User = { __typename?: 'User'; id: Scalars['Int']; discordId: Scalars['String']; fullUsername: Scalars['String']; avatarUrl?: Maybe; profilePath: Scalars['String']; profile?: Maybe; }; export type Profile = { __typename?: 'Profile'; twitterName?: Maybe; customUrlPath?: Maybe; twitchName?: Maybe; youtubeId?: Maybe; country?: Maybe; bio?: Maybe; sensStick?: Maybe; sensMotion?: Maybe; weaponPool: Array; }; export type Query = { __typename?: 'Query'; getUserByIdentifier?: Maybe; getXRankPlacements: Array; getPlayersXRankPlacements: Array; }; export type QueryGetUserByIdentifierArgs = { identifier: Scalars['String']; }; export type QueryGetXRankPlacementsArgs = { year: Scalars['Int']; month: Scalars['Int']; mode: RankedMode; }; export type QueryGetPlayersXRankPlacementsArgs = { switchAccountId: Scalars['String']; }; export type UpdateUserProfileInput = { twitterName?: Maybe; customUrlPath?: Maybe; twitchName?: Maybe; youtubeId?: Maybe; country?: Maybe; bio?: Maybe; sensStick?: Maybe; sensMotion?: Maybe; weaponPool: Array; }; export type Mutation = { __typename?: 'Mutation'; updateUserProfile: Scalars['Boolean']; }; export type MutationUpdateUserProfileArgs = { profile: UpdateUserProfileInput; }; export type XRankPlacement = { __typename?: 'XRankPlacement'; id: Scalars['Int']; switchAccountId: Scalars['String']; playerName: Scalars['String']; ranking: Scalars['Int']; xPower: Scalars['Float']; weapon: Scalars['String']; mode: RankedMode; month: Scalars['Int']; year: Scalars['Int']; player: Player; }; export type Player = { __typename?: 'Player'; switchAccountId: Scalars['String']; name: Scalars['String']; user?: Maybe; placements: Array; }; export type PlayerPlacementsArgs = { first?: Maybe; last?: Maybe; before?: Maybe; after?: Maybe; }; export enum RankedMode { Sz = 'SZ', Tc = 'TC', Rm = 'RM', Cb = 'CB' } export type XRankPlacementWhereUniqueInput = { id?: Maybe; switchAccountId_mode_month_year?: Maybe; }; export type SwitchAccountIdModeMonthYearCompoundUniqueInput = { switchAccountId: Scalars['String']; mode: RankedMode; month: Scalars['Int']; year: Scalars['Int']; }; export type GetPlayersXRankPlacementsQueryVariables = Exact<{ switchAccountId: Scalars['String']; }>; export type GetPlayersXRankPlacementsQuery = ( { __typename?: 'Query' } & { getPlayersXRankPlacements: Array<( { __typename?: 'XRankPlacement' } & Pick & { player: ( { __typename?: 'Player' } & { user?: Maybe<( { __typename?: 'User' } & Pick )> } ) } )> } ); export type UpdateUserProfileMutationVariables = Exact<{ profile: UpdateUserProfileInput; }>; export type UpdateUserProfileMutation = ( { __typename?: 'Mutation' } & Pick ); export type GetUserByIdentifierQueryVariables = Exact<{ identifier: Scalars['String']; }>; export type GetUserByIdentifierQuery = ( { __typename?: 'Query' } & { getUserByIdentifier?: Maybe<( { __typename?: 'User' } & Pick & { profile?: Maybe<( { __typename?: 'Profile' } & Pick )> } )> } ); export type GetXRankPlacementsQueryVariables = Exact<{ month: Scalars['Int']; year: Scalars['Int']; mode: RankedMode; }>; export type GetXRankPlacementsQuery = ( { __typename?: 'Query' } & { getXRankPlacements: Array<( { __typename?: 'XRankPlacement' } & Pick & { player: ( { __typename?: 'Player' } & { user?: Maybe<( { __typename?: 'User' } & Pick )> } ) } )> } ); export const GetPlayersXRankPlacementsDocument = gql` query getPlayersXRankPlacements($switchAccountId: String!) { getPlayersXRankPlacements(switchAccountId: $switchAccountId) { id playerName ranking xPower weapon mode month year player { user { avatarUrl fullUsername profilePath } } } } `; /** * __useGetPlayersXRankPlacementsQuery__ * * To run a query within a React component, call `useGetPlayersXRankPlacementsQuery` and pass it any options that fit your needs. * When your component renders, `useGetPlayersXRankPlacementsQuery` 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 } = useGetPlayersXRankPlacementsQuery({ * variables: { * switchAccountId: // value for 'switchAccountId' * }, * }); */ export function useGetPlayersXRankPlacementsQuery(baseOptions?: Apollo.QueryHookOptions) { return Apollo.useQuery(GetPlayersXRankPlacementsDocument, baseOptions); } export function useGetPlayersXRankPlacementsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { return Apollo.useLazyQuery(GetPlayersXRankPlacementsDocument, baseOptions); } export type GetPlayersXRankPlacementsQueryHookResult = ReturnType; export type GetPlayersXRankPlacementsLazyQueryHookResult = ReturnType; export type GetPlayersXRankPlacementsQueryResult = Apollo.QueryResult; export const UpdateUserProfileDocument = gql` mutation UpdateUserProfile($profile: UpdateUserProfileInput!) { updateUserProfile(profile: $profile) } `; export type UpdateUserProfileMutationFn = Apollo.MutationFunction; /** * __useUpdateUserProfileMutation__ * * To run a mutation, you first call `useUpdateUserProfileMutation` within a React component and pass it any options that fit your needs. * When your component renders, `useUpdateUserProfileMutation` returns a tuple that includes: * - A mutate function that you can call at any time to execute the mutation * - An object with fields that represent the current status of the mutation's execution * * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; * * @example * const [updateUserProfileMutation, { data, loading, error }] = useUpdateUserProfileMutation({ * variables: { * profile: // value for 'profile' * }, * }); */ export function useUpdateUserProfileMutation(baseOptions?: Apollo.MutationHookOptions) { return Apollo.useMutation(UpdateUserProfileDocument, baseOptions); } export type UpdateUserProfileMutationHookResult = ReturnType; export type UpdateUserProfileMutationResult = Apollo.MutationResult; export type UpdateUserProfileMutationOptions = Apollo.BaseMutationOptions; export const GetUserByIdentifierDocument = gql` query GetUserByIdentifier($identifier: String!) { getUserByIdentifier(identifier: $identifier) { id fullUsername avatarUrl profile { customUrlPath twitterName twitchName youtubeId country bio sensMotion sensStick weaponPool } } } `; /** * __useGetUserByIdentifierQuery__ * * To run a query within a React component, call `useGetUserByIdentifierQuery` and pass it any options that fit your needs. * When your component renders, `useGetUserByIdentifierQuery` 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 } = useGetUserByIdentifierQuery({ * variables: { * identifier: // value for 'identifier' * }, * }); */ export function useGetUserByIdentifierQuery(baseOptions?: Apollo.QueryHookOptions) { return Apollo.useQuery(GetUserByIdentifierDocument, baseOptions); } export function useGetUserByIdentifierLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { return Apollo.useLazyQuery(GetUserByIdentifierDocument, baseOptions); } export type GetUserByIdentifierQueryHookResult = ReturnType; export type GetUserByIdentifierLazyQueryHookResult = ReturnType; export type GetUserByIdentifierQueryResult = Apollo.QueryResult; export const GetXRankPlacementsDocument = gql` query getXRankPlacements($month: Int!, $year: Int!, $mode: RankedMode!) { getXRankPlacements(month: $month, year: $year, mode: $mode) { switchAccountId playerName ranking xPower weapon mode player { user { avatarUrl fullUsername profilePath } } } } `; /** * __useGetXRankPlacementsQuery__ * * To run a query within a React component, call `useGetXRankPlacementsQuery` and pass it any options that fit your needs. * When your component renders, `useGetXRankPlacementsQuery` 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 } = useGetXRankPlacementsQuery({ * variables: { * month: // value for 'month' * year: // value for 'year' * mode: // value for 'mode' * }, * }); */ export function useGetXRankPlacementsQuery(baseOptions?: Apollo.QueryHookOptions) { return Apollo.useQuery(GetXRankPlacementsDocument, baseOptions); } export function useGetXRankPlacementsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { return Apollo.useLazyQuery(GetXRankPlacementsDocument, baseOptions); } export type GetXRankPlacementsQueryHookResult = ReturnType; export type GetXRankPlacementsLazyQueryHookResult = ReturnType; export type GetXRankPlacementsQueryResult = Apollo.QueryResult;