houdini 1.2.6-next.0 → 1.2.6
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/cmd-cjs/index.js +8 -10
- package/build/cmd-esm/index.js +8 -10
- package/build/codegen-cjs/index.js +6 -8
- package/build/codegen-esm/index.js +6 -8
- package/build/lib-cjs/index.js +6 -8
- package/build/lib-esm/index.js +6 -8
- package/build/runtime/cache/cache.d.ts +1 -0
- package/build/runtime-cjs/cache/cache.d.ts +1 -0
- package/build/runtime-cjs/cache/cache.js +6 -8
- package/build/runtime-esm/cache/cache.d.ts +1 -0
- package/build/runtime-esm/cache/cache.js +6 -8
- package/build/test-cjs/index.js +6 -8
- package/build/test-esm/index.js +6 -8
- package/build/vite-cjs/index.js +6 -8
- package/build/vite-esm/index.js +6 -8
- package/package.json +1 -1
package/build/cmd-cjs/index.js
CHANGED
|
@@ -71697,12 +71697,9 @@ var CacheInternal = class {
|
|
|
71697
71697
|
);
|
|
71698
71698
|
}
|
|
71699
71699
|
}
|
|
71700
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
71701
|
-
(field2) => typeof value[field2] === "undefined"
|
|
71702
|
-
).length > 0;
|
|
71703
71700
|
let linkedID = null;
|
|
71704
71701
|
if (value !== null) {
|
|
71705
|
-
linkedID = !
|
|
71702
|
+
linkedID = !this.isEmbedded(linkedType, value) ? this.id(linkedType, value) : `${parent2}.${key}`;
|
|
71706
71703
|
}
|
|
71707
71704
|
let linkChange = linkedID !== previousValue;
|
|
71708
71705
|
layer.writeLink(parent2, key, linkedID);
|
|
@@ -72074,6 +72071,10 @@ var CacheInternal = class {
|
|
|
72074
72071
|
computeID(type, data) {
|
|
72075
72072
|
return computeID(this.config, type, data);
|
|
72076
72073
|
}
|
|
72074
|
+
isEmbedded(linkedType, value) {
|
|
72075
|
+
const idFields = this.idFields(linkedType);
|
|
72076
|
+
return idFields.length === 0 || idFields.filter((field) => typeof value[field] === "undefined").length > 0;
|
|
72077
|
+
}
|
|
72077
72078
|
hydrateNestedList({
|
|
72078
72079
|
fields,
|
|
72079
72080
|
variables,
|
|
@@ -72181,9 +72182,6 @@ var CacheInternal = class {
|
|
|
72181
72182
|
}
|
|
72182
72183
|
const entryObj = entry;
|
|
72183
72184
|
let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
|
|
72184
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
72185
|
-
(field) => typeof entry[field] === "undefined"
|
|
72186
|
-
).length > 0;
|
|
72187
72185
|
let innerType = linkedType;
|
|
72188
72186
|
const typename = entryObj.__typename;
|
|
72189
72187
|
if (typename) {
|
|
@@ -72191,7 +72189,7 @@ var CacheInternal = class {
|
|
|
72191
72189
|
} else if (abstract) {
|
|
72192
72190
|
throw new Error("Encountered interface type without __typename in the payload");
|
|
72193
72191
|
}
|
|
72194
|
-
if (!
|
|
72192
|
+
if (!this.isEmbedded(linkedType, entry)) {
|
|
72195
72193
|
const id = this.id(innerType, entry);
|
|
72196
72194
|
if (id) {
|
|
72197
72195
|
linkedID = id;
|
|
@@ -80229,8 +80227,8 @@ async function updatePackageJSON(targetPath) {
|
|
|
80229
80227
|
}
|
|
80230
80228
|
packageJSON.devDependencies = {
|
|
80231
80229
|
...packageJSON.devDependencies,
|
|
80232
|
-
houdini: "^1.2.6
|
|
80233
|
-
"houdini-svelte": "^1.2.6
|
|
80230
|
+
houdini: "^1.2.6",
|
|
80231
|
+
"houdini-svelte": "^1.2.6"
|
|
80234
80232
|
};
|
|
80235
80233
|
await fs_exports.writeFile(packagePath, JSON.stringify(packageJSON, null, 4));
|
|
80236
80234
|
}
|
package/build/cmd-esm/index.js
CHANGED
|
@@ -71703,12 +71703,9 @@ var CacheInternal = class {
|
|
|
71703
71703
|
);
|
|
71704
71704
|
}
|
|
71705
71705
|
}
|
|
71706
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
71707
|
-
(field2) => typeof value[field2] === "undefined"
|
|
71708
|
-
).length > 0;
|
|
71709
71706
|
let linkedID = null;
|
|
71710
71707
|
if (value !== null) {
|
|
71711
|
-
linkedID = !
|
|
71708
|
+
linkedID = !this.isEmbedded(linkedType, value) ? this.id(linkedType, value) : `${parent2}.${key}`;
|
|
71712
71709
|
}
|
|
71713
71710
|
let linkChange = linkedID !== previousValue;
|
|
71714
71711
|
layer.writeLink(parent2, key, linkedID);
|
|
@@ -72080,6 +72077,10 @@ var CacheInternal = class {
|
|
|
72080
72077
|
computeID(type, data) {
|
|
72081
72078
|
return computeID(this.config, type, data);
|
|
72082
72079
|
}
|
|
72080
|
+
isEmbedded(linkedType, value) {
|
|
72081
|
+
const idFields = this.idFields(linkedType);
|
|
72082
|
+
return idFields.length === 0 || idFields.filter((field) => typeof value[field] === "undefined").length > 0;
|
|
72083
|
+
}
|
|
72083
72084
|
hydrateNestedList({
|
|
72084
72085
|
fields,
|
|
72085
72086
|
variables,
|
|
@@ -72187,9 +72188,6 @@ var CacheInternal = class {
|
|
|
72187
72188
|
}
|
|
72188
72189
|
const entryObj = entry;
|
|
72189
72190
|
let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
|
|
72190
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
72191
|
-
(field) => typeof entry[field] === "undefined"
|
|
72192
|
-
).length > 0;
|
|
72193
72191
|
let innerType = linkedType;
|
|
72194
72192
|
const typename = entryObj.__typename;
|
|
72195
72193
|
if (typename) {
|
|
@@ -72197,7 +72195,7 @@ var CacheInternal = class {
|
|
|
72197
72195
|
} else if (abstract) {
|
|
72198
72196
|
throw new Error("Encountered interface type without __typename in the payload");
|
|
72199
72197
|
}
|
|
72200
|
-
if (!
|
|
72198
|
+
if (!this.isEmbedded(linkedType, entry)) {
|
|
72201
72199
|
const id = this.id(innerType, entry);
|
|
72202
72200
|
if (id) {
|
|
72203
72201
|
linkedID = id;
|
|
@@ -80234,8 +80232,8 @@ async function updatePackageJSON(targetPath) {
|
|
|
80234
80232
|
}
|
|
80235
80233
|
packageJSON.devDependencies = {
|
|
80236
80234
|
...packageJSON.devDependencies,
|
|
80237
|
-
houdini: "^1.2.6
|
|
80238
|
-
"houdini-svelte": "^1.2.6
|
|
80235
|
+
houdini: "^1.2.6",
|
|
80236
|
+
"houdini-svelte": "^1.2.6"
|
|
80239
80237
|
};
|
|
80240
80238
|
await fs_exports.writeFile(packagePath, JSON.stringify(packageJSON, null, 4));
|
|
80241
80239
|
}
|
|
@@ -56175,12 +56175,9 @@ var CacheInternal = class {
|
|
|
56175
56175
|
);
|
|
56176
56176
|
}
|
|
56177
56177
|
}
|
|
56178
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
56179
|
-
(field2) => typeof value[field2] === "undefined"
|
|
56180
|
-
).length > 0;
|
|
56181
56178
|
let linkedID = null;
|
|
56182
56179
|
if (value !== null) {
|
|
56183
|
-
linkedID = !
|
|
56180
|
+
linkedID = !this.isEmbedded(linkedType, value) ? this.id(linkedType, value) : `${parent2}.${key}`;
|
|
56184
56181
|
}
|
|
56185
56182
|
let linkChange = linkedID !== previousValue;
|
|
56186
56183
|
layer.writeLink(parent2, key, linkedID);
|
|
@@ -56552,6 +56549,10 @@ var CacheInternal = class {
|
|
|
56552
56549
|
computeID(type, data) {
|
|
56553
56550
|
return computeID(this.config, type, data);
|
|
56554
56551
|
}
|
|
56552
|
+
isEmbedded(linkedType, value) {
|
|
56553
|
+
const idFields = this.idFields(linkedType);
|
|
56554
|
+
return idFields.length === 0 || idFields.filter((field) => typeof value[field] === "undefined").length > 0;
|
|
56555
|
+
}
|
|
56555
56556
|
hydrateNestedList({
|
|
56556
56557
|
fields,
|
|
56557
56558
|
variables,
|
|
@@ -56659,9 +56660,6 @@ var CacheInternal = class {
|
|
|
56659
56660
|
}
|
|
56660
56661
|
const entryObj = entry;
|
|
56661
56662
|
let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
|
|
56662
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
56663
|
-
(field) => typeof entry[field] === "undefined"
|
|
56664
|
-
).length > 0;
|
|
56665
56663
|
let innerType = linkedType;
|
|
56666
56664
|
const typename = entryObj.__typename;
|
|
56667
56665
|
if (typename) {
|
|
@@ -56669,7 +56667,7 @@ var CacheInternal = class {
|
|
|
56669
56667
|
} else if (abstract) {
|
|
56670
56668
|
throw new Error("Encountered interface type without __typename in the payload");
|
|
56671
56669
|
}
|
|
56672
|
-
if (!
|
|
56670
|
+
if (!this.isEmbedded(linkedType, entry)) {
|
|
56673
56671
|
const id = this.id(innerType, entry);
|
|
56674
56672
|
if (id) {
|
|
56675
56673
|
linkedID = id;
|
|
@@ -56174,12 +56174,9 @@ var CacheInternal = class {
|
|
|
56174
56174
|
);
|
|
56175
56175
|
}
|
|
56176
56176
|
}
|
|
56177
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
56178
|
-
(field2) => typeof value[field2] === "undefined"
|
|
56179
|
-
).length > 0;
|
|
56180
56177
|
let linkedID = null;
|
|
56181
56178
|
if (value !== null) {
|
|
56182
|
-
linkedID = !
|
|
56179
|
+
linkedID = !this.isEmbedded(linkedType, value) ? this.id(linkedType, value) : `${parent2}.${key}`;
|
|
56183
56180
|
}
|
|
56184
56181
|
let linkChange = linkedID !== previousValue;
|
|
56185
56182
|
layer.writeLink(parent2, key, linkedID);
|
|
@@ -56551,6 +56548,10 @@ var CacheInternal = class {
|
|
|
56551
56548
|
computeID(type, data) {
|
|
56552
56549
|
return computeID(this.config, type, data);
|
|
56553
56550
|
}
|
|
56551
|
+
isEmbedded(linkedType, value) {
|
|
56552
|
+
const idFields = this.idFields(linkedType);
|
|
56553
|
+
return idFields.length === 0 || idFields.filter((field) => typeof value[field] === "undefined").length > 0;
|
|
56554
|
+
}
|
|
56554
56555
|
hydrateNestedList({
|
|
56555
56556
|
fields,
|
|
56556
56557
|
variables,
|
|
@@ -56658,9 +56659,6 @@ var CacheInternal = class {
|
|
|
56658
56659
|
}
|
|
56659
56660
|
const entryObj = entry;
|
|
56660
56661
|
let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
|
|
56661
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
56662
|
-
(field) => typeof entry[field] === "undefined"
|
|
56663
|
-
).length > 0;
|
|
56664
56662
|
let innerType = linkedType;
|
|
56665
56663
|
const typename = entryObj.__typename;
|
|
56666
56664
|
if (typename) {
|
|
@@ -56668,7 +56666,7 @@ var CacheInternal = class {
|
|
|
56668
56666
|
} else if (abstract) {
|
|
56669
56667
|
throw new Error("Encountered interface type without __typename in the payload");
|
|
56670
56668
|
}
|
|
56671
|
-
if (!
|
|
56669
|
+
if (!this.isEmbedded(linkedType, entry)) {
|
|
56672
56670
|
const id = this.id(innerType, entry);
|
|
56673
56671
|
if (id) {
|
|
56674
56672
|
linkedID = id;
|
package/build/lib-cjs/index.js
CHANGED
|
@@ -65208,12 +65208,9 @@ var CacheInternal = class {
|
|
|
65208
65208
|
);
|
|
65209
65209
|
}
|
|
65210
65210
|
}
|
|
65211
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
65212
|
-
(field2) => typeof value[field2] === "undefined"
|
|
65213
|
-
).length > 0;
|
|
65214
65211
|
let linkedID = null;
|
|
65215
65212
|
if (value !== null) {
|
|
65216
|
-
linkedID = !
|
|
65213
|
+
linkedID = !this.isEmbedded(linkedType, value) ? this.id(linkedType, value) : `${parent}.${key}`;
|
|
65217
65214
|
}
|
|
65218
65215
|
let linkChange = linkedID !== previousValue;
|
|
65219
65216
|
layer.writeLink(parent, key, linkedID);
|
|
@@ -65585,6 +65582,10 @@ var CacheInternal = class {
|
|
|
65585
65582
|
computeID(type, data) {
|
|
65586
65583
|
return computeID(this.config, type, data);
|
|
65587
65584
|
}
|
|
65585
|
+
isEmbedded(linkedType, value) {
|
|
65586
|
+
const idFields = this.idFields(linkedType);
|
|
65587
|
+
return idFields.length === 0 || idFields.filter((field) => typeof value[field] === "undefined").length > 0;
|
|
65588
|
+
}
|
|
65588
65589
|
hydrateNestedList({
|
|
65589
65590
|
fields,
|
|
65590
65591
|
variables,
|
|
@@ -65692,9 +65693,6 @@ var CacheInternal = class {
|
|
|
65692
65693
|
}
|
|
65693
65694
|
const entryObj = entry;
|
|
65694
65695
|
let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
|
|
65695
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
65696
|
-
(field) => typeof entry[field] === "undefined"
|
|
65697
|
-
).length > 0;
|
|
65698
65696
|
let innerType = linkedType;
|
|
65699
65697
|
const typename = entryObj.__typename;
|
|
65700
65698
|
if (typename) {
|
|
@@ -65702,7 +65700,7 @@ var CacheInternal = class {
|
|
|
65702
65700
|
} else if (abstract) {
|
|
65703
65701
|
throw new Error("Encountered interface type without __typename in the payload");
|
|
65704
65702
|
}
|
|
65705
|
-
if (!
|
|
65703
|
+
if (!this.isEmbedded(linkedType, entry)) {
|
|
65706
65704
|
const id = this.id(innerType, entry);
|
|
65707
65705
|
if (id) {
|
|
65708
65706
|
linkedID = id;
|
package/build/lib-esm/index.js
CHANGED
|
@@ -65148,12 +65148,9 @@ var CacheInternal = class {
|
|
|
65148
65148
|
);
|
|
65149
65149
|
}
|
|
65150
65150
|
}
|
|
65151
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
65152
|
-
(field2) => typeof value[field2] === "undefined"
|
|
65153
|
-
).length > 0;
|
|
65154
65151
|
let linkedID = null;
|
|
65155
65152
|
if (value !== null) {
|
|
65156
|
-
linkedID = !
|
|
65153
|
+
linkedID = !this.isEmbedded(linkedType, value) ? this.id(linkedType, value) : `${parent}.${key}`;
|
|
65157
65154
|
}
|
|
65158
65155
|
let linkChange = linkedID !== previousValue;
|
|
65159
65156
|
layer.writeLink(parent, key, linkedID);
|
|
@@ -65525,6 +65522,10 @@ var CacheInternal = class {
|
|
|
65525
65522
|
computeID(type, data) {
|
|
65526
65523
|
return computeID(this.config, type, data);
|
|
65527
65524
|
}
|
|
65525
|
+
isEmbedded(linkedType, value) {
|
|
65526
|
+
const idFields = this.idFields(linkedType);
|
|
65527
|
+
return idFields.length === 0 || idFields.filter((field) => typeof value[field] === "undefined").length > 0;
|
|
65528
|
+
}
|
|
65528
65529
|
hydrateNestedList({
|
|
65529
65530
|
fields,
|
|
65530
65531
|
variables,
|
|
@@ -65632,9 +65633,6 @@ var CacheInternal = class {
|
|
|
65632
65633
|
}
|
|
65633
65634
|
const entryObj = entry;
|
|
65634
65635
|
let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
|
|
65635
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
65636
|
-
(field) => typeof entry[field] === "undefined"
|
|
65637
|
-
).length > 0;
|
|
65638
65636
|
let innerType = linkedType;
|
|
65639
65637
|
const typename = entryObj.__typename;
|
|
65640
65638
|
if (typename) {
|
|
@@ -65642,7 +65640,7 @@ var CacheInternal = class {
|
|
|
65642
65640
|
} else if (abstract) {
|
|
65643
65641
|
throw new Error("Encountered interface type without __typename in the payload");
|
|
65644
65642
|
}
|
|
65645
|
-
if (!
|
|
65643
|
+
if (!this.isEmbedded(linkedType, entry)) {
|
|
65646
65644
|
const id = this.id(innerType, entry);
|
|
65647
65645
|
if (id) {
|
|
65648
65646
|
linkedID = id;
|
|
@@ -107,6 +107,7 @@ declare class CacheInternal {
|
|
|
107
107
|
id(type: string, id: string): string | null;
|
|
108
108
|
idFields(type: string): string[];
|
|
109
109
|
computeID(type: string, data: any): string;
|
|
110
|
+
isEmbedded(linkedType: string, value: GraphQLObject): boolean;
|
|
110
111
|
hydrateNestedList({ fields, variables, linkedList, stepsFromConnection, ignoreMasking, fullCheck, loading, }: {
|
|
111
112
|
fields: SubscriptionSelection;
|
|
112
113
|
variables?: {} | null;
|
|
@@ -107,6 +107,7 @@ declare class CacheInternal {
|
|
|
107
107
|
id(type: string, id: string): string | null;
|
|
108
108
|
idFields(type: string): string[];
|
|
109
109
|
computeID(type: string, data: any): string;
|
|
110
|
+
isEmbedded(linkedType: string, value: GraphQLObject): boolean;
|
|
110
111
|
hydrateNestedList({ fields, variables, linkedList, stepsFromConnection, ignoreMasking, fullCheck, loading, }: {
|
|
111
112
|
fields: SubscriptionSelection;
|
|
112
113
|
variables?: {} | null;
|
|
@@ -340,12 +340,9 @@ class CacheInternal {
|
|
|
340
340
|
);
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
344
|
-
(field2) => typeof value[field2] === "undefined"
|
|
345
|
-
).length > 0;
|
|
346
343
|
let linkedID = null;
|
|
347
344
|
if (value !== null) {
|
|
348
|
-
linkedID = !
|
|
345
|
+
linkedID = !this.isEmbedded(linkedType, value) ? this.id(linkedType, value) : `${parent}.${key}`;
|
|
349
346
|
}
|
|
350
347
|
let linkChange = linkedID !== previousValue;
|
|
351
348
|
layer.writeLink(parent, key, linkedID);
|
|
@@ -717,6 +714,10 @@ class CacheInternal {
|
|
|
717
714
|
computeID(type, data) {
|
|
718
715
|
return (0, import_config.computeID)(this.config, type, data);
|
|
719
716
|
}
|
|
717
|
+
isEmbedded(linkedType, value) {
|
|
718
|
+
const idFields = this.idFields(linkedType);
|
|
719
|
+
return idFields.length === 0 || idFields.filter((field) => typeof value[field] === "undefined").length > 0;
|
|
720
|
+
}
|
|
720
721
|
hydrateNestedList({
|
|
721
722
|
fields,
|
|
722
723
|
variables,
|
|
@@ -824,9 +825,6 @@ class CacheInternal {
|
|
|
824
825
|
}
|
|
825
826
|
const entryObj = entry;
|
|
826
827
|
let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
|
|
827
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
828
|
-
(field) => typeof entry[field] === "undefined"
|
|
829
|
-
).length > 0;
|
|
830
828
|
let innerType = linkedType;
|
|
831
829
|
const typename = entryObj.__typename;
|
|
832
830
|
if (typename) {
|
|
@@ -834,7 +832,7 @@ class CacheInternal {
|
|
|
834
832
|
} else if (abstract) {
|
|
835
833
|
throw new Error("Encountered interface type without __typename in the payload");
|
|
836
834
|
}
|
|
837
|
-
if (!
|
|
835
|
+
if (!this.isEmbedded(linkedType, entry)) {
|
|
838
836
|
const id = this.id(innerType, entry);
|
|
839
837
|
if (id) {
|
|
840
838
|
linkedID = id;
|
|
@@ -107,6 +107,7 @@ declare class CacheInternal {
|
|
|
107
107
|
id(type: string, id: string): string | null;
|
|
108
108
|
idFields(type: string): string[];
|
|
109
109
|
computeID(type: string, data: any): string;
|
|
110
|
+
isEmbedded(linkedType: string, value: GraphQLObject): boolean;
|
|
110
111
|
hydrateNestedList({ fields, variables, linkedList, stepsFromConnection, ignoreMasking, fullCheck, loading, }: {
|
|
111
112
|
fields: SubscriptionSelection;
|
|
112
113
|
variables?: {} | null;
|
|
@@ -315,12 +315,9 @@ class CacheInternal {
|
|
|
315
315
|
);
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
319
|
-
(field2) => typeof value[field2] === "undefined"
|
|
320
|
-
).length > 0;
|
|
321
318
|
let linkedID = null;
|
|
322
319
|
if (value !== null) {
|
|
323
|
-
linkedID = !
|
|
320
|
+
linkedID = !this.isEmbedded(linkedType, value) ? this.id(linkedType, value) : `${parent}.${key}`;
|
|
324
321
|
}
|
|
325
322
|
let linkChange = linkedID !== previousValue;
|
|
326
323
|
layer.writeLink(parent, key, linkedID);
|
|
@@ -692,6 +689,10 @@ class CacheInternal {
|
|
|
692
689
|
computeID(type, data) {
|
|
693
690
|
return computeID(this.config, type, data);
|
|
694
691
|
}
|
|
692
|
+
isEmbedded(linkedType, value) {
|
|
693
|
+
const idFields = this.idFields(linkedType);
|
|
694
|
+
return idFields.length === 0 || idFields.filter((field) => typeof value[field] === "undefined").length > 0;
|
|
695
|
+
}
|
|
695
696
|
hydrateNestedList({
|
|
696
697
|
fields,
|
|
697
698
|
variables,
|
|
@@ -799,9 +800,6 @@ class CacheInternal {
|
|
|
799
800
|
}
|
|
800
801
|
const entryObj = entry;
|
|
801
802
|
let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
|
|
802
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
803
|
-
(field) => typeof entry[field] === "undefined"
|
|
804
|
-
).length > 0;
|
|
805
803
|
let innerType = linkedType;
|
|
806
804
|
const typename = entryObj.__typename;
|
|
807
805
|
if (typename) {
|
|
@@ -809,7 +807,7 @@ class CacheInternal {
|
|
|
809
807
|
} else if (abstract) {
|
|
810
808
|
throw new Error("Encountered interface type without __typename in the payload");
|
|
811
809
|
}
|
|
812
|
-
if (!
|
|
810
|
+
if (!this.isEmbedded(linkedType, entry)) {
|
|
813
811
|
const id = this.id(innerType, entry);
|
|
814
812
|
if (id) {
|
|
815
813
|
linkedID = id;
|
package/build/test-cjs/index.js
CHANGED
|
@@ -56179,12 +56179,9 @@ var CacheInternal = class {
|
|
|
56179
56179
|
);
|
|
56180
56180
|
}
|
|
56181
56181
|
}
|
|
56182
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
56183
|
-
(field2) => typeof value[field2] === "undefined"
|
|
56184
|
-
).length > 0;
|
|
56185
56182
|
let linkedID = null;
|
|
56186
56183
|
if (value !== null) {
|
|
56187
|
-
linkedID = !
|
|
56184
|
+
linkedID = !this.isEmbedded(linkedType, value) ? this.id(linkedType, value) : `${parent2}.${key}`;
|
|
56188
56185
|
}
|
|
56189
56186
|
let linkChange = linkedID !== previousValue;
|
|
56190
56187
|
layer.writeLink(parent2, key, linkedID);
|
|
@@ -56556,6 +56553,10 @@ var CacheInternal = class {
|
|
|
56556
56553
|
computeID(type, data) {
|
|
56557
56554
|
return computeID(this.config, type, data);
|
|
56558
56555
|
}
|
|
56556
|
+
isEmbedded(linkedType, value) {
|
|
56557
|
+
const idFields = this.idFields(linkedType);
|
|
56558
|
+
return idFields.length === 0 || idFields.filter((field) => typeof value[field] === "undefined").length > 0;
|
|
56559
|
+
}
|
|
56559
56560
|
hydrateNestedList({
|
|
56560
56561
|
fields,
|
|
56561
56562
|
variables,
|
|
@@ -56663,9 +56664,6 @@ var CacheInternal = class {
|
|
|
56663
56664
|
}
|
|
56664
56665
|
const entryObj = entry;
|
|
56665
56666
|
let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
|
|
56666
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
56667
|
-
(field) => typeof entry[field] === "undefined"
|
|
56668
|
-
).length > 0;
|
|
56669
56667
|
let innerType = linkedType;
|
|
56670
56668
|
const typename = entryObj.__typename;
|
|
56671
56669
|
if (typename) {
|
|
@@ -56673,7 +56671,7 @@ var CacheInternal = class {
|
|
|
56673
56671
|
} else if (abstract) {
|
|
56674
56672
|
throw new Error("Encountered interface type without __typename in the payload");
|
|
56675
56673
|
}
|
|
56676
|
-
if (!
|
|
56674
|
+
if (!this.isEmbedded(linkedType, entry)) {
|
|
56677
56675
|
const id = this.id(innerType, entry);
|
|
56678
56676
|
if (id) {
|
|
56679
56677
|
linkedID = id;
|
package/build/test-esm/index.js
CHANGED
|
@@ -56175,12 +56175,9 @@ var CacheInternal = class {
|
|
|
56175
56175
|
);
|
|
56176
56176
|
}
|
|
56177
56177
|
}
|
|
56178
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
56179
|
-
(field2) => typeof value[field2] === "undefined"
|
|
56180
|
-
).length > 0;
|
|
56181
56178
|
let linkedID = null;
|
|
56182
56179
|
if (value !== null) {
|
|
56183
|
-
linkedID = !
|
|
56180
|
+
linkedID = !this.isEmbedded(linkedType, value) ? this.id(linkedType, value) : `${parent2}.${key}`;
|
|
56184
56181
|
}
|
|
56185
56182
|
let linkChange = linkedID !== previousValue;
|
|
56186
56183
|
layer.writeLink(parent2, key, linkedID);
|
|
@@ -56552,6 +56549,10 @@ var CacheInternal = class {
|
|
|
56552
56549
|
computeID(type, data) {
|
|
56553
56550
|
return computeID(this.config, type, data);
|
|
56554
56551
|
}
|
|
56552
|
+
isEmbedded(linkedType, value) {
|
|
56553
|
+
const idFields = this.idFields(linkedType);
|
|
56554
|
+
return idFields.length === 0 || idFields.filter((field) => typeof value[field] === "undefined").length > 0;
|
|
56555
|
+
}
|
|
56555
56556
|
hydrateNestedList({
|
|
56556
56557
|
fields,
|
|
56557
56558
|
variables,
|
|
@@ -56659,9 +56660,6 @@ var CacheInternal = class {
|
|
|
56659
56660
|
}
|
|
56660
56661
|
const entryObj = entry;
|
|
56661
56662
|
let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
|
|
56662
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
56663
|
-
(field) => typeof entry[field] === "undefined"
|
|
56664
|
-
).length > 0;
|
|
56665
56663
|
let innerType = linkedType;
|
|
56666
56664
|
const typename = entryObj.__typename;
|
|
56667
56665
|
if (typename) {
|
|
@@ -56669,7 +56667,7 @@ var CacheInternal = class {
|
|
|
56669
56667
|
} else if (abstract) {
|
|
56670
56668
|
throw new Error("Encountered interface type without __typename in the payload");
|
|
56671
56669
|
}
|
|
56672
|
-
if (!
|
|
56670
|
+
if (!this.isEmbedded(linkedType, entry)) {
|
|
56673
56671
|
const id = this.id(innerType, entry);
|
|
56674
56672
|
if (id) {
|
|
56675
56673
|
linkedID = id;
|
package/build/vite-cjs/index.js
CHANGED
|
@@ -68562,12 +68562,9 @@ var CacheInternal = class {
|
|
|
68562
68562
|
);
|
|
68563
68563
|
}
|
|
68564
68564
|
}
|
|
68565
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
68566
|
-
(field2) => typeof value[field2] === "undefined"
|
|
68567
|
-
).length > 0;
|
|
68568
68565
|
let linkedID = null;
|
|
68569
68566
|
if (value !== null) {
|
|
68570
|
-
linkedID = !
|
|
68567
|
+
linkedID = !this.isEmbedded(linkedType, value) ? this.id(linkedType, value) : `${parent2}.${key}`;
|
|
68571
68568
|
}
|
|
68572
68569
|
let linkChange = linkedID !== previousValue;
|
|
68573
68570
|
layer.writeLink(parent2, key, linkedID);
|
|
@@ -68939,6 +68936,10 @@ var CacheInternal = class {
|
|
|
68939
68936
|
computeID(type, data) {
|
|
68940
68937
|
return computeID(this.config, type, data);
|
|
68941
68938
|
}
|
|
68939
|
+
isEmbedded(linkedType, value) {
|
|
68940
|
+
const idFields = this.idFields(linkedType);
|
|
68941
|
+
return idFields.length === 0 || idFields.filter((field) => typeof value[field] === "undefined").length > 0;
|
|
68942
|
+
}
|
|
68942
68943
|
hydrateNestedList({
|
|
68943
68944
|
fields,
|
|
68944
68945
|
variables,
|
|
@@ -69046,9 +69047,6 @@ var CacheInternal = class {
|
|
|
69046
69047
|
}
|
|
69047
69048
|
const entryObj = entry;
|
|
69048
69049
|
let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
|
|
69049
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
69050
|
-
(field) => typeof entry[field] === "undefined"
|
|
69051
|
-
).length > 0;
|
|
69052
69050
|
let innerType = linkedType;
|
|
69053
69051
|
const typename = entryObj.__typename;
|
|
69054
69052
|
if (typename) {
|
|
@@ -69056,7 +69054,7 @@ var CacheInternal = class {
|
|
|
69056
69054
|
} else if (abstract) {
|
|
69057
69055
|
throw new Error("Encountered interface type without __typename in the payload");
|
|
69058
69056
|
}
|
|
69059
|
-
if (!
|
|
69057
|
+
if (!this.isEmbedded(linkedType, entry)) {
|
|
69060
69058
|
const id = this.id(innerType, entry);
|
|
69061
69059
|
if (id) {
|
|
69062
69060
|
linkedID = id;
|
package/build/vite-esm/index.js
CHANGED
|
@@ -68557,12 +68557,9 @@ var CacheInternal = class {
|
|
|
68557
68557
|
);
|
|
68558
68558
|
}
|
|
68559
68559
|
}
|
|
68560
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
68561
|
-
(field2) => typeof value[field2] === "undefined"
|
|
68562
|
-
).length > 0;
|
|
68563
68560
|
let linkedID = null;
|
|
68564
68561
|
if (value !== null) {
|
|
68565
|
-
linkedID = !
|
|
68562
|
+
linkedID = !this.isEmbedded(linkedType, value) ? this.id(linkedType, value) : `${parent2}.${key}`;
|
|
68566
68563
|
}
|
|
68567
68564
|
let linkChange = linkedID !== previousValue;
|
|
68568
68565
|
layer.writeLink(parent2, key, linkedID);
|
|
@@ -68934,6 +68931,10 @@ var CacheInternal = class {
|
|
|
68934
68931
|
computeID(type, data) {
|
|
68935
68932
|
return computeID(this.config, type, data);
|
|
68936
68933
|
}
|
|
68934
|
+
isEmbedded(linkedType, value) {
|
|
68935
|
+
const idFields = this.idFields(linkedType);
|
|
68936
|
+
return idFields.length === 0 || idFields.filter((field) => typeof value[field] === "undefined").length > 0;
|
|
68937
|
+
}
|
|
68937
68938
|
hydrateNestedList({
|
|
68938
68939
|
fields,
|
|
68939
68940
|
variables,
|
|
@@ -69041,9 +69042,6 @@ var CacheInternal = class {
|
|
|
69041
69042
|
}
|
|
69042
69043
|
const entryObj = entry;
|
|
69043
69044
|
let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
|
|
69044
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
69045
|
-
(field) => typeof entry[field] === "undefined"
|
|
69046
|
-
).length > 0;
|
|
69047
69045
|
let innerType = linkedType;
|
|
69048
69046
|
const typename = entryObj.__typename;
|
|
69049
69047
|
if (typename) {
|
|
@@ -69051,7 +69049,7 @@ var CacheInternal = class {
|
|
|
69051
69049
|
} else if (abstract) {
|
|
69052
69050
|
throw new Error("Encountered interface type without __typename in the payload");
|
|
69053
69051
|
}
|
|
69054
|
-
if (!
|
|
69052
|
+
if (!this.isEmbedded(linkedType, entry)) {
|
|
69055
69053
|
const id = this.id(innerType, entry);
|
|
69056
69054
|
if (id) {
|
|
69057
69055
|
linkedID = id;
|