We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
CacheLifecycleMutationExtraOptions
1 parent f8c342f commit 5b5a914Copy full SHA for 5b5a914
packages/toolkit/src/query/core/buildMiddleware/cacheLifecycle.ts
@@ -142,6 +142,23 @@ export type CacheLifecycleQueryExtraOptions<
142
): Promise<void> | void
143
}
144
145
+export type CacheLifecycleMutationExtraOptions<
146
+ ResultType,
147
+ QueryArg,
148
+ BaseQuery extends BaseQueryFn,
149
+ ReducerPath extends string = string,
150
+> = {
151
+ onCacheEntryAdded?(
152
+ arg: QueryArg,
153
+ api: MutationCacheLifecycleApi<
154
155
+ BaseQuery,
156
157
+ ReducerPath
158
+ >,
159
+ ): Promise<void> | void
160
+}
161
+
162
const neverResolvedError = new Error(
163
'Promise never resolved before cacheEntryRemoved.',
164
) as Error & {
0 commit comments