Skip to content

Commit

Permalink
fix(types): add mutationFn to UseMutationOptions (#2182)
Browse files Browse the repository at this point in the history
  • Loading branch information
TkDodo committed Apr 24, 2021
1 parent 07ce2a5 commit 92435c7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/react/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
QueryObserverOptions,
QueryObserverResult,
QueryKey,
MutationFunction,
} from '../core/types'

export interface UseBaseQueryOptions<
Expand Down Expand Up @@ -75,8 +76,11 @@ export interface UseMutationOptions<
TVariables = void,
TContext = unknown
> {
mutationFn?: MutationFunction<TData, TVariables>
mutationKey?: MutationKey
onMutate?: (variables: TVariables) => Promise<TContext> | Promise<undefined> | TContext | undefined
onMutate?: (
variables: TVariables
) => Promise<TContext> | Promise<undefined> | TContext | undefined
onSuccess?: (
data: TData,
variables: TVariables,
Expand Down

1 comment on commit 92435c7

@vercel
Copy link

@vercel vercel bot commented on 92435c7 Apr 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.