houdini-svelte 1.2.6-next.0 → 1.2.7
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/plugin-cjs/index.js +17 -21
- package/build/plugin-esm/index.js +17 -21
- package/build/preprocess-cjs/index.js +22 -22
- package/build/preprocess-esm/index.js +22 -22
- package/build/runtime/index.d.ts +1 -0
- package/build/runtime-cjs/index.d.ts +1 -0
- package/build/runtime-cjs/index.js +1 -0
- package/build/runtime-esm/index.d.ts +1 -0
- package/build/runtime-esm/index.js +1 -0
- package/build/test-cjs/index.js +130 -100
- package/build/test-esm/index.js +130 -100
- package/package.json +2 -2
|
@@ -84573,11 +84573,11 @@ var require_esprima2 = __commonJS2({
|
|
|
84573
84573
|
case "}":
|
|
84574
84574
|
regex2 = false;
|
|
84575
84575
|
if (this.values[this.curly - 3] === "function") {
|
|
84576
|
-
var
|
|
84577
|
-
regex2 =
|
|
84576
|
+
var check = this.values[this.curly - 4];
|
|
84577
|
+
regex2 = check ? !this.beforeFunctionExpression(check) : false;
|
|
84578
84578
|
} else if (this.values[this.curly - 4] === "function") {
|
|
84579
|
-
var
|
|
84580
|
-
regex2 =
|
|
84579
|
+
var check = this.values[this.curly - 5];
|
|
84580
|
+
regex2 = check ? !this.beforeFunctionExpression(check) : true;
|
|
84581
84581
|
}
|
|
84582
84582
|
break;
|
|
84583
84583
|
default:
|
|
@@ -91965,12 +91965,9 @@ var CacheInternal = class {
|
|
|
91965
91965
|
);
|
|
91966
91966
|
}
|
|
91967
91967
|
}
|
|
91968
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
91969
|
-
(field2) => typeof value2[field2] === "undefined"
|
|
91970
|
-
).length > 0;
|
|
91971
91968
|
let linkedID = null;
|
|
91972
91969
|
if (value2 !== null) {
|
|
91973
|
-
linkedID = !
|
|
91970
|
+
linkedID = !this.isEmbedded(linkedType, value2) ? this.id(linkedType, value2) : `${parent2}.${key}`;
|
|
91974
91971
|
}
|
|
91975
91972
|
let linkChange = linkedID !== previousValue;
|
|
91976
91973
|
layer.writeLink(parent2, key, linkedID);
|
|
@@ -92342,6 +92339,10 @@ var CacheInternal = class {
|
|
|
92342
92339
|
computeID(type, data2) {
|
|
92343
92340
|
return computeID(this.config, type, data2);
|
|
92344
92341
|
}
|
|
92342
|
+
isEmbedded(linkedType, value2) {
|
|
92343
|
+
const idFields = this.idFields(linkedType);
|
|
92344
|
+
return idFields.length === 0 || idFields.filter((field) => typeof value2[field] === "undefined").length > 0;
|
|
92345
|
+
}
|
|
92345
92346
|
hydrateNestedList({
|
|
92346
92347
|
fields,
|
|
92347
92348
|
variables,
|
|
@@ -92449,9 +92450,6 @@ var CacheInternal = class {
|
|
|
92449
92450
|
}
|
|
92450
92451
|
const entryObj = entry;
|
|
92451
92452
|
let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
|
|
92452
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
92453
|
-
(field) => typeof entry[field] === "undefined"
|
|
92454
|
-
).length > 0;
|
|
92455
92453
|
let innerType = linkedType;
|
|
92456
92454
|
const typename = entryObj.__typename;
|
|
92457
92455
|
if (typename) {
|
|
@@ -92459,7 +92457,7 @@ var CacheInternal = class {
|
|
|
92459
92457
|
} else if (abstract) {
|
|
92460
92458
|
throw new Error("Encountered interface type without __typename in the payload");
|
|
92461
92459
|
}
|
|
92462
|
-
if (!
|
|
92460
|
+
if (!this.isEmbedded(linkedType, entry)) {
|
|
92463
92461
|
const id2 = this.id(innerType, entry);
|
|
92464
92462
|
if (id2) {
|
|
92465
92463
|
linkedID = id2;
|
|
@@ -157456,12 +157454,9 @@ var CacheInternal2 = class {
|
|
|
157456
157454
|
);
|
|
157457
157455
|
}
|
|
157458
157456
|
}
|
|
157459
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
157460
|
-
(field2) => typeof value2[field2] === "undefined"
|
|
157461
|
-
).length > 0;
|
|
157462
157457
|
let linkedID = null;
|
|
157463
157458
|
if (value2 !== null) {
|
|
157464
|
-
linkedID = !
|
|
157459
|
+
linkedID = !this.isEmbedded(linkedType, value2) ? this.id(linkedType, value2) : `${parent2}.${key}`;
|
|
157465
157460
|
}
|
|
157466
157461
|
let linkChange = linkedID !== previousValue;
|
|
157467
157462
|
layer.writeLink(parent2, key, linkedID);
|
|
@@ -157833,6 +157828,10 @@ var CacheInternal2 = class {
|
|
|
157833
157828
|
computeID(type, data2) {
|
|
157834
157829
|
return computeID2(this.config, type, data2);
|
|
157835
157830
|
}
|
|
157831
|
+
isEmbedded(linkedType, value2) {
|
|
157832
|
+
const idFields = this.idFields(linkedType);
|
|
157833
|
+
return idFields.length === 0 || idFields.filter((field) => typeof value2[field] === "undefined").length > 0;
|
|
157834
|
+
}
|
|
157836
157835
|
hydrateNestedList({
|
|
157837
157836
|
fields,
|
|
157838
157837
|
variables,
|
|
@@ -157940,9 +157939,6 @@ var CacheInternal2 = class {
|
|
|
157940
157939
|
}
|
|
157941
157940
|
const entryObj = entry;
|
|
157942
157941
|
let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
|
|
157943
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
157944
|
-
(field) => typeof entry[field] === "undefined"
|
|
157945
|
-
).length > 0;
|
|
157946
157942
|
let innerType = linkedType;
|
|
157947
157943
|
const typename = entryObj.__typename;
|
|
157948
157944
|
if (typename) {
|
|
@@ -157950,7 +157946,7 @@ var CacheInternal2 = class {
|
|
|
157950
157946
|
} else if (abstract) {
|
|
157951
157947
|
throw new Error("Encountered interface type without __typename in the payload");
|
|
157952
157948
|
}
|
|
157953
|
-
if (!
|
|
157949
|
+
if (!this.isEmbedded(linkedType, entry)) {
|
|
157954
157950
|
const id2 = this.id(innerType, entry);
|
|
157955
157951
|
if (id2) {
|
|
157956
157952
|
linkedID = id2;
|
|
@@ -188553,7 +188549,7 @@ export const redirect = svelteKitRedirect
|
|
|
188553
188549
|
schema({ config: config4 }) {
|
|
188554
188550
|
return `
|
|
188555
188551
|
"""
|
|
188556
|
-
@${config4.loadDirective} is used to
|
|
188552
|
+
@${config4.loadDirective} is used to enable automatic fetch on inline queries.
|
|
188557
188553
|
"""
|
|
188558
188554
|
directive @${config4.loadDirective} on QUERY
|
|
188559
188555
|
|
|
@@ -84564,11 +84564,11 @@ var require_esprima2 = __commonJS2({
|
|
|
84564
84564
|
case "}":
|
|
84565
84565
|
regex2 = false;
|
|
84566
84566
|
if (this.values[this.curly - 3] === "function") {
|
|
84567
|
-
var
|
|
84568
|
-
regex2 =
|
|
84567
|
+
var check = this.values[this.curly - 4];
|
|
84568
|
+
regex2 = check ? !this.beforeFunctionExpression(check) : false;
|
|
84569
84569
|
} else if (this.values[this.curly - 4] === "function") {
|
|
84570
|
-
var
|
|
84571
|
-
regex2 =
|
|
84570
|
+
var check = this.values[this.curly - 5];
|
|
84571
|
+
regex2 = check ? !this.beforeFunctionExpression(check) : true;
|
|
84572
84572
|
}
|
|
84573
84573
|
break;
|
|
84574
84574
|
default:
|
|
@@ -91956,12 +91956,9 @@ var CacheInternal = class {
|
|
|
91956
91956
|
);
|
|
91957
91957
|
}
|
|
91958
91958
|
}
|
|
91959
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
91960
|
-
(field2) => typeof value2[field2] === "undefined"
|
|
91961
|
-
).length > 0;
|
|
91962
91959
|
let linkedID = null;
|
|
91963
91960
|
if (value2 !== null) {
|
|
91964
|
-
linkedID = !
|
|
91961
|
+
linkedID = !this.isEmbedded(linkedType, value2) ? this.id(linkedType, value2) : `${parent2}.${key}`;
|
|
91965
91962
|
}
|
|
91966
91963
|
let linkChange = linkedID !== previousValue;
|
|
91967
91964
|
layer.writeLink(parent2, key, linkedID);
|
|
@@ -92333,6 +92330,10 @@ var CacheInternal = class {
|
|
|
92333
92330
|
computeID(type, data2) {
|
|
92334
92331
|
return computeID(this.config, type, data2);
|
|
92335
92332
|
}
|
|
92333
|
+
isEmbedded(linkedType, value2) {
|
|
92334
|
+
const idFields = this.idFields(linkedType);
|
|
92335
|
+
return idFields.length === 0 || idFields.filter((field) => typeof value2[field] === "undefined").length > 0;
|
|
92336
|
+
}
|
|
92336
92337
|
hydrateNestedList({
|
|
92337
92338
|
fields,
|
|
92338
92339
|
variables,
|
|
@@ -92440,9 +92441,6 @@ var CacheInternal = class {
|
|
|
92440
92441
|
}
|
|
92441
92442
|
const entryObj = entry;
|
|
92442
92443
|
let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
|
|
92443
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
92444
|
-
(field) => typeof entry[field] === "undefined"
|
|
92445
|
-
).length > 0;
|
|
92446
92444
|
let innerType = linkedType;
|
|
92447
92445
|
const typename = entryObj.__typename;
|
|
92448
92446
|
if (typename) {
|
|
@@ -92450,7 +92448,7 @@ var CacheInternal = class {
|
|
|
92450
92448
|
} else if (abstract) {
|
|
92451
92449
|
throw new Error("Encountered interface type without __typename in the payload");
|
|
92452
92450
|
}
|
|
92453
|
-
if (!
|
|
92451
|
+
if (!this.isEmbedded(linkedType, entry)) {
|
|
92454
92452
|
const id2 = this.id(innerType, entry);
|
|
92455
92453
|
if (id2) {
|
|
92456
92454
|
linkedID = id2;
|
|
@@ -157446,12 +157444,9 @@ var CacheInternal2 = class {
|
|
|
157446
157444
|
);
|
|
157447
157445
|
}
|
|
157448
157446
|
}
|
|
157449
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
157450
|
-
(field2) => typeof value2[field2] === "undefined"
|
|
157451
|
-
).length > 0;
|
|
157452
157447
|
let linkedID = null;
|
|
157453
157448
|
if (value2 !== null) {
|
|
157454
|
-
linkedID = !
|
|
157449
|
+
linkedID = !this.isEmbedded(linkedType, value2) ? this.id(linkedType, value2) : `${parent2}.${key}`;
|
|
157455
157450
|
}
|
|
157456
157451
|
let linkChange = linkedID !== previousValue;
|
|
157457
157452
|
layer.writeLink(parent2, key, linkedID);
|
|
@@ -157823,6 +157818,10 @@ var CacheInternal2 = class {
|
|
|
157823
157818
|
computeID(type, data2) {
|
|
157824
157819
|
return computeID2(this.config, type, data2);
|
|
157825
157820
|
}
|
|
157821
|
+
isEmbedded(linkedType, value2) {
|
|
157822
|
+
const idFields = this.idFields(linkedType);
|
|
157823
|
+
return idFields.length === 0 || idFields.filter((field) => typeof value2[field] === "undefined").length > 0;
|
|
157824
|
+
}
|
|
157826
157825
|
hydrateNestedList({
|
|
157827
157826
|
fields,
|
|
157828
157827
|
variables,
|
|
@@ -157930,9 +157929,6 @@ var CacheInternal2 = class {
|
|
|
157930
157929
|
}
|
|
157931
157930
|
const entryObj = entry;
|
|
157932
157931
|
let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
|
|
157933
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
157934
|
-
(field) => typeof entry[field] === "undefined"
|
|
157935
|
-
).length > 0;
|
|
157936
157932
|
let innerType = linkedType;
|
|
157937
157933
|
const typename = entryObj.__typename;
|
|
157938
157934
|
if (typename) {
|
|
@@ -157940,7 +157936,7 @@ var CacheInternal2 = class {
|
|
|
157940
157936
|
} else if (abstract) {
|
|
157941
157937
|
throw new Error("Encountered interface type without __typename in the payload");
|
|
157942
157938
|
}
|
|
157943
|
-
if (!
|
|
157939
|
+
if (!this.isEmbedded(linkedType, entry)) {
|
|
157944
157940
|
const id2 = this.id(innerType, entry);
|
|
157945
157941
|
if (id2) {
|
|
157946
157942
|
linkedID = id2;
|
|
@@ -188543,7 +188539,7 @@ export const redirect = svelteKitRedirect
|
|
|
188543
188539
|
schema({ config: config4 }) {
|
|
188544
188540
|
return `
|
|
188545
188541
|
"""
|
|
188546
|
-
@${config4.loadDirective} is used to
|
|
188542
|
+
@${config4.loadDirective} is used to enable automatic fetch on inline queries.
|
|
188547
188543
|
"""
|
|
188548
188544
|
directive @${config4.loadDirective} on QUERY
|
|
188549
188545
|
|
|
@@ -84577,11 +84577,11 @@ var require_esprima2 = __commonJS2({
|
|
|
84577
84577
|
case "}":
|
|
84578
84578
|
regex2 = false;
|
|
84579
84579
|
if (this.values[this.curly - 3] === "function") {
|
|
84580
|
-
var
|
|
84581
|
-
regex2 =
|
|
84580
|
+
var check = this.values[this.curly - 4];
|
|
84581
|
+
regex2 = check ? !this.beforeFunctionExpression(check) : false;
|
|
84582
84582
|
} else if (this.values[this.curly - 4] === "function") {
|
|
84583
|
-
var
|
|
84584
|
-
regex2 =
|
|
84583
|
+
var check = this.values[this.curly - 5];
|
|
84584
|
+
regex2 = check ? !this.beforeFunctionExpression(check) : true;
|
|
84585
84585
|
}
|
|
84586
84586
|
break;
|
|
84587
84587
|
default:
|
|
@@ -95265,12 +95265,9 @@ var CacheInternal = class {
|
|
|
95265
95265
|
);
|
|
95266
95266
|
}
|
|
95267
95267
|
}
|
|
95268
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
95269
|
-
(field2) => typeof value2[field2] === "undefined"
|
|
95270
|
-
).length > 0;
|
|
95271
95268
|
let linkedID = null;
|
|
95272
95269
|
if (value2 !== null) {
|
|
95273
|
-
linkedID = !
|
|
95270
|
+
linkedID = !this.isEmbedded(linkedType, value2) ? this.id(linkedType, value2) : `${parent2}.${key}`;
|
|
95274
95271
|
}
|
|
95275
95272
|
let linkChange = linkedID !== previousValue;
|
|
95276
95273
|
layer.writeLink(parent2, key, linkedID);
|
|
@@ -95642,6 +95639,10 @@ var CacheInternal = class {
|
|
|
95642
95639
|
computeID(type, data2) {
|
|
95643
95640
|
return computeID(this.config, type, data2);
|
|
95644
95641
|
}
|
|
95642
|
+
isEmbedded(linkedType, value2) {
|
|
95643
|
+
const idFields = this.idFields(linkedType);
|
|
95644
|
+
return idFields.length === 0 || idFields.filter((field) => typeof value2[field] === "undefined").length > 0;
|
|
95645
|
+
}
|
|
95645
95646
|
hydrateNestedList({
|
|
95646
95647
|
fields,
|
|
95647
95648
|
variables,
|
|
@@ -95749,9 +95750,6 @@ var CacheInternal = class {
|
|
|
95749
95750
|
}
|
|
95750
95751
|
const entryObj = entry;
|
|
95751
95752
|
let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
|
|
95752
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
95753
|
-
(field) => typeof entry[field] === "undefined"
|
|
95754
|
-
).length > 0;
|
|
95755
95753
|
let innerType = linkedType;
|
|
95756
95754
|
const typename = entryObj.__typename;
|
|
95757
95755
|
if (typename) {
|
|
@@ -95759,7 +95757,7 @@ var CacheInternal = class {
|
|
|
95759
95757
|
} else if (abstract) {
|
|
95760
95758
|
throw new Error("Encountered interface type without __typename in the payload");
|
|
95761
95759
|
}
|
|
95762
|
-
if (!
|
|
95760
|
+
if (!this.isEmbedded(linkedType, entry)) {
|
|
95763
95761
|
const id2 = this.id(innerType, entry);
|
|
95764
95762
|
if (id2) {
|
|
95765
95763
|
linkedID = id2;
|
|
@@ -96026,7 +96024,7 @@ var Config = class {
|
|
|
96026
96024
|
projectRoot;
|
|
96027
96025
|
schema;
|
|
96028
96026
|
schemaPath;
|
|
96029
|
-
|
|
96027
|
+
persistedQueriesPath = "./$houdini/persisted_queries.json";
|
|
96030
96028
|
exclude;
|
|
96031
96029
|
scalars;
|
|
96032
96030
|
module = "esm";
|
|
@@ -96078,7 +96076,8 @@ var Config = class {
|
|
|
96078
96076
|
logLevel,
|
|
96079
96077
|
defaultFragmentMasking = "enable",
|
|
96080
96078
|
watchSchema,
|
|
96081
|
-
projectDir
|
|
96079
|
+
projectDir,
|
|
96080
|
+
persistedQueriesPath
|
|
96082
96081
|
} = this.configFile;
|
|
96083
96082
|
if (typeof schema === "string") {
|
|
96084
96083
|
this.schema = graphql2.buildSchema(schema);
|
|
@@ -96115,6 +96114,9 @@ var Config = class {
|
|
|
96115
96114
|
this.schemaPollHeaders = watchSchema?.headers ?? {};
|
|
96116
96115
|
this.rootDir = join2(this.projectRoot, "$houdini");
|
|
96117
96116
|
this.#fragmentVariableMaps = {};
|
|
96117
|
+
if (persistedQueriesPath) {
|
|
96118
|
+
this.persistedQueriesPath = persistedQueriesPath;
|
|
96119
|
+
}
|
|
96118
96120
|
if (defaultKeys) {
|
|
96119
96121
|
this.defaultKeys = defaultKeys;
|
|
96120
96122
|
}
|
|
@@ -189081,12 +189083,9 @@ var CacheInternal2 = class {
|
|
|
189081
189083
|
);
|
|
189082
189084
|
}
|
|
189083
189085
|
}
|
|
189084
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
189085
|
-
(field2) => typeof value2[field2] === "undefined"
|
|
189086
|
-
).length > 0;
|
|
189087
189086
|
let linkedID = null;
|
|
189088
189087
|
if (value2 !== null) {
|
|
189089
|
-
linkedID = !
|
|
189088
|
+
linkedID = !this.isEmbedded(linkedType, value2) ? this.id(linkedType, value2) : `${parent2}.${key}`;
|
|
189090
189089
|
}
|
|
189091
189090
|
let linkChange = linkedID !== previousValue;
|
|
189092
189091
|
layer.writeLink(parent2, key, linkedID);
|
|
@@ -189458,6 +189457,10 @@ var CacheInternal2 = class {
|
|
|
189458
189457
|
computeID(type, data2) {
|
|
189459
189458
|
return computeID2(this.config, type, data2);
|
|
189460
189459
|
}
|
|
189460
|
+
isEmbedded(linkedType, value2) {
|
|
189461
|
+
const idFields = this.idFields(linkedType);
|
|
189462
|
+
return idFields.length === 0 || idFields.filter((field) => typeof value2[field] === "undefined").length > 0;
|
|
189463
|
+
}
|
|
189461
189464
|
hydrateNestedList({
|
|
189462
189465
|
fields,
|
|
189463
189466
|
variables,
|
|
@@ -189565,9 +189568,6 @@ var CacheInternal2 = class {
|
|
|
189565
189568
|
}
|
|
189566
189569
|
const entryObj = entry;
|
|
189567
189570
|
let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
|
|
189568
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
189569
|
-
(field) => typeof entry[field] === "undefined"
|
|
189570
|
-
).length > 0;
|
|
189571
189571
|
let innerType = linkedType;
|
|
189572
189572
|
const typename = entryObj.__typename;
|
|
189573
189573
|
if (typename) {
|
|
@@ -189575,7 +189575,7 @@ var CacheInternal2 = class {
|
|
|
189575
189575
|
} else if (abstract) {
|
|
189576
189576
|
throw new Error("Encountered interface type without __typename in the payload");
|
|
189577
189577
|
}
|
|
189578
|
-
if (!
|
|
189578
|
+
if (!this.isEmbedded(linkedType, entry)) {
|
|
189579
189579
|
const id2 = this.id(innerType, entry);
|
|
189580
189580
|
if (id2) {
|
|
189581
189581
|
linkedID = id2;
|
|
@@ -84570,11 +84570,11 @@ var require_esprima2 = __commonJS2({
|
|
|
84570
84570
|
case "}":
|
|
84571
84571
|
regex2 = false;
|
|
84572
84572
|
if (this.values[this.curly - 3] === "function") {
|
|
84573
|
-
var
|
|
84574
|
-
regex2 =
|
|
84573
|
+
var check = this.values[this.curly - 4];
|
|
84574
|
+
regex2 = check ? !this.beforeFunctionExpression(check) : false;
|
|
84575
84575
|
} else if (this.values[this.curly - 4] === "function") {
|
|
84576
|
-
var
|
|
84577
|
-
regex2 =
|
|
84576
|
+
var check = this.values[this.curly - 5];
|
|
84577
|
+
regex2 = check ? !this.beforeFunctionExpression(check) : true;
|
|
84578
84578
|
}
|
|
84579
84579
|
break;
|
|
84580
84580
|
default:
|
|
@@ -95258,12 +95258,9 @@ var CacheInternal = class {
|
|
|
95258
95258
|
);
|
|
95259
95259
|
}
|
|
95260
95260
|
}
|
|
95261
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
95262
|
-
(field2) => typeof value2[field2] === "undefined"
|
|
95263
|
-
).length > 0;
|
|
95264
95261
|
let linkedID = null;
|
|
95265
95262
|
if (value2 !== null) {
|
|
95266
|
-
linkedID = !
|
|
95263
|
+
linkedID = !this.isEmbedded(linkedType, value2) ? this.id(linkedType, value2) : `${parent2}.${key}`;
|
|
95267
95264
|
}
|
|
95268
95265
|
let linkChange = linkedID !== previousValue;
|
|
95269
95266
|
layer.writeLink(parent2, key, linkedID);
|
|
@@ -95635,6 +95632,10 @@ var CacheInternal = class {
|
|
|
95635
95632
|
computeID(type, data2) {
|
|
95636
95633
|
return computeID(this.config, type, data2);
|
|
95637
95634
|
}
|
|
95635
|
+
isEmbedded(linkedType, value2) {
|
|
95636
|
+
const idFields = this.idFields(linkedType);
|
|
95637
|
+
return idFields.length === 0 || idFields.filter((field) => typeof value2[field] === "undefined").length > 0;
|
|
95638
|
+
}
|
|
95638
95639
|
hydrateNestedList({
|
|
95639
95640
|
fields,
|
|
95640
95641
|
variables,
|
|
@@ -95742,9 +95743,6 @@ var CacheInternal = class {
|
|
|
95742
95743
|
}
|
|
95743
95744
|
const entryObj = entry;
|
|
95744
95745
|
let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
|
|
95745
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
95746
|
-
(field) => typeof entry[field] === "undefined"
|
|
95747
|
-
).length > 0;
|
|
95748
95746
|
let innerType = linkedType;
|
|
95749
95747
|
const typename = entryObj.__typename;
|
|
95750
95748
|
if (typename) {
|
|
@@ -95752,7 +95750,7 @@ var CacheInternal = class {
|
|
|
95752
95750
|
} else if (abstract) {
|
|
95753
95751
|
throw new Error("Encountered interface type without __typename in the payload");
|
|
95754
95752
|
}
|
|
95755
|
-
if (!
|
|
95753
|
+
if (!this.isEmbedded(linkedType, entry)) {
|
|
95756
95754
|
const id2 = this.id(innerType, entry);
|
|
95757
95755
|
if (id2) {
|
|
95758
95756
|
linkedID = id2;
|
|
@@ -96019,7 +96017,7 @@ var Config = class {
|
|
|
96019
96017
|
projectRoot;
|
|
96020
96018
|
schema;
|
|
96021
96019
|
schemaPath;
|
|
96022
|
-
|
|
96020
|
+
persistedQueriesPath = "./$houdini/persisted_queries.json";
|
|
96023
96021
|
exclude;
|
|
96024
96022
|
scalars;
|
|
96025
96023
|
module = "esm";
|
|
@@ -96071,7 +96069,8 @@ var Config = class {
|
|
|
96071
96069
|
logLevel,
|
|
96072
96070
|
defaultFragmentMasking = "enable",
|
|
96073
96071
|
watchSchema,
|
|
96074
|
-
projectDir
|
|
96072
|
+
projectDir,
|
|
96073
|
+
persistedQueriesPath
|
|
96075
96074
|
} = this.configFile;
|
|
96076
96075
|
if (typeof schema === "string") {
|
|
96077
96076
|
this.schema = graphql2.buildSchema(schema);
|
|
@@ -96108,6 +96107,9 @@ var Config = class {
|
|
|
96108
96107
|
this.schemaPollHeaders = watchSchema?.headers ?? {};
|
|
96109
96108
|
this.rootDir = join2(this.projectRoot, "$houdini");
|
|
96110
96109
|
this.#fragmentVariableMaps = {};
|
|
96110
|
+
if (persistedQueriesPath) {
|
|
96111
|
+
this.persistedQueriesPath = persistedQueriesPath;
|
|
96112
|
+
}
|
|
96111
96113
|
if (defaultKeys) {
|
|
96112
96114
|
this.defaultKeys = defaultKeys;
|
|
96113
96115
|
}
|
|
@@ -189073,12 +189075,9 @@ var CacheInternal2 = class {
|
|
|
189073
189075
|
);
|
|
189074
189076
|
}
|
|
189075
189077
|
}
|
|
189076
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
189077
|
-
(field2) => typeof value2[field2] === "undefined"
|
|
189078
|
-
).length > 0;
|
|
189079
189078
|
let linkedID = null;
|
|
189080
189079
|
if (value2 !== null) {
|
|
189081
|
-
linkedID = !
|
|
189080
|
+
linkedID = !this.isEmbedded(linkedType, value2) ? this.id(linkedType, value2) : `${parent2}.${key}`;
|
|
189082
189081
|
}
|
|
189083
189082
|
let linkChange = linkedID !== previousValue;
|
|
189084
189083
|
layer.writeLink(parent2, key, linkedID);
|
|
@@ -189450,6 +189449,10 @@ var CacheInternal2 = class {
|
|
|
189450
189449
|
computeID(type, data2) {
|
|
189451
189450
|
return computeID2(this.config, type, data2);
|
|
189452
189451
|
}
|
|
189452
|
+
isEmbedded(linkedType, value2) {
|
|
189453
|
+
const idFields = this.idFields(linkedType);
|
|
189454
|
+
return idFields.length === 0 || idFields.filter((field) => typeof value2[field] === "undefined").length > 0;
|
|
189455
|
+
}
|
|
189453
189456
|
hydrateNestedList({
|
|
189454
189457
|
fields,
|
|
189455
189458
|
variables,
|
|
@@ -189557,9 +189560,6 @@ var CacheInternal2 = class {
|
|
|
189557
189560
|
}
|
|
189558
189561
|
const entryObj = entry;
|
|
189559
189562
|
let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
|
|
189560
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
189561
|
-
(field) => typeof entry[field] === "undefined"
|
|
189562
|
-
).length > 0;
|
|
189563
189563
|
let innerType = linkedType;
|
|
189564
189564
|
const typename = entryObj.__typename;
|
|
189565
189565
|
if (typename) {
|
|
@@ -189567,7 +189567,7 @@ var CacheInternal2 = class {
|
|
|
189567
189567
|
} else if (abstract) {
|
|
189568
189568
|
throw new Error("Encountered interface type without __typename in the payload");
|
|
189569
189569
|
}
|
|
189570
|
-
if (!
|
|
189570
|
+
if (!this.isEmbedded(linkedType, entry)) {
|
|
189571
189571
|
const id2 = this.id(innerType, entry);
|
|
189572
189572
|
if (id2) {
|
|
189573
189573
|
linkedID = id2;
|
package/build/runtime/index.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ __reExport(runtime_exports, require("./adapter"), module.exports);
|
|
|
26
26
|
__reExport(runtime_exports, require("./stores"), module.exports);
|
|
27
27
|
__reExport(runtime_exports, require("./fragments"), module.exports);
|
|
28
28
|
__reExport(runtime_exports, require("./session"), module.exports);
|
|
29
|
+
__reExport(runtime_exports, require("./types"), module.exports);
|
|
29
30
|
async function loadAll(...loads) {
|
|
30
31
|
const promises = [];
|
|
31
32
|
const isPromise = (val) => "then" in val && "finally" in val && "catch" in val;
|
|
@@ -2,6 +2,7 @@ export * from "./adapter";
|
|
|
2
2
|
export * from "./stores";
|
|
3
3
|
export * from "./fragments";
|
|
4
4
|
export * from "./session";
|
|
5
|
+
export * from "./types";
|
|
5
6
|
async function loadAll(...loads) {
|
|
6
7
|
const promises = [];
|
|
7
8
|
const isPromise = (val) => "then" in val && "finally" in val && "catch" in val;
|