@isograph/react 0.0.0-main-75a6eaf1 → 0.0.0-main-bf1400f8
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.
@@ -38,6 +38,8 @@ function useSkipLimitPagination(loadableField) {
|
|
38
38
|
};
|
39
39
|
const { state, setState } = (0, react_disposable_state_1.useUpdatableDisposableState)();
|
40
40
|
const environment = (0, IsographEnvironmentProvider_1.useIsographEnvironment)();
|
41
|
+
// TODO move this out of useSkipLimitPagination, and pass environment and networkRequestOptions
|
42
|
+
// as parameters (or recreate networkRequestOptions)
|
41
43
|
function readCompletedFragmentReferences(completedReferences) {
|
42
44
|
// In general, this will not suspend. But it could, if there is missing data.
|
43
45
|
// A better version of this hook would not do any reading here.
|
@@ -45,7 +47,7 @@ function useSkipLimitPagination(loadableField) {
|
|
45
47
|
const fragmentReference = pointer.getItemIfNotDisposed();
|
46
48
|
if (fragmentReference == null) {
|
47
49
|
throw new Error('FragmentReference is unexpectedly disposed. \
|
48
|
-
|
50
|
+
This is indicative of a bug in Isograph.');
|
49
51
|
}
|
50
52
|
(0, useResult_1.maybeUnwrapNetworkRequest)(fragmentReference.networkRequest, networkRequestOptions);
|
51
53
|
const data = (0, read_1.readButDoNotEvaluate)(environment, fragmentReference, networkRequestOptions);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@isograph/react",
|
3
|
-
"version": "0.0.0-main-
|
3
|
+
"version": "0.0.0-main-bf1400f8",
|
4
4
|
"description": "Use Isograph with React",
|
5
5
|
"homepage": "https://isograph.dev",
|
6
6
|
"main": "dist/index.js",
|
@@ -17,9 +17,9 @@
|
|
17
17
|
"tsc": "tsc"
|
18
18
|
},
|
19
19
|
"dependencies": {
|
20
|
-
"@isograph/disposable-types": "0.0.0-main-
|
21
|
-
"@isograph/react-disposable-state": "0.0.0-main-
|
22
|
-
"@isograph/reference-counted-pointer": "0.0.0-main-
|
20
|
+
"@isograph/disposable-types": "0.0.0-main-bf1400f8",
|
21
|
+
"@isograph/react-disposable-state": "0.0.0-main-bf1400f8",
|
22
|
+
"@isograph/reference-counted-pointer": "0.0.0-main-bf1400f8"
|
23
23
|
},
|
24
24
|
"peerDependencies": {
|
25
25
|
"react": "18.2.0"
|
@@ -83,6 +83,8 @@ export function useSkipLimitPagination<
|
|
83
83
|
|
84
84
|
const environment = useIsographEnvironment();
|
85
85
|
|
86
|
+
// TODO move this out of useSkipLimitPagination, and pass environment and networkRequestOptions
|
87
|
+
// as parameters (or recreate networkRequestOptions)
|
86
88
|
function readCompletedFragmentReferences(
|
87
89
|
completedReferences: ReadonlyArray<
|
88
90
|
ItemCleanupPair<ReferenceCountedPointer<ArrayFragmentReference<TItem>>>
|
@@ -95,7 +97,7 @@ export function useSkipLimitPagination<
|
|
95
97
|
if (fragmentReference == null) {
|
96
98
|
throw new Error(
|
97
99
|
'FragmentReference is unexpectedly disposed. \
|
98
|
-
|
100
|
+
This is indicative of a bug in Isograph.',
|
99
101
|
);
|
100
102
|
}
|
101
103
|
|