@isograph/react 0.0.0-main-464bb57d → 0.0.0-main-738bdbf0
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/.turbo/turbo-compile-libs.log +1 -1
- package/dist/core/startUpdate.js +2 -2
- package/package.json +4 -4
- package/src/core/startUpdate.ts +2 -2
- package/src/tests/__isograph/Economist/__link/output_type.ts +2 -0
- package/src/tests/__isograph/Node/__link/output_type.ts +3 -0
- package/src/tests/__isograph/Node/asEconomist/resolver_reader.ts +2 -2
- package/src/tests/__isograph/Query/linkedUpdate/param_type.ts +4 -4
- package/src/tests/__isograph/Query/linkedUpdate/resolver_reader.ts +1 -1
- package/src/tests/startUpdate.test.ts +1 -1
- package/src/tests/__isograph/Economist/link/output_type.ts +0 -2
- package/src/tests/__isograph/Node/link/output_type.ts +0 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
../.. | WARN Unsupported engine: wanted: {"node":"22.9.0"} (current: {"node":"v22.20.0","pnpm":"10.15.0"})
|
|
2
2
|
|
|
3
|
-
> @isograph/react@0.0.0-main-
|
|
3
|
+
> @isograph/react@0.0.0-main-738bdbf0 compile-libs /home/runner/work/isograph/isograph/libs/isograph-react
|
|
4
4
|
> rimraf dist && tsc -p tsconfig.pkg.json
|
|
5
5
|
|
package/dist/core/startUpdate.js
CHANGED
|
@@ -105,10 +105,10 @@ function readUpdatableData(environment, ast, root, variables, nestedRefetchQueri
|
|
|
105
105
|
}, 'isUpdatable' in field && field.isUpdatable
|
|
106
106
|
? (newValue) => {
|
|
107
107
|
if (Array.isArray(newValue)) {
|
|
108
|
-
storeRecord[storeRecordName] = newValue.map((node) => (0, IsographEnvironment_1.assertLink)(node === null || node === void 0 ? void 0 : node.
|
|
108
|
+
storeRecord[storeRecordName] = newValue.map((node) => (0, IsographEnvironment_1.assertLink)(node === null || node === void 0 ? void 0 : node.__link));
|
|
109
109
|
}
|
|
110
110
|
else {
|
|
111
|
-
storeRecord[storeRecordName] = (0, IsographEnvironment_1.assertLink)(newValue === null || newValue === void 0 ? void 0 : newValue.
|
|
111
|
+
storeRecord[storeRecordName] = (0, IsographEnvironment_1.assertLink)(newValue === null || newValue === void 0 ? void 0 : newValue.__link);
|
|
112
112
|
}
|
|
113
113
|
const updatedIds = (0, cache_1.insertEmptySetIfMissing)(mutableUpdatedIds, root.__typename);
|
|
114
114
|
updatedIds.add(root.__link);
|
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-738bdbf0",
|
|
4
4
|
"description": "Use Isograph with React",
|
|
5
5
|
"homepage": "https://isograph.dev",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"iso": "cross-env ISO_PRINT_ABSOLUTE_FILEPATH=1 ../../target/debug/isograph_cli --config ./isograph.config.json"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@isograph/disposable-types": "0.0.0-main-
|
|
23
|
-
"@isograph/react-disposable-state": "0.0.0-main-
|
|
24
|
-
"@isograph/reference-counted-pointer": "0.0.0-main-
|
|
22
|
+
"@isograph/disposable-types": "0.0.0-main-738bdbf0",
|
|
23
|
+
"@isograph/react-disposable-state": "0.0.0-main-738bdbf0",
|
|
24
|
+
"@isograph/reference-counted-pointer": "0.0.0-main-738bdbf0"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"react": "^18.0.0 || ^19.0.0"
|
package/src/core/startUpdate.ts
CHANGED
|
@@ -245,10 +245,10 @@ function readUpdatableData<TReadFromStore extends UnknownTReadFromStore>(
|
|
|
245
245
|
? (newValue) => {
|
|
246
246
|
if (Array.isArray(newValue)) {
|
|
247
247
|
storeRecord[storeRecordName] = newValue.map((node) =>
|
|
248
|
-
assertLink(node?.
|
|
248
|
+
assertLink(node?.__link),
|
|
249
249
|
);
|
|
250
250
|
} else {
|
|
251
|
-
storeRecord[storeRecordName] = assertLink(newValue?.
|
|
251
|
+
storeRecord[storeRecordName] = assertLink(newValue?.__link);
|
|
252
252
|
}
|
|
253
253
|
const updatedIds = insertEmptySetIfMissing(
|
|
254
254
|
mutableUpdatedIds,
|
|
@@ -10,7 +10,7 @@ const readerAst: ReaderAst<{ data: any, parameters: Record<PropertyKey, never> }
|
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
kind: "Link",
|
|
13
|
-
alias: "
|
|
13
|
+
alias: "__link",
|
|
14
14
|
},
|
|
15
15
|
];
|
|
16
16
|
|
|
@@ -20,7 +20,7 @@ const artifact: EagerReaderArtifact<
|
|
|
20
20
|
> = {
|
|
21
21
|
kind: "EagerReaderArtifact",
|
|
22
22
|
fieldName: "Node.asEconomist",
|
|
23
|
-
resolver: ({ data }) => data.__typename === "Economist" ? data.
|
|
23
|
+
resolver: ({ data }) => data.__typename === "Economist" ? data.__link : null,
|
|
24
24
|
readerAst,
|
|
25
25
|
hasUpdatable: false,
|
|
26
26
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type Node____link__output_type } from '../../Node/__link/output_type';
|
|
2
2
|
import type { StartUpdate } from '@isograph/react';
|
|
3
3
|
|
|
4
4
|
export type Query__linkedUpdate__param = {
|
|
@@ -15,7 +15,7 @@ A client pointer for the Economist type.
|
|
|
15
15
|
/**
|
|
16
16
|
A store Link for the Node type.
|
|
17
17
|
*/
|
|
18
|
-
readonly
|
|
18
|
+
readonly __link: Node____link__output_type,
|
|
19
19
|
/**
|
|
20
20
|
A client pointer for the Economist type.
|
|
21
21
|
*/
|
|
@@ -34,12 +34,12 @@ A client pointer for the Economist type.
|
|
|
34
34
|
name: string,
|
|
35
35
|
} | null),
|
|
36
36
|
} | null),
|
|
37
|
-
set node(value: ({
|
|
37
|
+
set node(value: ({ __link: Node____link__output_type } | null)),
|
|
38
38
|
readonly john_stuart_mill: ({
|
|
39
39
|
/**
|
|
40
40
|
A store Link for the Node type.
|
|
41
41
|
*/
|
|
42
|
-
readonly
|
|
42
|
+
readonly __link: Node____link__output_type,
|
|
43
43
|
/**
|
|
44
44
|
A client pointer for the Economist type.
|
|
45
45
|
*/
|