houdini-react 1.2.61 → 1.2.63
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/runtime/hooks/useSubscriptionHandle.d.ts +1 -1
- package/build/runtime-cjs/hooks/useDocumentHandle.js +11 -2
- package/build/runtime-cjs/hooks/useSubscriptionHandle.d.ts +1 -1
- package/build/runtime-esm/hooks/useDocumentHandle.js +11 -2
- package/build/runtime-esm/hooks/useSubscriptionHandle.d.ts +1 -1
- package/package.json +2 -2
|
@@ -21,5 +21,5 @@ export declare function useSubscriptionHandle<_Result extends GraphQLObject, _In
|
|
|
21
21
|
fetching: boolean;
|
|
22
22
|
variables: _Input;
|
|
23
23
|
unlisten: () => Promise<void>;
|
|
24
|
-
listen: ({ metadata, session, fetch, variables, policy, stuff, cacheParams, setup, silenceEcho, }?: import("$houdini/lib").SendParams) => Promise<import("$houdini/runtime/lib/types").QueryResult<import("houdini").GraphQLObject, _Input>>;
|
|
24
|
+
listen: ({ metadata, session, fetch, variables, policy, stuff, cacheParams, setup, silenceEcho, abortController, }?: import("$houdini/lib").SendParams) => Promise<import("$houdini/runtime/lib/types").QueryResult<import("houdini").GraphQLObject, _Input>>;
|
|
25
25
|
};
|
|
@@ -52,9 +52,18 @@ function useDocumentHandle({
|
|
|
52
52
|
const wrapLoad = (setLoading, fn) => {
|
|
53
53
|
return async (value) => {
|
|
54
54
|
setLoading(true);
|
|
55
|
-
|
|
55
|
+
let result = null;
|
|
56
|
+
let err = null;
|
|
57
|
+
try {
|
|
58
|
+
result = await fn(value);
|
|
59
|
+
} catch (e) {
|
|
60
|
+
err = e;
|
|
61
|
+
}
|
|
56
62
|
setLoading(false);
|
|
57
|
-
|
|
63
|
+
if (err && err.name !== "AbortError") {
|
|
64
|
+
throw err;
|
|
65
|
+
}
|
|
66
|
+
return result || observer.state;
|
|
58
67
|
};
|
|
59
68
|
};
|
|
60
69
|
const fetchQuery = (args) => {
|
|
@@ -21,5 +21,5 @@ export declare function useSubscriptionHandle<_Result extends GraphQLObject, _In
|
|
|
21
21
|
fetching: boolean;
|
|
22
22
|
variables: _Input;
|
|
23
23
|
unlisten: () => Promise<void>;
|
|
24
|
-
listen: ({ metadata, session, fetch, variables, policy, stuff, cacheParams, setup, silenceEcho, }?: import("$houdini/lib").SendParams) => Promise<import("$houdini/runtime/lib/types").QueryResult<import("houdini").GraphQLObject, _Input>>;
|
|
24
|
+
listen: ({ metadata, session, fetch, variables, policy, stuff, cacheParams, setup, silenceEcho, abortController, }?: import("$houdini/lib").SendParams) => Promise<import("$houdini/runtime/lib/types").QueryResult<import("houdini").GraphQLObject, _Input>>;
|
|
25
25
|
};
|
|
@@ -23,9 +23,18 @@ function useDocumentHandle({
|
|
|
23
23
|
const wrapLoad = (setLoading, fn) => {
|
|
24
24
|
return async (value) => {
|
|
25
25
|
setLoading(true);
|
|
26
|
-
|
|
26
|
+
let result = null;
|
|
27
|
+
let err = null;
|
|
28
|
+
try {
|
|
29
|
+
result = await fn(value);
|
|
30
|
+
} catch (e) {
|
|
31
|
+
err = e;
|
|
32
|
+
}
|
|
27
33
|
setLoading(false);
|
|
28
|
-
|
|
34
|
+
if (err && err.name !== "AbortError") {
|
|
35
|
+
throw err;
|
|
36
|
+
}
|
|
37
|
+
return result || observer.state;
|
|
29
38
|
};
|
|
30
39
|
};
|
|
31
40
|
const fetchQuery = (args) => {
|
|
@@ -21,5 +21,5 @@ export declare function useSubscriptionHandle<_Result extends GraphQLObject, _In
|
|
|
21
21
|
fetching: boolean;
|
|
22
22
|
variables: _Input;
|
|
23
23
|
unlisten: () => Promise<void>;
|
|
24
|
-
listen: ({ metadata, session, fetch, variables, policy, stuff, cacheParams, setup, silenceEcho, }?: import("$houdini/lib").SendParams) => Promise<import("$houdini/runtime/lib/types").QueryResult<import("houdini").GraphQLObject, _Input>>;
|
|
24
|
+
listen: ({ metadata, session, fetch, variables, policy, stuff, cacheParams, setup, silenceEcho, abortController, }?: import("$houdini/lib").SendParams) => Promise<import("$houdini/runtime/lib/types").QueryResult<import("houdini").GraphQLObject, _Input>>;
|
|
25
25
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "houdini-react",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.63",
|
|
4
4
|
"description": "The React plugin for houdini",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"recast": "^0.23.1",
|
|
44
44
|
"rollup": "^3.7.4",
|
|
45
45
|
"use-deep-compare-effect": "^1.8.1",
|
|
46
|
-
"houdini": "^1.2.
|
|
46
|
+
"houdini": "^1.2.63"
|
|
47
47
|
},
|
|
48
48
|
"files": [
|
|
49
49
|
"build"
|