()
| 2274 | } |
| 2275 | |
| 2276 | const setupMutationCacheSubscription = () => { |
| 2277 | const { mutationCacheSubscriptions } = useDevtoolsSubscriptions() |
| 2278 | const mutationCache = createMemo(() => { |
| 2279 | const client = useQueryDevtoolsContext().client |
| 2280 | return client.getMutationCache() |
| 2281 | }) |
| 2282 | |
| 2283 | createEffect(() => { |
| 2284 | const cache = mutationCache() |
| 2285 | const schedule = createCoalescedSchedule() |
| 2286 | const unsubscribe = cache.subscribe((event) => { |
| 2287 | mutationCacheSubscriptions.notify(() => cache, event, schedule) |
| 2288 | }) |
| 2289 | onCleanup(unsubscribe) |
| 2290 | }) |
| 2291 | } |
| 2292 | |
| 2293 | const createSubscribeToMutationCacheBatcher = <T,>( |
| 2294 | callback: ( |
no test coverage detected