/** * Custom mutation hook for forgotPassword * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ import { useMutation } from '@tanstack/react-query'; import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; import { customMutationKeys } from '../mutation-keys'; import type { ForgotPasswordVariables } from '../../orm/mutation'; import type { ForgotPasswordPayloadSelect, ForgotPasswordPayload } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; export type { ForgotPasswordVariables } from '../../orm/mutation'; export type { ForgotPasswordPayloadSelect } from '../../orm/input-types'; export function useForgotPasswordMutation( params: { selection: { fields: S & ForgotPasswordPayloadSelect; } & HookStrictSelect, ForgotPasswordPayloadSelect>; } & Omit< UseMutationOptions< { forgotPassword: InferSelectResult | null; }, Error, ForgotPasswordVariables >, 'mutationFn' > ): UseMutationResult< { forgotPassword: InferSelectResult | null; }, Error, ForgotPasswordVariables > { const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; return useMutation({ mutationKey: customMutationKeys.forgotPassword(), mutationFn: (variables: ForgotPasswordVariables) => getClient() .mutation.forgotPassword(variables, { select: args.select, } as { select: S; } & StrictSelect) .unwrap(), ...mutationOptions, }); }