houdini-svelte 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.
@@ -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 = !embedded ? this.id(linkedType, value2) : `${parent2}.${key}`;
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 (!embedded) {
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 = !embedded ? this.id(linkedType, value2) : `${parent2}.${key}`;
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 (!embedded) {
157949
+ if (!this.isEmbedded(linkedType, entry)) {
157954
157950
  const id2 = this.id(innerType, entry);
157955
157951
  if (id2) {
157956
157952
  linkedID = id2;
@@ -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 = !embedded ? this.id(linkedType, value2) : `${parent2}.${key}`;
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 (!embedded) {
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 = !embedded ? this.id(linkedType, value2) : `${parent2}.${key}`;
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 (!embedded) {
157939
+ if (!this.isEmbedded(linkedType, entry)) {
157944
157940
  const id2 = this.id(innerType, entry);
157945
157941
  if (id2) {
157946
157942
  linkedID = id2;
@@ -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 = !embedded ? this.id(linkedType, value2) : `${parent2}.${key}`;
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 (!embedded) {
95760
+ if (!this.isEmbedded(linkedType, entry)) {
95763
95761
  const id2 = this.id(innerType, entry);
95764
95762
  if (id2) {
95765
95763
  linkedID = id2;
@@ -189081,12 +189079,9 @@ var CacheInternal2 = class {
189081
189079
  );
189082
189080
  }
189083
189081
  }
189084
- const embedded = this.idFields(linkedType)?.filter(
189085
- (field2) => typeof value2[field2] === "undefined"
189086
- ).length > 0;
189087
189082
  let linkedID = null;
189088
189083
  if (value2 !== null) {
189089
- linkedID = !embedded ? this.id(linkedType, value2) : `${parent2}.${key}`;
189084
+ linkedID = !this.isEmbedded(linkedType, value2) ? this.id(linkedType, value2) : `${parent2}.${key}`;
189090
189085
  }
189091
189086
  let linkChange = linkedID !== previousValue;
189092
189087
  layer.writeLink(parent2, key, linkedID);
@@ -189458,6 +189453,10 @@ var CacheInternal2 = class {
189458
189453
  computeID(type, data2) {
189459
189454
  return computeID2(this.config, type, data2);
189460
189455
  }
189456
+ isEmbedded(linkedType, value2) {
189457
+ const idFields = this.idFields(linkedType);
189458
+ return idFields.length === 0 || idFields.filter((field) => typeof value2[field] === "undefined").length > 0;
189459
+ }
189461
189460
  hydrateNestedList({
189462
189461
  fields,
189463
189462
  variables,
@@ -189565,9 +189564,6 @@ var CacheInternal2 = class {
189565
189564
  }
189566
189565
  const entryObj = entry;
189567
189566
  let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
189568
- const embedded = this.idFields(linkedType)?.filter(
189569
- (field) => typeof entry[field] === "undefined"
189570
- ).length > 0;
189571
189567
  let innerType = linkedType;
189572
189568
  const typename = entryObj.__typename;
189573
189569
  if (typename) {
@@ -189575,7 +189571,7 @@ var CacheInternal2 = class {
189575
189571
  } else if (abstract) {
189576
189572
  throw new Error("Encountered interface type without __typename in the payload");
189577
189573
  }
189578
- if (!embedded) {
189574
+ if (!this.isEmbedded(linkedType, entry)) {
189579
189575
  const id2 = this.id(innerType, entry);
189580
189576
  if (id2) {
189581
189577
  linkedID = id2;
@@ -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 = !embedded ? this.id(linkedType, value2) : `${parent2}.${key}`;
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 (!embedded) {
95753
+ if (!this.isEmbedded(linkedType, entry)) {
95756
95754
  const id2 = this.id(innerType, entry);
95757
95755
  if (id2) {
95758
95756
  linkedID = id2;
@@ -189073,12 +189071,9 @@ var CacheInternal2 = class {
189073
189071
  );
189074
189072
  }
189075
189073
  }
189076
- const embedded = this.idFields(linkedType)?.filter(
189077
- (field2) => typeof value2[field2] === "undefined"
189078
- ).length > 0;
189079
189074
  let linkedID = null;
189080
189075
  if (value2 !== null) {
189081
- linkedID = !embedded ? this.id(linkedType, value2) : `${parent2}.${key}`;
189076
+ linkedID = !this.isEmbedded(linkedType, value2) ? this.id(linkedType, value2) : `${parent2}.${key}`;
189082
189077
  }
189083
189078
  let linkChange = linkedID !== previousValue;
189084
189079
  layer.writeLink(parent2, key, linkedID);
@@ -189450,6 +189445,10 @@ var CacheInternal2 = class {
189450
189445
  computeID(type, data2) {
189451
189446
  return computeID2(this.config, type, data2);
189452
189447
  }
189448
+ isEmbedded(linkedType, value2) {
189449
+ const idFields = this.idFields(linkedType);
189450
+ return idFields.length === 0 || idFields.filter((field) => typeof value2[field] === "undefined").length > 0;
189451
+ }
189453
189452
  hydrateNestedList({
189454
189453
  fields,
189455
189454
  variables,
@@ -189557,9 +189556,6 @@ var CacheInternal2 = class {
189557
189556
  }
189558
189557
  const entryObj = entry;
189559
189558
  let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
189560
- const embedded = this.idFields(linkedType)?.filter(
189561
- (field) => typeof entry[field] === "undefined"
189562
- ).length > 0;
189563
189559
  let innerType = linkedType;
189564
189560
  const typename = entryObj.__typename;
189565
189561
  if (typename) {
@@ -189567,7 +189563,7 @@ var CacheInternal2 = class {
189567
189563
  } else if (abstract) {
189568
189564
  throw new Error("Encountered interface type without __typename in the payload");
189569
189565
  }
189570
- if (!embedded) {
189566
+ if (!this.isEmbedded(linkedType, entry)) {
189571
189567
  const id2 = this.id(innerType, entry);
189572
189568
  if (id2) {
189573
189569
  linkedID = id2;
@@ -3,6 +3,7 @@ export * from './adapter';
3
3
  export * from './stores';
4
4
  export * from './fragments';
5
5
  export * from './session';
6
+ export * from './types';
6
7
  type LoadResult = Promise<{
7
8
  [key: string]: QueryStore<any, {}>;
8
9
  }>;
@@ -3,6 +3,7 @@ export * from './adapter';
3
3
  export * from './stores';
4
4
  export * from './fragments';
5
5
  export * from './session';
6
+ export * from './types';
6
7
  type LoadResult = Promise<{
7
8
  [key: string]: QueryStore<any, {}>;
8
9
  }>;
@@ -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;
@@ -3,6 +3,7 @@ export * from './adapter';
3
3
  export * from './stores';
4
4
  export * from './fragments';
5
5
  export * from './session';
6
+ export * from './types';
6
7
  type LoadResult = Promise<{
7
8
  [key: string]: QueryStore<any, {}>;
8
9
  }>;
@@ -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;
@@ -91968,12 +91968,9 @@ var CacheInternal = class {
91968
91968
  );
91969
91969
  }
91970
91970
  }
91971
- const embedded = this.idFields(linkedType)?.filter(
91972
- (field2) => typeof value2[field2] === "undefined"
91973
- ).length > 0;
91974
91971
  let linkedID = null;
91975
91972
  if (value2 !== null) {
91976
- linkedID = !embedded ? this.id(linkedType, value2) : `${parent2}.${key}`;
91973
+ linkedID = !this.isEmbedded(linkedType, value2) ? this.id(linkedType, value2) : `${parent2}.${key}`;
91977
91974
  }
91978
91975
  let linkChange = linkedID !== previousValue;
91979
91976
  layer.writeLink(parent2, key, linkedID);
@@ -92345,6 +92342,10 @@ var CacheInternal = class {
92345
92342
  computeID(type, data2) {
92346
92343
  return computeID(this.config, type, data2);
92347
92344
  }
92345
+ isEmbedded(linkedType, value2) {
92346
+ const idFields = this.idFields(linkedType);
92347
+ return idFields.length === 0 || idFields.filter((field) => typeof value2[field] === "undefined").length > 0;
92348
+ }
92348
92349
  hydrateNestedList({
92349
92350
  fields,
92350
92351
  variables,
@@ -92452,9 +92453,6 @@ var CacheInternal = class {
92452
92453
  }
92453
92454
  const entryObj = entry;
92454
92455
  let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
92455
- const embedded = this.idFields(linkedType)?.filter(
92456
- (field) => typeof entry[field] === "undefined"
92457
- ).length > 0;
92458
92456
  let innerType = linkedType;
92459
92457
  const typename = entryObj.__typename;
92460
92458
  if (typename) {
@@ -92462,7 +92460,7 @@ var CacheInternal = class {
92462
92460
  } else if (abstract) {
92463
92461
  throw new Error("Encountered interface type without __typename in the payload");
92464
92462
  }
92465
- if (!embedded) {
92463
+ if (!this.isEmbedded(linkedType, entry)) {
92466
92464
  const id2 = this.id(innerType, entry);
92467
92465
  if (id2) {
92468
92466
  linkedID = id2;
@@ -148694,12 +148692,9 @@ var CacheInternal2 = class {
148694
148692
  );
148695
148693
  }
148696
148694
  }
148697
- const embedded = this.idFields(linkedType)?.filter(
148698
- (field2) => typeof value2[field2] === "undefined"
148699
- ).length > 0;
148700
148695
  let linkedID = null;
148701
148696
  if (value2 !== null) {
148702
- linkedID = !embedded ? this.id(linkedType, value2) : `${parent2}.${key}`;
148697
+ linkedID = !this.isEmbedded(linkedType, value2) ? this.id(linkedType, value2) : `${parent2}.${key}`;
148703
148698
  }
148704
148699
  let linkChange = linkedID !== previousValue;
148705
148700
  layer.writeLink(parent2, key, linkedID);
@@ -149071,6 +149066,10 @@ var CacheInternal2 = class {
149071
149066
  computeID(type, data2) {
149072
149067
  return computeID2(this.config, type, data2);
149073
149068
  }
149069
+ isEmbedded(linkedType, value2) {
149070
+ const idFields = this.idFields(linkedType);
149071
+ return idFields.length === 0 || idFields.filter((field) => typeof value2[field] === "undefined").length > 0;
149072
+ }
149074
149073
  hydrateNestedList({
149075
149074
  fields,
149076
149075
  variables,
@@ -149178,9 +149177,6 @@ var CacheInternal2 = class {
149178
149177
  }
149179
149178
  const entryObj = entry;
149180
149179
  let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
149181
- const embedded = this.idFields(linkedType)?.filter(
149182
- (field) => typeof entry[field] === "undefined"
149183
- ).length > 0;
149184
149180
  let innerType = linkedType;
149185
149181
  const typename = entryObj.__typename;
149186
149182
  if (typename) {
@@ -149188,7 +149184,7 @@ var CacheInternal2 = class {
149188
149184
  } else if (abstract) {
149189
149185
  throw new Error("Encountered interface type without __typename in the payload");
149190
149186
  }
149191
- if (!embedded) {
149187
+ if (!this.isEmbedded(linkedType, entry)) {
149192
149188
  const id2 = this.id(innerType, entry);
149193
149189
  if (id2) {
149194
149190
  linkedID = id2;
@@ -211098,12 +211094,9 @@ var CacheInternal3 = class {
211098
211094
  );
211099
211095
  }
211100
211096
  }
211101
- const embedded = this.idFields(linkedType)?.filter(
211102
- (field2) => typeof value2[field2] === "undefined"
211103
- ).length > 0;
211104
211097
  let linkedID = null;
211105
211098
  if (value2 !== null) {
211106
- linkedID = !embedded ? this.id(linkedType, value2) : `${parent2}.${key}`;
211099
+ linkedID = !this.isEmbedded(linkedType, value2) ? this.id(linkedType, value2) : `${parent2}.${key}`;
211107
211100
  }
211108
211101
  let linkChange = linkedID !== previousValue;
211109
211102
  layer.writeLink(parent2, key, linkedID);
@@ -211475,6 +211468,10 @@ var CacheInternal3 = class {
211475
211468
  computeID(type, data2) {
211476
211469
  return computeID3(this.config, type, data2);
211477
211470
  }
211471
+ isEmbedded(linkedType, value2) {
211472
+ const idFields = this.idFields(linkedType);
211473
+ return idFields.length === 0 || idFields.filter((field) => typeof value2[field] === "undefined").length > 0;
211474
+ }
211478
211475
  hydrateNestedList({
211479
211476
  fields,
211480
211477
  variables,
@@ -211582,9 +211579,6 @@ var CacheInternal3 = class {
211582
211579
  }
211583
211580
  const entryObj = entry;
211584
211581
  let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
211585
- const embedded = this.idFields(linkedType)?.filter(
211586
- (field) => typeof entry[field] === "undefined"
211587
- ).length > 0;
211588
211582
  let innerType = linkedType;
211589
211583
  const typename = entryObj.__typename;
211590
211584
  if (typename) {
@@ -211592,7 +211586,7 @@ var CacheInternal3 = class {
211592
211586
  } else if (abstract) {
211593
211587
  throw new Error("Encountered interface type without __typename in the payload");
211594
211588
  }
211595
- if (!embedded) {
211589
+ if (!this.isEmbedded(linkedType, entry)) {
211596
211590
  const id2 = this.id(innerType, entry);
211597
211591
  if (id2) {
211598
211592
  linkedID = id2;
@@ -277314,12 +277308,9 @@ var CacheInternal4 = class {
277314
277308
  );
277315
277309
  }
277316
277310
  }
277317
- const embedded = this.idFields(linkedType)?.filter(
277318
- (field2) => typeof value2[field2] === "undefined"
277319
- ).length > 0;
277320
277311
  let linkedID = null;
277321
277312
  if (value2 !== null) {
277322
- linkedID = !embedded ? this.id(linkedType, value2) : `${parent2}.${key}`;
277313
+ linkedID = !this.isEmbedded(linkedType, value2) ? this.id(linkedType, value2) : `${parent2}.${key}`;
277323
277314
  }
277324
277315
  let linkChange = linkedID !== previousValue;
277325
277316
  layer.writeLink(parent2, key, linkedID);
@@ -277691,6 +277682,10 @@ var CacheInternal4 = class {
277691
277682
  computeID(type, data2) {
277692
277683
  return computeID4(this.config, type, data2);
277693
277684
  }
277685
+ isEmbedded(linkedType, value2) {
277686
+ const idFields = this.idFields(linkedType);
277687
+ return idFields.length === 0 || idFields.filter((field) => typeof value2[field] === "undefined").length > 0;
277688
+ }
277694
277689
  hydrateNestedList({
277695
277690
  fields,
277696
277691
  variables,
@@ -277798,9 +277793,6 @@ var CacheInternal4 = class {
277798
277793
  }
277799
277794
  const entryObj = entry;
277800
277795
  let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
277801
- const embedded = this.idFields(linkedType)?.filter(
277802
- (field) => typeof entry[field] === "undefined"
277803
- ).length > 0;
277804
277796
  let innerType = linkedType;
277805
277797
  const typename = entryObj.__typename;
277806
277798
  if (typename) {
@@ -277808,7 +277800,7 @@ var CacheInternal4 = class {
277808
277800
  } else if (abstract) {
277809
277801
  throw new Error("Encountered interface type without __typename in the payload");
277810
277802
  }
277811
- if (!embedded) {
277803
+ if (!this.isEmbedded(linkedType, entry)) {
277812
277804
  const id2 = this.id(innerType, entry);
277813
277805
  if (id2) {
277814
277806
  linkedID = id2;
@@ -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 = !embedded ? this.id(linkedType, value2) : `${parent2}.${key}`;
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 (!embedded) {
92451
+ if (!this.isEmbedded(linkedType, entry)) {
92454
92452
  const id2 = this.id(innerType, entry);
92455
92453
  if (id2) {
92456
92454
  linkedID = id2;
@@ -148681,12 +148679,9 @@ var CacheInternal2 = class {
148681
148679
  );
148682
148680
  }
148683
148681
  }
148684
- const embedded = this.idFields(linkedType)?.filter(
148685
- (field2) => typeof value2[field2] === "undefined"
148686
- ).length > 0;
148687
148682
  let linkedID = null;
148688
148683
  if (value2 !== null) {
148689
- linkedID = !embedded ? this.id(linkedType, value2) : `${parent2}.${key}`;
148684
+ linkedID = !this.isEmbedded(linkedType, value2) ? this.id(linkedType, value2) : `${parent2}.${key}`;
148690
148685
  }
148691
148686
  let linkChange = linkedID !== previousValue;
148692
148687
  layer.writeLink(parent2, key, linkedID);
@@ -149058,6 +149053,10 @@ var CacheInternal2 = class {
149058
149053
  computeID(type, data2) {
149059
149054
  return computeID2(this.config, type, data2);
149060
149055
  }
149056
+ isEmbedded(linkedType, value2) {
149057
+ const idFields = this.idFields(linkedType);
149058
+ return idFields.length === 0 || idFields.filter((field) => typeof value2[field] === "undefined").length > 0;
149059
+ }
149061
149060
  hydrateNestedList({
149062
149061
  fields,
149063
149062
  variables,
@@ -149165,9 +149164,6 @@ var CacheInternal2 = class {
149165
149164
  }
149166
149165
  const entryObj = entry;
149167
149166
  let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
149168
- const embedded = this.idFields(linkedType)?.filter(
149169
- (field) => typeof entry[field] === "undefined"
149170
- ).length > 0;
149171
149167
  let innerType = linkedType;
149172
149168
  const typename = entryObj.__typename;
149173
149169
  if (typename) {
@@ -149175,7 +149171,7 @@ var CacheInternal2 = class {
149175
149171
  } else if (abstract) {
149176
149172
  throw new Error("Encountered interface type without __typename in the payload");
149177
149173
  }
149178
- if (!embedded) {
149174
+ if (!this.isEmbedded(linkedType, entry)) {
149179
149175
  const id2 = this.id(innerType, entry);
149180
149176
  if (id2) {
149181
149177
  linkedID = id2;
@@ -211084,12 +211080,9 @@ var CacheInternal3 = class {
211084
211080
  );
211085
211081
  }
211086
211082
  }
211087
- const embedded = this.idFields(linkedType)?.filter(
211088
- (field2) => typeof value2[field2] === "undefined"
211089
- ).length > 0;
211090
211083
  let linkedID = null;
211091
211084
  if (value2 !== null) {
211092
- linkedID = !embedded ? this.id(linkedType, value2) : `${parent2}.${key}`;
211085
+ linkedID = !this.isEmbedded(linkedType, value2) ? this.id(linkedType, value2) : `${parent2}.${key}`;
211093
211086
  }
211094
211087
  let linkChange = linkedID !== previousValue;
211095
211088
  layer.writeLink(parent2, key, linkedID);
@@ -211461,6 +211454,10 @@ var CacheInternal3 = class {
211461
211454
  computeID(type, data2) {
211462
211455
  return computeID3(this.config, type, data2);
211463
211456
  }
211457
+ isEmbedded(linkedType, value2) {
211458
+ const idFields = this.idFields(linkedType);
211459
+ return idFields.length === 0 || idFields.filter((field) => typeof value2[field] === "undefined").length > 0;
211460
+ }
211464
211461
  hydrateNestedList({
211465
211462
  fields,
211466
211463
  variables,
@@ -211568,9 +211565,6 @@ var CacheInternal3 = class {
211568
211565
  }
211569
211566
  const entryObj = entry;
211570
211567
  let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
211571
- const embedded = this.idFields(linkedType)?.filter(
211572
- (field) => typeof entry[field] === "undefined"
211573
- ).length > 0;
211574
211568
  let innerType = linkedType;
211575
211569
  const typename = entryObj.__typename;
211576
211570
  if (typename) {
@@ -211578,7 +211572,7 @@ var CacheInternal3 = class {
211578
211572
  } else if (abstract) {
211579
211573
  throw new Error("Encountered interface type without __typename in the payload");
211580
211574
  }
211581
- if (!embedded) {
211575
+ if (!this.isEmbedded(linkedType, entry)) {
211582
211576
  const id2 = this.id(innerType, entry);
211583
211577
  if (id2) {
211584
211578
  linkedID = id2;
@@ -277299,12 +277293,9 @@ var CacheInternal4 = class {
277299
277293
  );
277300
277294
  }
277301
277295
  }
277302
- const embedded = this.idFields(linkedType)?.filter(
277303
- (field2) => typeof value2[field2] === "undefined"
277304
- ).length > 0;
277305
277296
  let linkedID = null;
277306
277297
  if (value2 !== null) {
277307
- linkedID = !embedded ? this.id(linkedType, value2) : `${parent2}.${key}`;
277298
+ linkedID = !this.isEmbedded(linkedType, value2) ? this.id(linkedType, value2) : `${parent2}.${key}`;
277308
277299
  }
277309
277300
  let linkChange = linkedID !== previousValue;
277310
277301
  layer.writeLink(parent2, key, linkedID);
@@ -277676,6 +277667,10 @@ var CacheInternal4 = class {
277676
277667
  computeID(type, data2) {
277677
277668
  return computeID4(this.config, type, data2);
277678
277669
  }
277670
+ isEmbedded(linkedType, value2) {
277671
+ const idFields = this.idFields(linkedType);
277672
+ return idFields.length === 0 || idFields.filter((field) => typeof value2[field] === "undefined").length > 0;
277673
+ }
277679
277674
  hydrateNestedList({
277680
277675
  fields,
277681
277676
  variables,
@@ -277783,9 +277778,6 @@ var CacheInternal4 = class {
277783
277778
  }
277784
277779
  const entryObj = entry;
277785
277780
  let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
277786
- const embedded = this.idFields(linkedType)?.filter(
277787
- (field) => typeof entry[field] === "undefined"
277788
- ).length > 0;
277789
277781
  let innerType = linkedType;
277790
277782
  const typename = entryObj.__typename;
277791
277783
  if (typename) {
@@ -277793,7 +277785,7 @@ var CacheInternal4 = class {
277793
277785
  } else if (abstract) {
277794
277786
  throw new Error("Encountered interface type without __typename in the payload");
277795
277787
  }
277796
- if (!embedded) {
277788
+ if (!this.isEmbedded(linkedType, entry)) {
277797
277789
  const id2 = this.id(innerType, entry);
277798
277790
  if (id2) {
277799
277791
  linkedID = id2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "houdini-svelte",
3
- "version": "1.2.6-next.0",
3
+ "version": "1.2.6",
4
4
  "description": "The svelte plugin for houdini",
5
5
  "keywords": [
6
6
  "typescript",
@@ -32,7 +32,7 @@
32
32
  "rollup": "^3.7.4",
33
33
  "svelte": "^3.57.0",
34
34
  "vite": "^4.1.1",
35
- "houdini": "^1.2.6-next.0"
35
+ "houdini": "^1.2.6"
36
36
  },
37
37
  "files": [
38
38
  "build"