houdini 1.0.4 → 1.0.5

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.
@@ -71407,9 +71407,7 @@ var CacheInternal = class {
71407
71407
  let targetSelection = getFieldsForType(selection2, data["__typename"]);
71408
71408
  for (const [field, value] of Object.entries(data)) {
71409
71409
  if (!selection2 || !targetSelection[field]) {
71410
- throw new Error(
71411
- "Could not find field listing in selection for " + field + " @ " + JSON.stringify(selection2)
71412
- );
71410
+ continue;
71413
71411
  }
71414
71412
  let {
71415
71413
  type: linkedType,
@@ -78723,8 +78721,8 @@ async function updatePackageJSON(targetPath) {
78723
78721
  }
78724
78722
  packageJSON.devDependencies = {
78725
78723
  ...packageJSON.devDependencies,
78726
- houdini: "^1.0.4",
78727
- "houdini-svelte": "^1.0.4"
78724
+ houdini: "^1.0.5",
78725
+ "houdini-svelte": "^1.0.5"
78728
78726
  };
78729
78727
  await fs_exports.writeFile(packagePath, JSON.stringify(packageJSON, null, 4));
78730
78728
  }
@@ -71413,9 +71413,7 @@ var CacheInternal = class {
71413
71413
  let targetSelection = getFieldsForType(selection2, data["__typename"]);
71414
71414
  for (const [field, value] of Object.entries(data)) {
71415
71415
  if (!selection2 || !targetSelection[field]) {
71416
- throw new Error(
71417
- "Could not find field listing in selection for " + field + " @ " + JSON.stringify(selection2)
71418
- );
71416
+ continue;
71419
71417
  }
71420
71418
  let {
71421
71419
  type: linkedType,
@@ -78728,8 +78726,8 @@ async function updatePackageJSON(targetPath) {
78728
78726
  }
78729
78727
  packageJSON.devDependencies = {
78730
78728
  ...packageJSON.devDependencies,
78731
- houdini: "^1.0.4",
78732
- "houdini-svelte": "^1.0.4"
78729
+ houdini: "^1.0.5",
78730
+ "houdini-svelte": "^1.0.5"
78733
78731
  };
78734
78732
  await fs_exports.writeFile(packagePath, JSON.stringify(packageJSON, null, 4));
78735
78733
  }
@@ -55885,9 +55885,7 @@ var CacheInternal = class {
55885
55885
  let targetSelection = getFieldsForType(selection2, data["__typename"]);
55886
55886
  for (const [field, value] of Object.entries(data)) {
55887
55887
  if (!selection2 || !targetSelection[field]) {
55888
- throw new Error(
55889
- "Could not find field listing in selection for " + field + " @ " + JSON.stringify(selection2)
55890
- );
55888
+ continue;
55891
55889
  }
55892
55890
  let {
55893
55891
  type: linkedType,
@@ -55884,9 +55884,7 @@ var CacheInternal = class {
55884
55884
  let targetSelection = getFieldsForType(selection2, data["__typename"]);
55885
55885
  for (const [field, value] of Object.entries(data)) {
55886
55886
  if (!selection2 || !targetSelection[field]) {
55887
- throw new Error(
55888
- "Could not find field listing in selection for " + field + " @ " + JSON.stringify(selection2)
55889
- );
55887
+ continue;
55890
55888
  }
55891
55889
  let {
55892
55890
  type: linkedType,
@@ -64941,9 +64941,7 @@ var CacheInternal = class {
64941
64941
  let targetSelection = getFieldsForType(selection, data["__typename"]);
64942
64942
  for (const [field, value] of Object.entries(data)) {
64943
64943
  if (!selection || !targetSelection[field]) {
64944
- throw new Error(
64945
- "Could not find field listing in selection for " + field + " @ " + JSON.stringify(selection)
64946
- );
64944
+ continue;
64947
64945
  }
64948
64946
  let {
64949
64947
  type: linkedType,
@@ -65498,7 +65496,7 @@ var cachePolicy = ({
65498
65496
  stale: value.stale
65499
65497
  });
65500
65498
  }
65501
- if (useCache && !value.partial && !value.stale) {
65499
+ if (useCache && !value.partial && !value.stale && ctx.policy !== "CacheAndNetwork") {
65502
65500
  return;
65503
65501
  }
65504
65502
  }
@@ -65723,6 +65721,7 @@ function subscription(factory) {
65723
65721
  },
65724
65722
  cleanup() {
65725
65723
  clearSubscription?.();
65724
+ check = null;
65726
65725
  }
65727
65726
  };
65728
65727
  });
@@ -64890,9 +64890,7 @@ var CacheInternal = class {
64890
64890
  let targetSelection = getFieldsForType(selection, data["__typename"]);
64891
64891
  for (const [field, value] of Object.entries(data)) {
64892
64892
  if (!selection || !targetSelection[field]) {
64893
- throw new Error(
64894
- "Could not find field listing in selection for " + field + " @ " + JSON.stringify(selection)
64895
- );
64893
+ continue;
64896
64894
  }
64897
64895
  let {
64898
64896
  type: linkedType,
@@ -65447,7 +65445,7 @@ var cachePolicy = ({
65447
65445
  stale: value.stale
65448
65446
  });
65449
65447
  }
65450
- if (useCache && !value.partial && !value.stale) {
65448
+ if (useCache && !value.partial && !value.stale && ctx.policy !== "CacheAndNetwork") {
65451
65449
  return;
65452
65450
  }
65453
65451
  }
@@ -65672,6 +65670,7 @@ function subscription(factory) {
65672
65670
  },
65673
65671
  cleanup() {
65674
65672
  clearSubscription?.();
65673
+ check = null;
65675
65674
  }
65676
65675
  };
65677
65676
  });
@@ -201,9 +201,7 @@ class CacheInternal {
201
201
  let targetSelection = (0, import_selection.getFieldsForType)(selection, data["__typename"]);
202
202
  for (const [field, value] of Object.entries(data)) {
203
203
  if (!selection || !targetSelection[field]) {
204
- throw new Error(
205
- "Could not find field listing in selection for " + field + " @ " + JSON.stringify(selection)
206
- );
204
+ continue;
207
205
  }
208
206
  let {
209
207
  type: linkedType,
@@ -68,7 +68,7 @@ const cachePolicy = ({
68
68
  stale: value.stale
69
69
  });
70
70
  }
71
- if (useCache && !value.partial && !value.stale) {
71
+ if (useCache && !value.partial && !value.stale && ctx.policy !== "CacheAndNetwork") {
72
72
  return;
73
73
  }
74
74
  }
@@ -89,6 +89,7 @@ function subscription(factory) {
89
89
  },
90
90
  cleanup() {
91
91
  clearSubscription?.();
92
+ check = null;
92
93
  }
93
94
  };
94
95
  });
@@ -177,9 +177,7 @@ class CacheInternal {
177
177
  let targetSelection = getFieldsForType(selection, data["__typename"]);
178
178
  for (const [field, value] of Object.entries(data)) {
179
179
  if (!selection || !targetSelection[field]) {
180
- throw new Error(
181
- "Could not find field listing in selection for " + field + " @ " + JSON.stringify(selection)
182
- );
180
+ continue;
183
181
  }
184
182
  let {
185
183
  type: linkedType,
@@ -39,7 +39,7 @@ const cachePolicy = ({
39
39
  stale: value.stale
40
40
  });
41
41
  }
42
- if (useCache && !value.partial && !value.stale) {
42
+ if (useCache && !value.partial && !value.stale && ctx.policy !== "CacheAndNetwork") {
43
43
  return;
44
44
  }
45
45
  }
@@ -66,6 +66,7 @@ function subscription(factory) {
66
66
  },
67
67
  cleanup() {
68
68
  clearSubscription?.();
69
+ check = null;
69
70
  }
70
71
  };
71
72
  });
@@ -55889,9 +55889,7 @@ var CacheInternal = class {
55889
55889
  let targetSelection = getFieldsForType(selection2, data["__typename"]);
55890
55890
  for (const [field, value] of Object.entries(data)) {
55891
55891
  if (!selection2 || !targetSelection[field]) {
55892
- throw new Error(
55893
- "Could not find field listing in selection for " + field + " @ " + JSON.stringify(selection2)
55894
- );
55892
+ continue;
55895
55893
  }
55896
55894
  let {
55897
55895
  type: linkedType,
@@ -55885,9 +55885,7 @@ var CacheInternal = class {
55885
55885
  let targetSelection = getFieldsForType(selection2, data["__typename"]);
55886
55886
  for (const [field, value] of Object.entries(data)) {
55887
55887
  if (!selection2 || !targetSelection[field]) {
55888
- throw new Error(
55889
- "Could not find field listing in selection for " + field + " @ " + JSON.stringify(selection2)
55890
- );
55888
+ continue;
55891
55889
  }
55892
55890
  let {
55893
55891
  type: linkedType,
@@ -68272,9 +68272,7 @@ var CacheInternal = class {
68272
68272
  let targetSelection = getFieldsForType(selection2, data["__typename"]);
68273
68273
  for (const [field, value] of Object.entries(data)) {
68274
68274
  if (!selection2 || !targetSelection[field]) {
68275
- throw new Error(
68276
- "Could not find field listing in selection for " + field + " @ " + JSON.stringify(selection2)
68277
- );
68275
+ continue;
68278
68276
  }
68279
68277
  let {
68280
68278
  type: linkedType,
@@ -68267,9 +68267,7 @@ var CacheInternal = class {
68267
68267
  let targetSelection = getFieldsForType(selection2, data["__typename"]);
68268
68268
  for (const [field, value] of Object.entries(data)) {
68269
68269
  if (!selection2 || !targetSelection[field]) {
68270
- throw new Error(
68271
- "Could not find field listing in selection for " + field + " @ " + JSON.stringify(selection2)
68272
- );
68270
+ continue;
68273
68271
  }
68274
68272
  let {
68275
68273
  type: linkedType,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "houdini",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "The disappearing GraphQL clients",
5
5
  "keywords": [
6
6
  "typescript",