@isograph/react 0.4.1 → 0.4.2
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/check.js +6 -5
- package/package.json +1 -1
- package/src/core/check.ts +13 -14
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
../.. | WARN Unsupported engine: wanted: {"node":"22.9.0"} (current: {"node":"v22.19.0","pnpm":"10.15.0"})
|
|
2
2
|
|
|
3
|
-
> @isograph/react@0.4.
|
|
3
|
+
> @isograph/react@0.4.2 compile-libs /home/runner/work/isograph/isograph/libs/isograph-react
|
|
4
4
|
> rimraf dist && tsc -p tsconfig.pkg.json
|
|
5
5
|
|
package/dist/core/check.js
CHANGED
|
@@ -101,16 +101,17 @@ function checkFromRecord(environment, normalizationAst, variables, record, recor
|
|
|
101
101
|
}
|
|
102
102
|
case 'InlineFragment': {
|
|
103
103
|
const existingRecordTypename = record['__typename'];
|
|
104
|
-
if (existingRecordTypename == null
|
|
105
|
-
existingRecordTypename !== normalizationAstNode.type) {
|
|
104
|
+
if (existingRecordTypename == null) {
|
|
106
105
|
return {
|
|
107
106
|
kind: 'MissingData',
|
|
108
107
|
record: recordLink,
|
|
109
108
|
};
|
|
110
109
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
110
|
+
if (existingRecordTypename === normalizationAstNode.type) {
|
|
111
|
+
const result = checkFromRecord(environment, normalizationAstNode.selections, variables, record, recordLink);
|
|
112
|
+
if (result.kind === 'MissingData') {
|
|
113
|
+
return result;
|
|
114
|
+
}
|
|
114
115
|
}
|
|
115
116
|
continue normalizationAstLoop;
|
|
116
117
|
}
|
package/package.json
CHANGED
package/src/core/check.ts
CHANGED
|
@@ -172,26 +172,25 @@ function checkFromRecord(
|
|
|
172
172
|
case 'InlineFragment': {
|
|
173
173
|
const existingRecordTypename = record['__typename'];
|
|
174
174
|
|
|
175
|
-
if (
|
|
176
|
-
existingRecordTypename == null ||
|
|
177
|
-
existingRecordTypename !== normalizationAstNode.type
|
|
178
|
-
) {
|
|
175
|
+
if (existingRecordTypename == null) {
|
|
179
176
|
return {
|
|
180
177
|
kind: 'MissingData',
|
|
181
178
|
record: recordLink,
|
|
182
179
|
};
|
|
183
180
|
}
|
|
184
181
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
182
|
+
if (existingRecordTypename === normalizationAstNode.type) {
|
|
183
|
+
const result = checkFromRecord(
|
|
184
|
+
environment,
|
|
185
|
+
normalizationAstNode.selections,
|
|
186
|
+
variables,
|
|
187
|
+
record,
|
|
188
|
+
recordLink,
|
|
189
|
+
);
|
|
190
|
+
|
|
191
|
+
if (result.kind === 'MissingData') {
|
|
192
|
+
return result;
|
|
193
|
+
}
|
|
195
194
|
}
|
|
196
195
|
|
|
197
196
|
continue normalizationAstLoop;
|