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; }; export type QueryGetUserByIdentifierArgs = { identifier: Scalars['String']; }; export type UpdateUserProfileInput = { twitterName?: Maybe; customUrlPath?: Maybe; twitchName?: Maybe; youtubeId?: Maybe; country?: Maybe; bio?: Maybe; sensStick?: Maybe; sensMotion?: Maybe; weaponPool?: Maybe>; }; export type Mutation = { __typename?: 'Mutation'; updateUserProfile: Scalars['Boolean']; }; export type MutationUpdateUserProfileArgs = { profile: UpdateUserProfileInput; }; 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 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;