( invalidatePrefix: undefined | string | string[], queryClient: QueryClient )
| 188 | } |
| 189 | |
| 190 | function getApiMutationOptions( |
| 191 | invalidatePrefix: undefined | string | string[], |
| 192 | queryClient: QueryClient |
| 193 | ) { |
| 194 | return (options: UseQueryOptions<any, ApiError> | undefined) => ({ |
| 195 | ...options, |
| 196 | onSuccess: (...params) => { |
| 197 | // @ts-ignore |
| 198 | options?.onSuccess?.(...params); |
| 199 | if (invalidatePrefix !== undefined) { |
| 200 | invalidateUrlPrefix(queryClient, invalidatePrefix); |
| 201 | } |
| 202 | }, |
| 203 | }); |
| 204 | } |
| 205 | |
| 206 | const getMutationCallback = < |
| 207 | MutationFn extends (variables: any, options: any) => any |
no test coverage detected