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