/** * Custom mutation hook for sendStepUpCode * @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 { SendStepUpCodeVariables } from '../../orm/mutation'; import type { SendStepUpCodePayloadSelect, SendStepUpCodePayload } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; export type { SendStepUpCodeVariables } from '../../orm/mutation'; export type { SendStepUpCodePayloadSelect } from '../../orm/input-types'; export function useSendStepUpCodeMutation( params: { selection: { fields: S & SendStepUpCodePayloadSelect; } & HookStrictSelect, SendStepUpCodePayloadSelect>; } & Omit< UseMutationOptions< { sendStepUpCode: InferSelectResult | null; }, Error, SendStepUpCodeVariables >, 'mutationFn' > ): UseMutationResult< { sendStepUpCode: InferSelectResult | null; }, Error, SendStepUpCodeVariables > { const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; return useMutation({ mutationKey: customMutationKeys.sendStepUpCode(), mutationFn: (variables: SendStepUpCodeVariables) => getClient() .mutation.sendStepUpCode(variables, { select: args.select, } as { select: S; } & StrictSelect) .unwrap(), ...mutationOptions, }); }