@tanstack/vue-query 5.0.0-beta.9 → 5.0.0-rc.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/legacy/devtools/devtools.cjs.map +1 -1
- package/build/legacy/devtools/devtools.js.map +1 -1
- package/build/legacy/index.d.cts +2 -2
- package/build/legacy/index.d.ts +2 -2
- package/build/legacy/mutationCache.cjs.map +1 -1
- package/build/legacy/mutationCache.d.cts +1 -1
- package/build/legacy/mutationCache.d.ts +1 -1
- package/build/legacy/mutationCache.js.map +1 -1
- package/build/legacy/queryCache.cjs.map +1 -1
- package/build/legacy/queryCache.d.cts +1 -1
- package/build/legacy/queryCache.d.ts +1 -1
- package/build/legacy/queryCache.js.map +1 -1
- package/build/legacy/queryClient.cjs +3 -4
- package/build/legacy/queryClient.cjs.map +1 -1
- package/build/legacy/queryClient.d.cts +4 -4
- package/build/legacy/queryClient.d.ts +4 -4
- package/build/legacy/queryClient.js +3 -4
- package/build/legacy/queryClient.js.map +1 -1
- package/build/legacy/types.cjs.map +1 -1
- package/build/legacy/types.d.cts +8 -2
- package/build/legacy/types.d.ts +8 -2
- package/build/legacy/useBaseQuery.cjs +62 -32
- package/build/legacy/useBaseQuery.cjs.map +1 -1
- package/build/legacy/useBaseQuery.d.cts +1 -1
- package/build/legacy/useBaseQuery.d.ts +1 -1
- package/build/legacy/useBaseQuery.js +64 -33
- package/build/legacy/useBaseQuery.js.map +1 -1
- package/build/legacy/useInfiniteQuery.cjs +1 -6
- package/build/legacy/useInfiniteQuery.cjs.map +1 -1
- package/build/legacy/useInfiniteQuery.d.cts +1 -1
- package/build/legacy/useInfiniteQuery.d.ts +1 -1
- package/build/legacy/useInfiniteQuery.js +1 -6
- package/build/legacy/useInfiniteQuery.js.map +1 -1
- package/build/legacy/useIsFetching.cjs +13 -13
- package/build/legacy/useIsFetching.cjs.map +1 -1
- package/build/legacy/useIsFetching.js +14 -14
- package/build/legacy/useIsFetching.js.map +1 -1
- package/build/legacy/useMutation.cjs +18 -7
- package/build/legacy/useMutation.cjs.map +1 -1
- package/build/legacy/useMutation.js +20 -8
- package/build/legacy/useMutation.js.map +1 -1
- package/build/legacy/useMutationState.cjs +10 -7
- package/build/legacy/useMutationState.cjs.map +1 -1
- package/build/legacy/useMutationState.js +18 -8
- package/build/legacy/useMutationState.js.map +1 -1
- package/build/legacy/useQueries.cjs +12 -2
- package/build/legacy/useQueries.cjs.map +1 -1
- package/build/legacy/useQueries.d.cts +7 -5
- package/build/legacy/useQueries.d.ts +7 -5
- package/build/legacy/useQueries.js +20 -3
- package/build/legacy/useQueries.js.map +1 -1
- package/build/legacy/{useQuery-846c66db.d.ts → useQuery-62b5e5ac.d.ts} +9 -7
- package/build/legacy/{useQuery-ebff9211.d.ts → useQuery-f89ce9b1.d.ts} +9 -7
- package/build/legacy/useQuery.cjs +1 -4
- package/build/legacy/useQuery.cjs.map +1 -1
- package/build/legacy/useQuery.d.cts +1 -1
- package/build/legacy/useQuery.d.ts +1 -1
- package/build/legacy/useQuery.js +1 -4
- package/build/legacy/useQuery.js.map +1 -1
- package/build/legacy/useQueryClient.cjs +4 -4
- package/build/legacy/useQueryClient.cjs.map +1 -1
- package/build/legacy/useQueryClient.js +5 -5
- package/build/legacy/useQueryClient.js.map +1 -1
- package/build/legacy/utils.cjs +8 -0
- package/build/legacy/utils.cjs.map +1 -1
- package/build/legacy/utils.d.cts +2 -1
- package/build/legacy/utils.d.ts +2 -1
- package/build/legacy/utils.js +7 -0
- package/build/legacy/utils.js.map +1 -1
- package/build/legacy/vueQueryPlugin.cjs +2 -0
- package/build/legacy/vueQueryPlugin.cjs.map +1 -1
- package/build/legacy/vueQueryPlugin.d.cts +3 -2
- package/build/legacy/vueQueryPlugin.d.ts +3 -2
- package/build/legacy/vueQueryPlugin.js +2 -0
- package/build/legacy/vueQueryPlugin.js.map +1 -1
- package/build/modern/devtools/devtools.cjs.map +1 -1
- package/build/modern/devtools/devtools.js.map +1 -1
- package/build/modern/index.d.cts +2 -2
- package/build/modern/index.d.ts +2 -2
- package/build/modern/mutationCache.cjs.map +1 -1
- package/build/modern/mutationCache.d.cts +1 -1
- package/build/modern/mutationCache.d.ts +1 -1
- package/build/modern/mutationCache.js.map +1 -1
- package/build/modern/queryCache.cjs.map +1 -1
- package/build/modern/queryCache.d.cts +1 -1
- package/build/modern/queryCache.d.ts +1 -1
- package/build/modern/queryCache.js.map +1 -1
- package/build/modern/queryClient.cjs +3 -4
- package/build/modern/queryClient.cjs.map +1 -1
- package/build/modern/queryClient.d.cts +4 -4
- package/build/modern/queryClient.d.ts +4 -4
- package/build/modern/queryClient.js +3 -4
- package/build/modern/queryClient.js.map +1 -1
- package/build/modern/types.cjs.map +1 -1
- package/build/modern/types.d.cts +8 -2
- package/build/modern/types.d.ts +8 -2
- package/build/modern/useBaseQuery.cjs +62 -32
- package/build/modern/useBaseQuery.cjs.map +1 -1
- package/build/modern/useBaseQuery.d.cts +1 -1
- package/build/modern/useBaseQuery.d.ts +1 -1
- package/build/modern/useBaseQuery.js +64 -33
- package/build/modern/useBaseQuery.js.map +1 -1
- package/build/modern/useInfiniteQuery.cjs +1 -6
- package/build/modern/useInfiniteQuery.cjs.map +1 -1
- package/build/modern/useInfiniteQuery.d.cts +1 -1
- package/build/modern/useInfiniteQuery.d.ts +1 -1
- package/build/modern/useInfiniteQuery.js +1 -6
- package/build/modern/useInfiniteQuery.js.map +1 -1
- package/build/modern/useIsFetching.cjs +13 -13
- package/build/modern/useIsFetching.cjs.map +1 -1
- package/build/modern/useIsFetching.js +14 -14
- package/build/modern/useIsFetching.js.map +1 -1
- package/build/modern/useMutation.cjs +18 -7
- package/build/modern/useMutation.cjs.map +1 -1
- package/build/modern/useMutation.js +20 -8
- package/build/modern/useMutation.js.map +1 -1
- package/build/modern/useMutationState.cjs +10 -7
- package/build/modern/useMutationState.cjs.map +1 -1
- package/build/modern/useMutationState.js +18 -8
- package/build/modern/useMutationState.js.map +1 -1
- package/build/modern/useQueries.cjs +12 -2
- package/build/modern/useQueries.cjs.map +1 -1
- package/build/modern/useQueries.d.cts +7 -5
- package/build/modern/useQueries.d.ts +7 -5
- package/build/modern/useQueries.js +20 -3
- package/build/modern/useQueries.js.map +1 -1
- package/build/modern/{useQuery-846c66db.d.ts → useQuery-62b5e5ac.d.ts} +9 -7
- package/build/modern/{useQuery-ebff9211.d.ts → useQuery-f89ce9b1.d.ts} +9 -7
- package/build/modern/useQuery.cjs +1 -4
- package/build/modern/useQuery.cjs.map +1 -1
- package/build/modern/useQuery.d.cts +1 -1
- package/build/modern/useQuery.d.ts +1 -1
- package/build/modern/useQuery.js +1 -4
- package/build/modern/useQuery.js.map +1 -1
- package/build/modern/useQueryClient.cjs +4 -3
- package/build/modern/useQueryClient.cjs.map +1 -1
- package/build/modern/useQueryClient.js +5 -4
- package/build/modern/useQueryClient.js.map +1 -1
- package/build/modern/utils.cjs +8 -0
- package/build/modern/utils.cjs.map +1 -1
- package/build/modern/utils.d.cts +2 -1
- package/build/modern/utils.d.ts +2 -1
- package/build/modern/utils.js +7 -0
- package/build/modern/utils.js.map +1 -1
- package/build/modern/vueQueryPlugin.cjs +1 -0
- package/build/modern/vueQueryPlugin.cjs.map +1 -1
- package/build/modern/vueQueryPlugin.d.cts +3 -2
- package/build/modern/vueQueryPlugin.d.ts +3 -2
- package/build/modern/vueQueryPlugin.js +1 -0
- package/build/modern/vueQueryPlugin.js.map +1 -1
- package/package.json +6 -6
- package/src/__mocks__/useBaseQuery.ts +1 -1
- package/src/__tests__/queryClient.test.ts +4 -4
- package/src/__tests__/useInfiniteQuery.test.ts +1 -1
- package/src/__tests__/useInfiniteQuery.types.test.tsx +5 -5
- package/src/__tests__/useMutation.test.ts +23 -3
- package/src/__tests__/useQueries.test.ts +23 -0
- package/src/__tests__/useQuery.test.ts +76 -1
- package/src/__tests__/useQueryClient.test.ts +4 -4
- package/src/__tests__/utils.test.ts +1 -1
- package/src/devtools/devtools.ts +2 -2
- package/src/mutationCache.ts +1 -1
- package/src/queryCache.ts +1 -1
- package/src/queryClient.ts +17 -10
- package/src/types.ts +25 -1
- package/src/useBaseQuery.ts +90 -37
- package/src/useInfiniteQuery.ts +19 -9
- package/src/useIsFetching.ts +16 -14
- package/src/useMutation.ts +25 -8
- package/src/useMutationState.ts +20 -9
- package/src/useQueries.ts +55 -28
- package/src/useQuery.ts +22 -9
- package/src/useQueryClient.ts +6 -5
- package/src/utils.ts +12 -0
- package/src/vueQueryPlugin.ts +3 -2
package/src/useQueries.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
import { QueriesObserver } from '@tanstack/query-core'
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
computed,
|
|
5
|
+
getCurrentScope,
|
|
6
|
+
onScopeDispose,
|
|
7
|
+
readonly,
|
|
8
|
+
ref,
|
|
9
|
+
watch,
|
|
10
|
+
} from 'vue-demi'
|
|
4
11
|
|
|
5
12
|
import { useQueryClient } from './useQueryClient'
|
|
6
13
|
import { cloneDeepUnref } from './utils'
|
|
@@ -93,61 +100,69 @@ type GetResults<T> =
|
|
|
93
100
|
* UseQueriesOptions reducer recursively unwraps function arguments to infer/enforce type param
|
|
94
101
|
*/
|
|
95
102
|
export type UseQueriesOptions<
|
|
96
|
-
T extends any
|
|
97
|
-
Result extends any
|
|
103
|
+
T extends Array<any>,
|
|
104
|
+
Result extends Array<any> = [],
|
|
98
105
|
Depth extends ReadonlyArray<number> = [],
|
|
99
106
|
> = Depth['length'] extends MAXIMUM_DEPTH
|
|
100
|
-
? UseQueryOptionsForUseQueries
|
|
107
|
+
? Array<UseQueryOptionsForUseQueries>
|
|
101
108
|
: T extends []
|
|
102
109
|
? []
|
|
103
110
|
: T extends [infer Head]
|
|
104
111
|
? [...Result, GetOptions<Head>]
|
|
105
112
|
: T extends [infer Head, ...infer Tail]
|
|
106
113
|
? UseQueriesOptions<[...Tail], [...Result, GetOptions<Head>], [...Depth, 1]>
|
|
107
|
-
: unknown
|
|
114
|
+
: Array<unknown> extends T
|
|
108
115
|
? T
|
|
109
116
|
: // If T is *some* array but we couldn't assign unknown[] to it, then it must hold some known/homogenous type!
|
|
110
117
|
// use this to infer the param types in the case of Array.map() argument
|
|
111
|
-
T extends
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
+
T extends Array<
|
|
119
|
+
UseQueryOptionsForUseQueries<
|
|
120
|
+
infer TQueryFnData,
|
|
121
|
+
infer TError,
|
|
122
|
+
infer TData,
|
|
123
|
+
infer TQueryKey
|
|
124
|
+
>
|
|
125
|
+
>
|
|
126
|
+
? Array<UseQueryOptionsForUseQueries<TQueryFnData, TError, TData, TQueryKey>>
|
|
118
127
|
: // Fallback
|
|
119
|
-
UseQueryOptionsForUseQueries
|
|
128
|
+
Array<UseQueryOptionsForUseQueries>
|
|
120
129
|
|
|
121
130
|
/**
|
|
122
131
|
* UseQueriesResults reducer recursively maps type param to results
|
|
123
132
|
*/
|
|
124
133
|
export type UseQueriesResults<
|
|
125
|
-
T extends any
|
|
126
|
-
Result extends any
|
|
134
|
+
T extends Array<any>,
|
|
135
|
+
Result extends Array<any> = [],
|
|
127
136
|
Depth extends ReadonlyArray<number> = [],
|
|
128
137
|
> = Depth['length'] extends MAXIMUM_DEPTH
|
|
129
|
-
? QueryObserverResult
|
|
138
|
+
? Array<QueryObserverResult>
|
|
130
139
|
: T extends []
|
|
131
140
|
? []
|
|
132
141
|
: T extends [infer Head]
|
|
133
142
|
? [...Result, GetResults<Head>]
|
|
134
143
|
: T extends [infer Head, ...infer Tail]
|
|
135
144
|
? UseQueriesResults<[...Tail], [...Result, GetResults<Head>], [...Depth, 1]>
|
|
136
|
-
: T extends
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
145
|
+
: T extends Array<
|
|
146
|
+
UseQueryOptionsForUseQueries<
|
|
147
|
+
infer TQueryFnData,
|
|
148
|
+
infer TError,
|
|
149
|
+
infer TData,
|
|
150
|
+
any
|
|
151
|
+
>
|
|
152
|
+
>
|
|
142
153
|
? // Dynamic-size (homogenous) UseQueryOptions array: map directly to array of results
|
|
143
|
-
|
|
154
|
+
Array<
|
|
155
|
+
QueryObserverResult<unknown extends TData ? TQueryFnData : TData, TError>
|
|
156
|
+
>
|
|
144
157
|
: // Fallback
|
|
145
|
-
QueryObserverResult
|
|
158
|
+
Array<QueryObserverResult>
|
|
146
159
|
|
|
147
|
-
type UseQueriesOptionsArg<T extends any
|
|
160
|
+
type UseQueriesOptionsArg<T extends Array<any>> = readonly [
|
|
161
|
+
...UseQueriesOptions<T>,
|
|
162
|
+
]
|
|
148
163
|
|
|
149
164
|
export function useQueries<
|
|
150
|
-
T extends any
|
|
165
|
+
T extends Array<any>,
|
|
151
166
|
TCombinedResult = UseQueriesResults<T>,
|
|
152
167
|
>(
|
|
153
168
|
{
|
|
@@ -159,10 +174,22 @@ export function useQueries<
|
|
|
159
174
|
},
|
|
160
175
|
queryClient?: QueryClient,
|
|
161
176
|
): Readonly<Ref<TCombinedResult>> {
|
|
177
|
+
if (process.env.NODE_ENV === 'development') {
|
|
178
|
+
if (!getCurrentScope()) {
|
|
179
|
+
console.warn(
|
|
180
|
+
'vue-query composables like "useQuery()" should only be used inside a "setup()" function or a running effect scope. They might otherwise lead to memory leaks.',
|
|
181
|
+
)
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
162
185
|
const client = queryClient || useQueryClient()
|
|
163
186
|
|
|
164
187
|
const defaultedQueries = computed(() =>
|
|
165
188
|
cloneDeepUnref(queries).map((queryOptions) => {
|
|
189
|
+
if (typeof queryOptions.enabled === 'function') {
|
|
190
|
+
queryOptions.enabled = queryOptions.enabled()
|
|
191
|
+
}
|
|
192
|
+
|
|
166
193
|
const defaulted = client.defaultQueryOptions(queryOptions)
|
|
167
194
|
defaulted._optimisticResults = client.isRestoring.value
|
|
168
195
|
? 'isRestoring'
|
|
@@ -208,7 +235,7 @@ export function useQueries<
|
|
|
208
235
|
)
|
|
209
236
|
|
|
210
237
|
watch(
|
|
211
|
-
|
|
238
|
+
defaultedQueries,
|
|
212
239
|
() => {
|
|
213
240
|
observer.setQueries(
|
|
214
241
|
defaultedQueries.value,
|
|
@@ -219,7 +246,7 @@ export function useQueries<
|
|
|
219
246
|
)
|
|
220
247
|
state.value = getCombinedResultPersisted()
|
|
221
248
|
},
|
|
222
|
-
{
|
|
249
|
+
{ flush: 'sync' },
|
|
223
250
|
)
|
|
224
251
|
|
|
225
252
|
onScopeDispose(() => {
|
package/src/useQuery.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { QueryObserver } from '@tanstack/query-core'
|
|
2
2
|
import { useBaseQuery } from './useBaseQuery'
|
|
3
|
-
import type { ToRefs
|
|
3
|
+
import type { ToRefs } from 'vue-demi'
|
|
4
4
|
import type {
|
|
5
5
|
DefaultError,
|
|
6
6
|
DefinedQueryObserverResult,
|
|
@@ -10,7 +10,13 @@ import type {
|
|
|
10
10
|
WithRequired,
|
|
11
11
|
} from '@tanstack/query-core'
|
|
12
12
|
import type { UseBaseQueryReturnType } from './useBaseQuery'
|
|
13
|
-
import type {
|
|
13
|
+
import type {
|
|
14
|
+
DeepUnwrapRef,
|
|
15
|
+
DistributiveOmit,
|
|
16
|
+
MaybeRef,
|
|
17
|
+
MaybeRefDeep,
|
|
18
|
+
MaybeRefOrGetter,
|
|
19
|
+
} from './types'
|
|
14
20
|
import type { QueryClient } from './queryClient'
|
|
15
21
|
|
|
16
22
|
export type UseQueryOptions<
|
|
@@ -19,7 +25,7 @@ export type UseQueryOptions<
|
|
|
19
25
|
TData = TQueryFnData,
|
|
20
26
|
TQueryData = TQueryFnData,
|
|
21
27
|
TQueryKey extends QueryKey = QueryKey,
|
|
22
|
-
> = {
|
|
28
|
+
> = MaybeRef<{
|
|
23
29
|
[Property in keyof QueryObserverOptions<
|
|
24
30
|
TQueryFnData,
|
|
25
31
|
TError,
|
|
@@ -32,8 +38,18 @@ export type UseQueryOptions<
|
|
|
32
38
|
TError,
|
|
33
39
|
TData,
|
|
34
40
|
TQueryData,
|
|
35
|
-
|
|
41
|
+
DeepUnwrapRef<TQueryKey>
|
|
36
42
|
>[Property]
|
|
43
|
+
: Property extends 'enabled'
|
|
44
|
+
? MaybeRefOrGetter<
|
|
45
|
+
QueryObserverOptions<
|
|
46
|
+
TQueryFnData,
|
|
47
|
+
TError,
|
|
48
|
+
TData,
|
|
49
|
+
TQueryData,
|
|
50
|
+
TQueryKey
|
|
51
|
+
>[Property]
|
|
52
|
+
>
|
|
37
53
|
: MaybeRefDeep<
|
|
38
54
|
WithRequired<
|
|
39
55
|
QueryObserverOptions<
|
|
@@ -46,7 +62,7 @@ export type UseQueryOptions<
|
|
|
46
62
|
'queryKey'
|
|
47
63
|
>[Property]
|
|
48
64
|
>
|
|
49
|
-
}
|
|
65
|
+
}>
|
|
50
66
|
|
|
51
67
|
export type UseQueryReturnType<TData, TError> = DistributiveOmit<
|
|
52
68
|
UseBaseQueryReturnType<TData, TError>,
|
|
@@ -118,8 +134,5 @@ export function useQuery<
|
|
|
118
134
|
| UseQueryDefinedReturnType<TData, TError> {
|
|
119
135
|
const result = useBaseQuery(QueryObserver, options, queryClient)
|
|
120
136
|
|
|
121
|
-
return
|
|
122
|
-
...result,
|
|
123
|
-
refetch: result.refetch.value,
|
|
124
|
-
}
|
|
137
|
+
return result
|
|
125
138
|
}
|
package/src/useQueryClient.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { hasInjectionContext, inject } from 'vue-demi'
|
|
2
2
|
|
|
3
3
|
import { getClientKey } from './utils'
|
|
4
4
|
import type { QueryClient } from './queryClient'
|
|
5
5
|
|
|
6
6
|
export function useQueryClient(id = ''): QueryClient {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
// ensures that `inject()` can be used
|
|
8
|
+
if (!hasInjectionContext()) {
|
|
9
|
+
throw new Error(
|
|
10
|
+
'vue-query hooks can only be used inside setup() function or functions that support injection context.',
|
|
11
|
+
)
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
const key = getClientKey(id)
|
package/src/utils.ts
CHANGED
|
@@ -65,3 +65,15 @@ function isPlainObject(value: unknown): value is Object {
|
|
|
65
65
|
const prototype = Object.getPrototypeOf(value)
|
|
66
66
|
return prototype === null || prototype === Object.prototype
|
|
67
67
|
}
|
|
68
|
+
|
|
69
|
+
export function shouldThrowError<T extends (...args: Array<any>) => boolean>(
|
|
70
|
+
throwOnError: boolean | T | undefined,
|
|
71
|
+
params: Parameters<T>,
|
|
72
|
+
): boolean {
|
|
73
|
+
// Allow throwOnError function to override throwing behavior on a per-error basis
|
|
74
|
+
if (typeof throwOnError === 'function') {
|
|
75
|
+
return throwOnError(...params)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
return !!throwOnError
|
|
79
|
+
}
|
package/src/vueQueryPlugin.ts
CHANGED
|
@@ -5,17 +5,17 @@ import { QueryClient } from './queryClient'
|
|
|
5
5
|
import { getClientKey } from './utils'
|
|
6
6
|
import { setupDevtools } from './devtools/devtools'
|
|
7
7
|
import type { QueryClientConfig } from '@tanstack/query-core'
|
|
8
|
-
import type { MaybeRefDeep } from './types'
|
|
9
8
|
|
|
10
9
|
type ClientPersister = (client: QueryClient) => [() => void, Promise<void>]
|
|
11
10
|
|
|
12
11
|
interface CommonOptions {
|
|
13
12
|
queryClientKey?: string
|
|
14
13
|
clientPersister?: ClientPersister
|
|
14
|
+
clientPersisterOnSuccess?: (client: QueryClient) => void
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
interface ConfigOptions extends CommonOptions {
|
|
18
|
-
queryClientConfig?:
|
|
18
|
+
queryClientConfig?: QueryClientConfig
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
interface ClientOptions extends CommonOptions {
|
|
@@ -51,6 +51,7 @@ export const VueQueryPlugin = {
|
|
|
51
51
|
persisterUnmount = unmount
|
|
52
52
|
promise.then(() => {
|
|
53
53
|
client.isRestoring.value = false
|
|
54
|
+
options.clientPersisterOnSuccess?.(client)
|
|
54
55
|
})
|
|
55
56
|
}
|
|
56
57
|
|