({
queryClient,
persister,
buster = '',
dehydrateOptions,
}: PersistedQueryClientSaveOptions)
| 112 | * - data is persisted using persister.persistClient |
| 113 | */ |
| 114 | export async function persistQueryClientSave({ |
| 115 | queryClient, |
| 116 | persister, |
| 117 | buster = '', |
| 118 | dehydrateOptions, |
| 119 | }: PersistedQueryClientSaveOptions) { |
| 120 | const persistClient: PersistedClient = { |
| 121 | buster, |
| 122 | timestamp: Date.now(), |
| 123 | clientState: dehydrate(queryClient, dehydrateOptions), |
| 124 | } |
| 125 | |
| 126 | await persister.persistClient(persistClient) |
| 127 | } |
| 128 | |
| 129 | /** |
| 130 | * Subscribe to QueryCache and MutationCache updates (for persisting) |
no test coverage detected
searching dependent graphs…