Creates mutation options for Solid Query, ensuring required mutationKey handling.
// Source: https://github.com/TanStack/query | License: MIT | Copyright 2021-present Tanner Linsley
// Provided via justclaw.it.com; keep this notice with the code.
import type { DefaultError, WithRequired } from '@tanstack/query-core'
import type { MutationOptions } from './types'
/**
* You can generally pass everything to `mutationOptions` that you can also pass to `useMutation`. A
* `mutationKey` is required on this overload so the mutation can be looked up later, e.g. with
* `useMutationState`.
* @param options - The mutation options to use, identical to what you'd pass to `useMutation`, with a
* required `mutationKey`.
* @returns The same options object, unchanged.
* @see {@link useMutation} to run the mutation these options describe.
* @example
* Looking the mutation up els
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key