@ventlio/tanstack-query 0.2.32 → 0.2.33
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.
|
@@ -10,12 +10,9 @@ const useQueryHeaders = () => {
|
|
|
10
10
|
};
|
|
11
11
|
const setQueryHeaders = (newHeaders) => {
|
|
12
12
|
// make sure the config does not expire
|
|
13
|
-
queryClient.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
staleTime: Infinity,
|
|
17
|
-
cacheTime: Infinity,
|
|
18
|
-
},
|
|
13
|
+
queryClient.setQueryDefaults(['config'], {
|
|
14
|
+
staleTime: Infinity,
|
|
15
|
+
cacheTime: Infinity,
|
|
19
16
|
});
|
|
20
17
|
// set the config
|
|
21
18
|
queryClient.setQueryData(['config'], (config) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useQueryHeaders.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useQueryHeaders.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.mjs
CHANGED
|
@@ -25,12 +25,9 @@ const useQueryHeaders = () => {
|
|
|
25
25
|
};
|
|
26
26
|
const setQueryHeaders = (newHeaders) => {
|
|
27
27
|
// make sure the config does not expire
|
|
28
|
-
queryClient.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
staleTime: Infinity,
|
|
32
|
-
cacheTime: Infinity,
|
|
33
|
-
},
|
|
28
|
+
queryClient.setQueryDefaults(['config'], {
|
|
29
|
+
staleTime: Infinity,
|
|
30
|
+
cacheTime: Infinity,
|
|
34
31
|
});
|
|
35
32
|
// set the config
|
|
36
33
|
queryClient.setQueryData(['config'], (config) => {
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -11,18 +11,15 @@ export const useQueryHeaders = (): IUseQueryHeaders => {
|
|
|
11
11
|
|
|
12
12
|
const setQueryHeaders = (newHeaders: TanstackQueryConfig['headers']) => {
|
|
13
13
|
// make sure the config does not expire
|
|
14
|
-
queryClient.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
staleTime: Infinity,
|
|
18
|
-
cacheTime: Infinity,
|
|
19
|
-
},
|
|
14
|
+
queryClient.setQueryDefaults(['config'], {
|
|
15
|
+
staleTime: Infinity,
|
|
16
|
+
cacheTime: Infinity,
|
|
20
17
|
});
|
|
21
18
|
|
|
22
19
|
// set the config
|
|
23
20
|
queryClient.setQueryData<TanstackQueryConfig>(
|
|
24
21
|
['config'],
|
|
25
|
-
(config):
|
|
22
|
+
(config): TanstackQueryConfig => {
|
|
26
23
|
const newConfig = { ...config, headers: newHeaders };
|
|
27
24
|
return newConfig;
|
|
28
25
|
},
|