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