function injectMutation<TData, TError, TVariables, TContext>(
optionsFn,
injector?,
): CreateMutationResult<TData, TError, TVariables, TContext>
function injectMutation<TData, TError, TVariables, TContext>(
optionsFn,
injector?,
): CreateMutationResult<TData, TError, TVariables, TContext>
Injects a mutation: an imperative function that can be invoked which typically performs server side effects.
Unlike queries, mutations are not run automatically.
• TData = unknown
• TError = Error
• TVariables = void
• TContext = unknown
• optionsFn
A function that returns mutation options.
• injector?: Injector
The Angular injector to use.
CreateMutationResult<TData, TError, TVariables, TContext>
The mutation.