()
| 2207 | } |
| 2208 | |
| 2209 | const setupQueryCacheSubscription = () => { |
| 2210 | const { queryCacheSubscriptions } = useDevtoolsSubscriptions() |
| 2211 | const queryCache = createMemo(() => { |
| 2212 | const client = useQueryDevtoolsContext().client |
| 2213 | return client.getQueryCache() |
| 2214 | }) |
| 2215 | |
| 2216 | createEffect(() => { |
| 2217 | const cache = queryCache() |
| 2218 | const unsubscribe = cache.subscribe((event) => { |
| 2219 | batch(() => { |
| 2220 | queryCacheSubscriptions.notify(() => cache, event) |
| 2221 | }) |
| 2222 | }) |
| 2223 | onCleanup(unsubscribe) |
| 2224 | }) |
| 2225 | } |
| 2226 | |
| 2227 | const createSubscribeToQueryCacheBatcher = <T,>( |
| 2228 | callback: ( |
no test coverage detected