(items: Array<any>)
| 1835 | * the current syncedData state. |
| 1836 | */ |
| 1837 | const updateCacheData = (items: Array<any>): void => { |
| 1838 | const allCached = queryClient.getQueryCache().findAll({ queryKey: baseKey }) |
| 1839 | |
| 1840 | if (allCached.length > 0) { |
| 1841 | for (const query of allCached) { |
| 1842 | updateCacheDataForKey(query.queryKey, items) |
| 1843 | } |
| 1844 | } else { |
| 1845 | // Fallback: no queries in cache yet, seed the base query key. |
| 1846 | // This handles the case where updateCacheData is called before any queries are created. |
| 1847 | updateCacheDataForKey(baseKey, items) |
| 1848 | } |
| 1849 | } |
| 1850 | |
| 1851 | // Create write context for manual write operations |
| 1852 | let writeContext: { |
nothing calls this directly
no test coverage detected