Vue OpenAPI Query Documentation
    Preparing search index...

    Type Alias MutationOptions<TResponse, TPathParams, TRequest, TQueryParams, TError>

    MutationOptions: Omit<
        BaseMutationOptions<
            TResponse,
            TPathParams,
            TRequest,
            TQueryParams,
            TError,
        >,
        "mutationFn"
        | "mutationKey",
    > & CacheInvalidationOptions & {
        axiosOptions?: AxiosRequestConfigExtended;
        queryParams?: ReactiveOr<TQueryParams>;
        serialize?: boolean | string;
        skipGlobalError?: boolean | ((error: AxiosError<TError>) => boolean);
    }

    Options for useMutation composable.

    Type Parameters

    • TResponse

      Response data type

    • TPathParams extends Record<string, unknown>

      Path parameters type

    • TRequest

      Request body type

    • TQueryParams extends Record<string, unknown> = Record<string, never>

      Query parameters type

    • TError = unknown

    Type Declaration

    • OptionalaxiosOptions?: AxiosRequestConfigExtended
    • OptionalqueryParams?: ReactiveOr<TQueryParams>
    • Optionalserialize?: boolean | string

      Serialise this mutation with others sharing the same scope: queued mutations run one at a time in submission order (TanStack scope). true derives the scope id from the operation's resolved path; a string is used as the scope id verbatim.

      When path parameters are deferred to mutate-time, true falls back to the path template (e.g. serialize:PATCH:/pets/{petId}), serialising all mutations of that operation. For per-resource granularity with deferred params, supply path parameters at hook-time or use a string scope.

      An explicit scope option from the caller always takes precedence over serialize. A warning is emitted when both are set.

    • OptionalskipGlobalError?: boolean | ((error: AxiosError<TError>) => boolean)

      Suppress the client-level onError policy for this call. true → always suppress; function → suppress when it returns true (e.g. only on 409). The promise rejects either way; this controls the global side-effect only.

      Note: the predicate is only evaluated for axios errors. A non-axios throw (e.g. synthesised by a request interceptor) cannot be selectively suppressed; use skipGlobalError: true to always suppress.

      The predicate parameter is narrowed to AxiosError<TError> when TError is supplied. With the default TError = unknown it is AxiosError<unknown>.