diff --git a/docs/src/pages/reference/useIsMutating.md b/docs/src/pages/reference/useIsMutating.md index 93e323345c..d9a6ad4cc5 100644 --- a/docs/src/pages/reference/useIsMutating.md +++ b/docs/src/pages/reference/useIsMutating.md @@ -15,6 +15,7 @@ const isMutatingPosts = useIsMutating(['posts']) **Options** +- `mutationKey?: string | unknown[]` - `filters?: MutationFilters`: [Mutation Filters](../guides/filters#mutation-filters) **Returns** diff --git a/src/reactjs/useIsMutating.ts b/src/reactjs/useIsMutating.ts index 3353dfc852..b3baaec00f 100644 --- a/src/reactjs/useIsMutating.ts +++ b/src/reactjs/useIsMutating.ts @@ -1,18 +1,18 @@ import React from 'react' import { notifyManager } from '../core/notifyManager' -import { QueryKey } from '../core/types' +import { MutationKey } from '../core/types' import { MutationFilters, parseMutationFilterArgs } from '../core/utils' import { useQueryClient } from './QueryClientProvider' export function useIsMutating(filters?: MutationFilters): number export function useIsMutating( - queryKey?: QueryKey, - filters?: MutationFilters + mutationKey?: MutationKey, + filters?: Omit ): number export function useIsMutating( - arg1?: QueryKey | MutationFilters, - arg2?: MutationFilters + arg1?: MutationKey | MutationFilters, + arg2?: Omit ): number { const mountedRef = React.useRef(false) const filters = parseMutationFilterArgs(arg1, arg2)