()
| 2229 | } |
| 2230 | |
| 2231 | const setupQueryCacheSubscription = () => { |
| 2232 | const { queryCacheSubscriptions } = useDevtoolsSubscriptions() |
| 2233 | const queryCache = createMemo(() => { |
| 2234 | const client = useQueryDevtoolsContext().client |
| 2235 | return client.getQueryCache() |
| 2236 | }) |
| 2237 | |
| 2238 | createEffect(() => { |
| 2239 | const cache = queryCache() |
| 2240 | const schedule = createCoalescedSchedule() |
| 2241 | const unsubscribe = cache.subscribe((event) => { |
| 2242 | queryCacheSubscriptions.notify(() => cache, event, schedule) |
| 2243 | }) |
| 2244 | onCleanup(unsubscribe) |
| 2245 | }) |
| 2246 | } |
| 2247 | |
| 2248 | const createSubscribeToQueryCacheBatcher = <T,>( |
| 2249 | callback: ( |
no test coverage detected