houdini 1.1.4-react.0 → 1.1.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.
Files changed (47) hide show
  1. package/build/cmd-cjs/index.js +603 -442
  2. package/build/cmd-esm/index.js +603 -442
  3. package/build/codegen/transforms/fragmentVariables.d.ts +0 -11
  4. package/build/codegen-cjs/index.js +572 -398
  5. package/build/codegen-esm/index.js +572 -398
  6. package/build/lib/config.d.ts +1 -1
  7. package/build/lib/parse.d.ts +1 -2
  8. package/build/lib/types.d.ts +1 -4
  9. package/build/lib-cjs/index.js +188 -196
  10. package/build/lib-esm/index.js +188 -196
  11. package/build/runtime/cache/cache.d.ts +4 -2
  12. package/build/runtime/client/documentStore.d.ts +0 -3
  13. package/build/runtime/client/index.d.ts +1 -1
  14. package/build/runtime/lib/types.d.ts +4 -46
  15. package/build/runtime-cjs/cache/cache.d.ts +4 -2
  16. package/build/runtime-cjs/cache/cache.js +37 -14
  17. package/build/runtime-cjs/client/documentStore.d.ts +0 -3
  18. package/build/runtime-cjs/client/documentStore.js +6 -11
  19. package/build/runtime-cjs/client/index.d.ts +1 -1
  20. package/build/runtime-cjs/client/plugins/cache.js +3 -5
  21. package/build/runtime-cjs/client/plugins/fragment.js +1 -8
  22. package/build/runtime-cjs/client/plugins/query.js +1 -2
  23. package/build/runtime-cjs/lib/types.d.ts +4 -46
  24. package/build/runtime-esm/cache/cache.d.ts +4 -2
  25. package/build/runtime-esm/cache/cache.js +37 -14
  26. package/build/runtime-esm/client/documentStore.d.ts +0 -3
  27. package/build/runtime-esm/client/documentStore.js +6 -11
  28. package/build/runtime-esm/client/index.d.ts +1 -1
  29. package/build/runtime-esm/client/plugins/cache.js +3 -5
  30. package/build/runtime-esm/client/plugins/fragment.js +1 -8
  31. package/build/runtime-esm/client/plugins/query.js +1 -2
  32. package/build/runtime-esm/lib/types.d.ts +4 -46
  33. package/build/test-cjs/index.js +594 -424
  34. package/build/test-esm/index.js +594 -424
  35. package/build/vite-cjs/index.js +613 -450
  36. package/build/vite-esm/index.js +613 -450
  37. package/package.json +3 -1
  38. package/build/runtime/lib/pageInfo.d.ts +0 -7
  39. package/build/runtime/lib/pagination.d.ts +0 -29
  40. package/build/runtime-cjs/lib/pageInfo.d.ts +0 -7
  41. package/build/runtime-cjs/lib/pageInfo.js +0 -79
  42. package/build/runtime-cjs/lib/pagination.d.ts +0 -29
  43. package/build/runtime-cjs/lib/pagination.js +0 -231
  44. package/build/runtime-esm/lib/pageInfo.d.ts +0 -7
  45. package/build/runtime-esm/lib/pageInfo.js +0 -52
  46. package/build/runtime-esm/lib/pagination.d.ts +0 -29
  47. package/build/runtime-esm/lib/pagination.js +0 -206
@@ -225,16 +225,16 @@ var require_GraphQLError = __commonJS({
225
225
  return obj && obj.__esModule ? obj : { default: obj };
226
226
  }
227
227
  function ownKeys(object, enumerableOnly) {
228
- var keys = Object.keys(object);
228
+ var keys2 = Object.keys(object);
229
229
  if (Object.getOwnPropertySymbols) {
230
230
  var symbols = Object.getOwnPropertySymbols(object);
231
231
  if (enumerableOnly)
232
232
  symbols = symbols.filter(function(sym) {
233
233
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
234
234
  });
235
- keys.push.apply(keys, symbols);
235
+ keys2.push.apply(keys2, symbols);
236
236
  }
237
- return keys;
237
+ return keys2;
238
238
  }
239
239
  function _objectSpread(target) {
240
240
  for (var i = 1; i < arguments.length; i++) {
@@ -471,7 +471,7 @@ var require_GraphQLError = __commonJS({
471
471
  }
472
472
  _createClass(GraphQLError4, [{
473
473
  key: "toString",
474
- value: function toString() {
474
+ value: function toString2() {
475
475
  return printError(this);
476
476
  }
477
477
  }, {
@@ -793,14 +793,14 @@ var require_inspect = __commonJS({
793
793
  return formatObject(value, seenValues);
794
794
  }
795
795
  function formatObject(object, seenValues) {
796
- var keys = Object.keys(object);
797
- if (keys.length === 0) {
796
+ var keys2 = Object.keys(object);
797
+ if (keys2.length === 0) {
798
798
  return "{}";
799
799
  }
800
800
  if (seenValues.length > MAX_RECURSIVE_DEPTH) {
801
801
  return "[" + getObjectTag(object) + "]";
802
802
  }
803
- var properties = keys.map(function(key) {
803
+ var properties = keys2.map(function(key) {
804
804
  var value = formatValue(object[key], seenValues);
805
805
  return key + ": " + value;
806
806
  });
@@ -2398,7 +2398,7 @@ var require_visitor = __commonJS({
2398
2398
  Object.defineProperty(exports, "__esModule", {
2399
2399
  value: true
2400
2400
  });
2401
- exports.visit = visit13;
2401
+ exports.visit = visit12;
2402
2402
  exports.visitInParallel = visitInParallel;
2403
2403
  exports.getVisitFn = getVisitFn;
2404
2404
  exports.BREAK = exports.QueryDocumentKeys = void 0;
@@ -2461,11 +2461,11 @@ var require_visitor = __commonJS({
2461
2461
  exports.QueryDocumentKeys = QueryDocumentKeys;
2462
2462
  var BREAK = Object.freeze({});
2463
2463
  exports.BREAK = BREAK;
2464
- function visit13(root, visitor) {
2464
+ function visit12(root, visitor) {
2465
2465
  var visitorKeys = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : QueryDocumentKeys;
2466
2466
  var stack = void 0;
2467
2467
  var inArray = Array.isArray(root);
2468
- var keys = [root];
2468
+ var keys2 = [root];
2469
2469
  var index = -1;
2470
2470
  var edits = [];
2471
2471
  var node = void 0;
@@ -2476,7 +2476,7 @@ var require_visitor = __commonJS({
2476
2476
  var newRoot = root;
2477
2477
  do {
2478
2478
  index++;
2479
- var isLeaving = index === keys.length;
2479
+ var isLeaving = index === keys2.length;
2480
2480
  var isEdited = isLeaving && edits.length !== 0;
2481
2481
  if (isLeaving) {
2482
2482
  key = ancestors.length === 0 ? void 0 : path2[path2.length - 1];
@@ -2509,12 +2509,12 @@ var require_visitor = __commonJS({
2509
2509
  }
2510
2510
  }
2511
2511
  index = stack.index;
2512
- keys = stack.keys;
2512
+ keys2 = stack.keys;
2513
2513
  edits = stack.edits;
2514
2514
  inArray = stack.inArray;
2515
2515
  stack = stack.prev;
2516
2516
  } else {
2517
- key = parent ? inArray ? index : keys[index] : void 0;
2517
+ key = parent ? inArray ? index : keys2[index] : void 0;
2518
2518
  node = parent ? parent[key] : newRoot;
2519
2519
  if (node === null || node === void 0) {
2520
2520
  continue;
@@ -2562,12 +2562,12 @@ var require_visitor = __commonJS({
2562
2562
  stack = {
2563
2563
  inArray,
2564
2564
  index,
2565
- keys,
2565
+ keys: keys2,
2566
2566
  edits,
2567
2567
  prev: stack
2568
2568
  };
2569
2569
  inArray = Array.isArray(node);
2570
- keys = inArray ? node : (_visitorKeys$node$kin = visitorKeys[node.kind]) !== null && _visitorKeys$node$kin !== void 0 ? _visitorKeys$node$kin : [];
2570
+ keys2 = inArray ? node : (_visitorKeys$node$kin = visitorKeys[node.kind]) !== null && _visitorKeys$node$kin !== void 0 ? _visitorKeys$node$kin : [];
2571
2571
  index = -1;
2572
2572
  edits = [];
2573
2573
  if (parent) {
@@ -3550,7 +3550,7 @@ var require_definition = __commonJS({
3550
3550
  return new GraphQLList2(ofType);
3551
3551
  }
3552
3552
  }
3553
- GraphQLList2.prototype.toString = function toString() {
3553
+ GraphQLList2.prototype.toString = function toString2() {
3554
3554
  return "[" + String(this.ofType) + "]";
3555
3555
  };
3556
3556
  GraphQLList2.prototype.toJSON = function toJSON() {
@@ -3569,7 +3569,7 @@ var require_definition = __commonJS({
3569
3569
  return new GraphQLNonNull2(ofType);
3570
3570
  }
3571
3571
  }
3572
- GraphQLNonNull2.prototype.toString = function toString() {
3572
+ GraphQLNonNull2.prototype.toString = function toString2() {
3573
3573
  return String(this.ofType) + "!";
3574
3574
  };
3575
3575
  GraphQLNonNull2.prototype.toJSON = function toJSON() {
@@ -3665,7 +3665,7 @@ var require_definition = __commonJS({
3665
3665
  extensionASTNodes: (_this$extensionASTNod = this.extensionASTNodes) !== null && _this$extensionASTNod !== void 0 ? _this$extensionASTNod : []
3666
3666
  };
3667
3667
  };
3668
- _proto.toString = function toString() {
3668
+ _proto.toString = function toString2() {
3669
3669
  return this.name;
3670
3670
  };
3671
3671
  _proto.toJSON = function toJSON() {
@@ -3719,7 +3719,7 @@ var require_definition = __commonJS({
3719
3719
  extensionASTNodes: this.extensionASTNodes || []
3720
3720
  };
3721
3721
  };
3722
- _proto2.toString = function toString() {
3722
+ _proto2.toString = function toString2() {
3723
3723
  return this.name;
3724
3724
  };
3725
3725
  _proto2.toJSON = function toJSON() {
@@ -3850,7 +3850,7 @@ var require_definition = __commonJS({
3850
3850
  extensionASTNodes: (_this$extensionASTNod2 = this.extensionASTNodes) !== null && _this$extensionASTNod2 !== void 0 ? _this$extensionASTNod2 : []
3851
3851
  };
3852
3852
  };
3853
- _proto3.toString = function toString() {
3853
+ _proto3.toString = function toString2() {
3854
3854
  return this.name;
3855
3855
  };
3856
3856
  _proto3.toJSON = function toJSON() {
@@ -3897,7 +3897,7 @@ var require_definition = __commonJS({
3897
3897
  extensionASTNodes: (_this$extensionASTNod3 = this.extensionASTNodes) !== null && _this$extensionASTNod3 !== void 0 ? _this$extensionASTNod3 : []
3898
3898
  };
3899
3899
  };
3900
- _proto4.toString = function toString() {
3900
+ _proto4.toString = function toString2() {
3901
3901
  return this.name;
3902
3902
  };
3903
3903
  _proto4.toJSON = function toJSON() {
@@ -3941,7 +3941,7 @@ var require_definition = __commonJS({
3941
3941
  _proto5.getValue = function getValue(name) {
3942
3942
  return this._nameLookup[name];
3943
3943
  };
3944
- _proto5.serialize = function serialize(outputValue) {
3944
+ _proto5.serialize = function serialize2(outputValue) {
3945
3945
  var enumValue = this._valueLookup.get(outputValue);
3946
3946
  if (enumValue === void 0) {
3947
3947
  throw new _GraphQLError.GraphQLError('Enum "'.concat(this.name, '" cannot represent value: ').concat((0, _inspect.default)(outputValue)));
@@ -3993,7 +3993,7 @@ var require_definition = __commonJS({
3993
3993
  extensionASTNodes: (_this$extensionASTNod4 = this.extensionASTNodes) !== null && _this$extensionASTNod4 !== void 0 ? _this$extensionASTNod4 : []
3994
3994
  };
3995
3995
  };
3996
- _proto5.toString = function toString() {
3996
+ _proto5.toString = function toString2() {
3997
3997
  return this.name;
3998
3998
  };
3999
3999
  _proto5.toJSON = function toJSON() {
@@ -4071,7 +4071,7 @@ var require_definition = __commonJS({
4071
4071
  extensionASTNodes: (_this$extensionASTNod5 = this.extensionASTNodes) !== null && _this$extensionASTNod5 !== void 0 ? _this$extensionASTNod5 : []
4072
4072
  };
4073
4073
  };
4074
- _proto6.toString = function toString() {
4074
+ _proto6.toString = function toString2() {
4075
4075
  return this.name;
4076
4076
  };
4077
4077
  _proto6.toJSON = function toJSON() {
@@ -5325,7 +5325,7 @@ var require_directives = __commonJS({
5325
5325
  astNode: this.astNode
5326
5326
  };
5327
5327
  };
5328
- _proto.toString = function toString() {
5328
+ _proto.toString = function toString2() {
5329
5329
  return "@" + this.name;
5330
5330
  };
5331
5331
  _proto.toJSON = function toJSON() {
@@ -7262,16 +7262,16 @@ var require_KnownArgumentNamesRule = __commonJS({
7262
7262
  return obj && obj.__esModule ? obj : { default: obj };
7263
7263
  }
7264
7264
  function ownKeys(object, enumerableOnly) {
7265
- var keys = Object.keys(object);
7265
+ var keys2 = Object.keys(object);
7266
7266
  if (Object.getOwnPropertySymbols) {
7267
7267
  var symbols = Object.getOwnPropertySymbols(object);
7268
7268
  if (enumerableOnly)
7269
7269
  symbols = symbols.filter(function(sym) {
7270
7270
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
7271
7271
  });
7272
- keys.push.apply(keys, symbols);
7272
+ keys2.push.apply(keys2, symbols);
7273
7273
  }
7274
- return keys;
7274
+ return keys2;
7275
7275
  }
7276
7276
  function _objectSpread(target) {
7277
7277
  for (var i = 1; i < arguments.length; i++) {
@@ -7518,16 +7518,16 @@ var require_ProvidedRequiredArgumentsRule = __commonJS({
7518
7518
  return obj && obj.__esModule ? obj : { default: obj };
7519
7519
  }
7520
7520
  function ownKeys(object, enumerableOnly) {
7521
- var keys = Object.keys(object);
7521
+ var keys2 = Object.keys(object);
7522
7522
  if (Object.getOwnPropertySymbols) {
7523
7523
  var symbols = Object.getOwnPropertySymbols(object);
7524
7524
  if (enumerableOnly)
7525
7525
  symbols = symbols.filter(function(sym) {
7526
7526
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
7527
7527
  });
7528
- keys.push.apply(keys, symbols);
7528
+ keys2.push.apply(keys2, symbols);
7529
7529
  }
7530
- return keys;
7530
+ return keys2;
7531
7531
  }
7532
7532
  function _objectSpread(target) {
7533
7533
  for (var i = 1; i < arguments.length; i++) {
@@ -8785,13 +8785,13 @@ var require_promiseForObject = __commonJS({
8785
8785
  });
8786
8786
  exports.default = promiseForObject;
8787
8787
  function promiseForObject(object) {
8788
- var keys = Object.keys(object);
8789
- var valuesAndPromises = keys.map(function(name) {
8788
+ var keys2 = Object.keys(object);
8789
+ var valuesAndPromises = keys2.map(function(name) {
8790
8790
  return object[name];
8791
8791
  });
8792
8792
  return Promise.all(valuesAndPromises).then(function(values) {
8793
8793
  return values.reduce(function(resolvedObject, value, i) {
8794
- resolvedObject[keys[i]] = value;
8794
+ resolvedObject[keys2[i]] = value;
8795
8795
  return resolvedObject;
8796
8796
  }, /* @__PURE__ */ Object.create(null));
8797
8797
  });
@@ -11243,16 +11243,16 @@ var require_getIntrospectionQuery = __commonJS({
11243
11243
  });
11244
11244
  exports.getIntrospectionQuery = getIntrospectionQuery;
11245
11245
  function ownKeys(object, enumerableOnly) {
11246
- var keys = Object.keys(object);
11246
+ var keys2 = Object.keys(object);
11247
11247
  if (Object.getOwnPropertySymbols) {
11248
11248
  var symbols = Object.getOwnPropertySymbols(object);
11249
11249
  if (enumerableOnly)
11250
11250
  symbols = symbols.filter(function(sym) {
11251
11251
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
11252
11252
  });
11253
- keys.push.apply(keys, symbols);
11253
+ keys2.push.apply(keys2, symbols);
11254
11254
  }
11255
- return keys;
11255
+ return keys2;
11256
11256
  }
11257
11257
  function _objectSpread(target) {
11258
11258
  for (var i = 1; i < arguments.length; i++) {
@@ -11345,16 +11345,16 @@ var require_introspectionFromSchema = __commonJS({
11345
11345
  return obj && obj.__esModule ? obj : { default: obj };
11346
11346
  }
11347
11347
  function ownKeys(object, enumerableOnly) {
11348
- var keys = Object.keys(object);
11348
+ var keys2 = Object.keys(object);
11349
11349
  if (Object.getOwnPropertySymbols) {
11350
11350
  var symbols = Object.getOwnPropertySymbols(object);
11351
11351
  if (enumerableOnly)
11352
11352
  symbols = symbols.filter(function(sym) {
11353
11353
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
11354
11354
  });
11355
- keys.push.apply(keys, symbols);
11355
+ keys2.push.apply(keys2, symbols);
11356
11356
  }
11357
- return keys;
11357
+ return keys2;
11358
11358
  }
11359
11359
  function _objectSpread(target) {
11360
11360
  for (var i = 1; i < arguments.length; i++) {
@@ -11686,16 +11686,16 @@ var require_extendSchema = __commonJS({
11686
11686
  return obj && obj.__esModule ? obj : { default: obj };
11687
11687
  }
11688
11688
  function ownKeys(object, enumerableOnly) {
11689
- var keys = Object.keys(object);
11689
+ var keys2 = Object.keys(object);
11690
11690
  if (Object.getOwnPropertySymbols) {
11691
11691
  var symbols = Object.getOwnPropertySymbols(object);
11692
11692
  if (enumerableOnly)
11693
11693
  symbols = symbols.filter(function(sym) {
11694
11694
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
11695
11695
  });
11696
- keys.push.apply(keys, symbols);
11696
+ keys2.push.apply(keys2, symbols);
11697
11697
  }
11698
- return keys;
11698
+ return keys2;
11699
11699
  }
11700
11700
  function _objectSpread(target) {
11701
11701
  for (var i = 1; i < arguments.length; i++) {
@@ -12286,16 +12286,16 @@ var require_lexicographicSortSchema = __commonJS({
12286
12286
  return obj && obj.__esModule ? obj : { default: obj };
12287
12287
  }
12288
12288
  function ownKeys(object, enumerableOnly) {
12289
- var keys = Object.keys(object);
12289
+ var keys2 = Object.keys(object);
12290
12290
  if (Object.getOwnPropertySymbols) {
12291
12291
  var symbols = Object.getOwnPropertySymbols(object);
12292
12292
  if (enumerableOnly)
12293
12293
  symbols = symbols.filter(function(sym) {
12294
12294
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
12295
12295
  });
12296
- keys.push.apply(keys, symbols);
12296
+ keys2.push.apply(keys2, symbols);
12297
12297
  }
12298
- return keys;
12298
+ return keys2;
12299
12299
  }
12300
12300
  function _objectSpread(target) {
12301
12301
  for (var i = 1; i < arguments.length; i++) {
@@ -12836,16 +12836,16 @@ var require_findBreakingChanges = __commonJS({
12836
12836
  return obj && obj.__esModule ? obj : { default: obj };
12837
12837
  }
12838
12838
  function ownKeys(object, enumerableOnly) {
12839
- var keys = Object.keys(object);
12839
+ var keys2 = Object.keys(object);
12840
12840
  if (Object.getOwnPropertySymbols) {
12841
12841
  var symbols = Object.getOwnPropertySymbols(object);
12842
12842
  if (enumerableOnly)
12843
12843
  symbols = symbols.filter(function(sym) {
12844
12844
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
12845
12845
  });
12846
- keys.push.apply(keys, symbols);
12846
+ keys2.push.apply(keys2, symbols);
12847
12847
  }
12848
- return keys;
12848
+ return keys2;
12849
12849
  }
12850
12850
  function _objectSpread(target) {
12851
12851
  for (var i = 1; i < arguments.length; i++) {
@@ -19345,9 +19345,9 @@ var require_legacy_streams = __commonJS({
19345
19345
  this.mode = 438;
19346
19346
  this.bufferSize = 64 * 1024;
19347
19347
  options = options || {};
19348
- var keys = Object.keys(options);
19349
- for (var index = 0, length = keys.length; index < length; index++) {
19350
- var key = keys[index];
19348
+ var keys2 = Object.keys(options);
19349
+ for (var index = 0, length = keys2.length; index < length; index++) {
19350
+ var key = keys2[index];
19351
19351
  this[key] = options[key];
19352
19352
  }
19353
19353
  if (this.encoding)
@@ -19395,9 +19395,9 @@ var require_legacy_streams = __commonJS({
19395
19395
  this.mode = 438;
19396
19396
  this.bytesWritten = 0;
19397
19397
  options = options || {};
19398
- var keys = Object.keys(options);
19399
- for (var index = 0, length = keys.length; index < length; index++) {
19400
- var key = keys[index];
19398
+ var keys2 = Object.keys(options);
19399
+ for (var index = 0, length = keys2.length; index < length; index++) {
19400
+ var key = keys2[index];
19401
19401
  this[key] = options[key];
19402
19402
  }
19403
19403
  if (this.start !== void 0) {
@@ -22614,10 +22614,10 @@ var require_glob = __commonJS({
22614
22614
  if (add === null || typeof add !== "object") {
22615
22615
  return origin;
22616
22616
  }
22617
- var keys = Object.keys(add);
22618
- var i = keys.length;
22617
+ var keys2 = Object.keys(add);
22618
+ var i = keys2.length;
22619
22619
  while (i--) {
22620
- origin[keys[i]] = add[keys[i]];
22620
+ origin[keys2[i]] = add[keys2[i]];
22621
22621
  }
22622
22622
  return origin;
22623
22623
  }
@@ -23180,12 +23180,12 @@ var require_lib3 = __commonJS({
23180
23180
  SyntaxError: "BABEL_PARSER_SYNTAX_ERROR",
23181
23181
  SourceTypeModuleError: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"
23182
23182
  };
23183
- var reflect = (keys, last = keys.length - 1) => ({
23183
+ var reflect = (keys2, last = keys2.length - 1) => ({
23184
23184
  get() {
23185
- return keys.reduce((object, key) => object[key], this);
23185
+ return keys2.reduce((object, key) => object[key], this);
23186
23186
  },
23187
23187
  set(value) {
23188
- keys.reduce(
23188
+ keys2.reduce(
23189
23189
  (item, key, i) => i === last ? item[key] = value : item[key],
23190
23190
  this
23191
23191
  );
@@ -25118,9 +25118,9 @@ var require_lib3 = __commonJS({
25118
25118
  }
25119
25119
  clone(skipArrays) {
25120
25120
  const state = new State();
25121
- const keys = Object.keys(this);
25122
- for (let i = 0, length = keys.length; i < length; i++) {
25123
- const key = keys[i];
25121
+ const keys2 = Object.keys(this);
25122
+ for (let i = 0, length = keys2.length; i < length; i++) {
25123
+ const key = keys2[i];
25124
25124
  let val = this[key];
25125
25125
  if (!skipArrays && Array.isArray(val)) {
25126
25126
  val = val.slice();
@@ -27025,9 +27025,9 @@ var require_lib3 = __commonJS({
27025
27025
  {
27026
27026
  NodePrototype.__clone = function() {
27027
27027
  const newNode = new Node(void 0, this.start, this.loc.start);
27028
- const keys = Object.keys(this);
27029
- for (let i = 0, length = keys.length; i < length; i++) {
27030
- const key = keys[i];
27028
+ const keys2 = Object.keys(this);
27029
+ for (let i = 0, length = keys2.length; i < length; i++) {
27030
+ const key = keys2[i];
27031
27031
  if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") {
27032
27032
  newNode[key] = this[key];
27033
27033
  }
@@ -37667,109 +37667,6 @@ var require_lib3 = __commonJS({
37667
37667
  }
37668
37668
  });
37669
37669
 
37670
- // ../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js
37671
- var require_cjs = __commonJS({
37672
- "../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module2) {
37673
- "use strict";
37674
- var isMergeableObject = function isMergeableObject2(value) {
37675
- return isNonNullObject(value) && !isSpecial(value);
37676
- };
37677
- function isNonNullObject(value) {
37678
- return !!value && typeof value === "object";
37679
- }
37680
- function isSpecial(value) {
37681
- var stringValue = Object.prototype.toString.call(value);
37682
- return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
37683
- }
37684
- var canUseSymbol = typeof Symbol === "function" && Symbol.for;
37685
- var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
37686
- function isReactElement(value) {
37687
- return value.$$typeof === REACT_ELEMENT_TYPE;
37688
- }
37689
- function emptyTarget(val) {
37690
- return Array.isArray(val) ? [] : {};
37691
- }
37692
- function cloneUnlessOtherwiseSpecified(value, options) {
37693
- return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
37694
- }
37695
- function defaultArrayMerge(target, source, options) {
37696
- return target.concat(source).map(function(element) {
37697
- return cloneUnlessOtherwiseSpecified(element, options);
37698
- });
37699
- }
37700
- function getMergeFunction(key, options) {
37701
- if (!options.customMerge) {
37702
- return deepmerge;
37703
- }
37704
- var customMerge = options.customMerge(key);
37705
- return typeof customMerge === "function" ? customMerge : deepmerge;
37706
- }
37707
- function getEnumerableOwnPropertySymbols(target) {
37708
- return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
37709
- return target.propertyIsEnumerable(symbol);
37710
- }) : [];
37711
- }
37712
- function getKeys(target) {
37713
- return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
37714
- }
37715
- function propertyIsOnObject(object, property) {
37716
- try {
37717
- return property in object;
37718
- } catch (_) {
37719
- return false;
37720
- }
37721
- }
37722
- function propertyIsUnsafe(target, key) {
37723
- return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
37724
- }
37725
- function mergeObject(target, source, options) {
37726
- var destination = {};
37727
- if (options.isMergeableObject(target)) {
37728
- getKeys(target).forEach(function(key) {
37729
- destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
37730
- });
37731
- }
37732
- getKeys(source).forEach(function(key) {
37733
- if (propertyIsUnsafe(target, key)) {
37734
- return;
37735
- }
37736
- if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
37737
- destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
37738
- } else {
37739
- destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
37740
- }
37741
- });
37742
- return destination;
37743
- }
37744
- function deepmerge(target, source, options) {
37745
- options = options || {};
37746
- options.arrayMerge = options.arrayMerge || defaultArrayMerge;
37747
- options.isMergeableObject = options.isMergeableObject || isMergeableObject;
37748
- options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
37749
- var sourceIsArray = Array.isArray(source);
37750
- var targetIsArray = Array.isArray(target);
37751
- var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
37752
- if (!sourceAndTargetTypesMatch) {
37753
- return cloneUnlessOtherwiseSpecified(source, options);
37754
- } else if (sourceIsArray) {
37755
- return options.arrayMerge(target, source, options);
37756
- } else {
37757
- return mergeObject(target, source, options);
37758
- }
37759
- }
37760
- deepmerge.all = function deepmergeAll(array, options) {
37761
- if (!Array.isArray(array)) {
37762
- throw new Error("first argument should be an array");
37763
- }
37764
- return array.reduce(function(prev, next) {
37765
- return deepmerge(prev, next, options);
37766
- }, {});
37767
- };
37768
- var deepmerge_1 = deepmerge;
37769
- module2.exports = deepmerge_1;
37770
- }
37771
- });
37772
-
37773
37670
  // ../../node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.js
37774
37671
  var require_tslib = __commonJS({
37775
37672
  "../../node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.js"(exports, module2) {
@@ -40039,7 +39936,7 @@ var require_path_visitor = __commonJS({
40039
39936
  }
40040
39937
  return target;
40041
39938
  }
40042
- PathVisitor.visit = function visit13(node, methods) {
39939
+ PathVisitor.visit = function visit12(node, methods) {
40043
39940
  return PathVisitor.fromMethodsObject(methods).visit(node);
40044
39941
  };
40045
39942
  var PVp = PathVisitor.prototype;
@@ -40230,7 +40127,7 @@ var require_path_visitor = __commonJS({
40230
40127
  this.needToCallTraverse = false;
40231
40128
  return visitChildren(path2, PathVisitor.fromMethodsObject(newVisitor || this.visitor));
40232
40129
  };
40233
- sharedContextProtoMethods.visit = function visit13(path2, newVisitor) {
40130
+ sharedContextProtoMethods.visit = function visit12(path2, newVisitor) {
40234
40131
  if (!(this instanceof this.Context)) {
40235
40132
  throw new Error("");
40236
40133
  }
@@ -41623,7 +41520,7 @@ var require_main = __commonJS({
41623
41520
  var someField = _a.someField;
41624
41521
  var Type = _a.Type;
41625
41522
  var use = _a.use;
41626
- var visit13 = _a.visit;
41523
+ var visit12 = _a.visit;
41627
41524
  exports.astNodesAreEquivalent = astNodesAreEquivalent;
41628
41525
  exports.builders = builders;
41629
41526
  exports.builtInTypes = builtInTypes;
@@ -41640,7 +41537,7 @@ var require_main = __commonJS({
41640
41537
  exports.someField = someField;
41641
41538
  exports.Type = Type;
41642
41539
  exports.use = use;
41643
- exports.visit = visit13;
41540
+ exports.visit = visit12;
41644
41541
  Object.assign(namedTypes_1.namedTypes, n);
41645
41542
  }
41646
41543
  });
@@ -43428,10 +43325,10 @@ var require_util2 = __commonJS({
43428
43325
  var result = {};
43429
43326
  var argc = args.length;
43430
43327
  for (var i = 0; i < argc; ++i) {
43431
- var keys = Object.keys(args[i]);
43432
- var keyCount = keys.length;
43328
+ var keys2 = Object.keys(args[i]);
43329
+ var keyCount = keys2.length;
43433
43330
  for (var j = 0; j < keyCount; ++j) {
43434
- result[keys[j]] = true;
43331
+ result[keys2[j]] = true;
43435
43332
  }
43436
43333
  }
43437
43334
  return result;
@@ -51091,10 +50988,10 @@ var require_parser2 = __commonJS({
51091
50988
  loc.indent = newIndent;
51092
50989
  this.findTokenRange(loc);
51093
50990
  }
51094
- var keys = Object.keys(node);
51095
- var keyCount = keys.length;
50991
+ var keys2 = Object.keys(node);
50992
+ var keyCount = keys2.length;
51096
50993
  for (var i = 0; i < keyCount; ++i) {
51097
- var key = keys[i];
50994
+ var key = keys2[i];
51098
50995
  if (key === "loc") {
51099
50996
  copy[key] = node[key];
51100
50997
  } else if (key === "tokens" && node.type === "File") {
@@ -51853,13 +51750,13 @@ var require_patcher = __commonJS({
51853
51750
  if (newPath.needsParens() && !oldPath.hasParens()) {
51854
51751
  return false;
51855
51752
  }
51856
- var keys = (0, util_1.getUnionOfKeys)(oldNode, newNode);
51753
+ var keys2 = (0, util_1.getUnionOfKeys)(oldNode, newNode);
51857
51754
  if (oldNode.type === "File" || newNode.type === "File") {
51858
- delete keys.tokens;
51755
+ delete keys2.tokens;
51859
51756
  }
51860
- delete keys.loc;
51757
+ delete keys2.loc;
51861
51758
  var originalReprintCount = reprints.length;
51862
- for (var k in keys) {
51759
+ for (var k in keys2) {
51863
51760
  if (k.charAt(0) === "_") {
51864
51761
  continue;
51865
51762
  }
@@ -54102,6 +53999,109 @@ var require_main2 = __commonJS({
54102
53999
  }
54103
54000
  });
54104
54001
 
54002
+ // ../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js
54003
+ var require_cjs = __commonJS({
54004
+ "../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module2) {
54005
+ "use strict";
54006
+ var isMergeableObject = function isMergeableObject2(value) {
54007
+ return isNonNullObject(value) && !isSpecial(value);
54008
+ };
54009
+ function isNonNullObject(value) {
54010
+ return !!value && typeof value === "object";
54011
+ }
54012
+ function isSpecial(value) {
54013
+ var stringValue = Object.prototype.toString.call(value);
54014
+ return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
54015
+ }
54016
+ var canUseSymbol = typeof Symbol === "function" && Symbol.for;
54017
+ var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
54018
+ function isReactElement(value) {
54019
+ return value.$$typeof === REACT_ELEMENT_TYPE;
54020
+ }
54021
+ function emptyTarget(val) {
54022
+ return Array.isArray(val) ? [] : {};
54023
+ }
54024
+ function cloneUnlessOtherwiseSpecified(value, options) {
54025
+ return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
54026
+ }
54027
+ function defaultArrayMerge(target, source, options) {
54028
+ return target.concat(source).map(function(element) {
54029
+ return cloneUnlessOtherwiseSpecified(element, options);
54030
+ });
54031
+ }
54032
+ function getMergeFunction(key, options) {
54033
+ if (!options.customMerge) {
54034
+ return deepmerge;
54035
+ }
54036
+ var customMerge = options.customMerge(key);
54037
+ return typeof customMerge === "function" ? customMerge : deepmerge;
54038
+ }
54039
+ function getEnumerableOwnPropertySymbols(target) {
54040
+ return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
54041
+ return target.propertyIsEnumerable(symbol);
54042
+ }) : [];
54043
+ }
54044
+ function getKeys(target) {
54045
+ return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
54046
+ }
54047
+ function propertyIsOnObject(object, property) {
54048
+ try {
54049
+ return property in object;
54050
+ } catch (_) {
54051
+ return false;
54052
+ }
54053
+ }
54054
+ function propertyIsUnsafe(target, key) {
54055
+ return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
54056
+ }
54057
+ function mergeObject(target, source, options) {
54058
+ var destination = {};
54059
+ if (options.isMergeableObject(target)) {
54060
+ getKeys(target).forEach(function(key) {
54061
+ destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
54062
+ });
54063
+ }
54064
+ getKeys(source).forEach(function(key) {
54065
+ if (propertyIsUnsafe(target, key)) {
54066
+ return;
54067
+ }
54068
+ if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
54069
+ destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
54070
+ } else {
54071
+ destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
54072
+ }
54073
+ });
54074
+ return destination;
54075
+ }
54076
+ function deepmerge(target, source, options) {
54077
+ options = options || {};
54078
+ options.arrayMerge = options.arrayMerge || defaultArrayMerge;
54079
+ options.isMergeableObject = options.isMergeableObject || isMergeableObject;
54080
+ options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
54081
+ var sourceIsArray = Array.isArray(source);
54082
+ var targetIsArray = Array.isArray(target);
54083
+ var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
54084
+ if (!sourceAndTargetTypesMatch) {
54085
+ return cloneUnlessOtherwiseSpecified(source, options);
54086
+ } else if (sourceIsArray) {
54087
+ return options.arrayMerge(target, source, options);
54088
+ } else {
54089
+ return mergeObject(target, source, options);
54090
+ }
54091
+ }
54092
+ deepmerge.all = function deepmergeAll(array, options) {
54093
+ if (!Array.isArray(array)) {
54094
+ throw new Error("first argument should be an array");
54095
+ }
54096
+ return array.reduce(function(prev, next) {
54097
+ return deepmerge(prev, next, options);
54098
+ }, {});
54099
+ };
54100
+ var deepmerge_1 = deepmerge;
54101
+ module2.exports = deepmerge_1;
54102
+ }
54103
+ });
54104
+
54105
54105
  // src/test/index.ts
54106
54106
  var test_exports = {};
54107
54107
  __export(test_exports, {
@@ -54302,9 +54302,9 @@ var fragmentKey = " $fragments";
54302
54302
 
54303
54303
  // src/runtime/lib/key.ts
54304
54304
  var computeKey = ({ field, args }) => {
54305
- const keys = Object.keys(args ?? {});
54306
- keys.sort();
54307
- return args && keys.length > 0 ? `${field}(${keys.map((key) => `${key}: ${stringifyObjectWithNoQuotesOnKeys(args[key])}`).join(", ")})` : field;
54305
+ const keys2 = Object.keys(args ?? {});
54306
+ keys2.sort();
54307
+ return args && keys2.length > 0 ? `${field}(${keys2.map((key) => `${key}: ${stringifyObjectWithNoQuotesOnKeys(args[key])}`).join(", ")})` : field;
54308
54308
  };
54309
54309
  var stringifyObjectWithNoQuotesOnKeys = (obj_from_json) => {
54310
54310
  if (Array.isArray(obj_from_json)) {
@@ -56256,7 +56256,8 @@ var CacheInternal = class {
56256
56256
  parent = rootID,
56257
56257
  variables,
56258
56258
  stepsFromConnection = null,
56259
- ignoreMasking
56259
+ ignoreMasking,
56260
+ fullCheck = false
56260
56261
  }) {
56261
56262
  if (parent === null) {
56262
56263
  return { data: null, partial: false, stale: false, hasData: true };
@@ -56281,11 +56282,28 @@ var CacheInternal = class {
56281
56282
  let targetSelection = getFieldsForType(selection, typename);
56282
56283
  for (const [
56283
56284
  attributeName,
56284
- { type, keyRaw, selection: fieldSelection, nullable, list, visible }
56285
+ { type, keyRaw, selection: fieldSelection, nullable, list, visible, directives }
56285
56286
  ] of Object.entries(targetSelection)) {
56286
- if (!visible && !ignoreMasking) {
56287
+ if (!visible && !ignoreMasking && !fullCheck) {
56287
56288
  continue;
56288
56289
  }
56290
+ const includeDirective = directives?.find((d) => {
56291
+ return d.name === "include";
56292
+ });
56293
+ if (includeDirective) {
56294
+ if (!evaluateFragmentVariables(includeDirective.arguments, variables ?? {})["if"]) {
56295
+ continue;
56296
+ }
56297
+ }
56298
+ const skipDirective = directives?.find((d) => {
56299
+ return d.name === "skip";
56300
+ });
56301
+ if (skipDirective) {
56302
+ if (evaluateFragmentVariables(skipDirective.arguments, variables ?? {})["if"]) {
56303
+ continue;
56304
+ }
56305
+ }
56306
+ const fieldTarget = visible || ignoreMasking ? target : {};
56289
56307
  const key = evaluateKey(keyRaw, variables);
56290
56308
  const { value } = this.storage.get(parent, key);
56291
56309
  const dt_field = this.staleManager.getFieldTime(parent, key);
@@ -56308,16 +56326,16 @@ var CacheInternal = class {
56308
56326
  partial = true;
56309
56327
  }
56310
56328
  if (typeof value === "undefined" || value === null) {
56311
- target[attributeName] = null;
56329
+ fieldTarget[attributeName] = null;
56312
56330
  if (typeof value !== "undefined") {
56313
56331
  hasData = true;
56314
56332
  }
56315
56333
  } else if (!fieldSelection) {
56316
56334
  const fnUnmarshal = this.config?.scalars?.[type]?.unmarshal;
56317
56335
  if (fnUnmarshal) {
56318
- target[attributeName] = fnUnmarshal(value);
56336
+ fieldTarget[attributeName] = fnUnmarshal(value);
56319
56337
  } else {
56320
- target[attributeName] = value;
56338
+ fieldTarget[attributeName] = value;
56321
56339
  }
56322
56340
  hasData = true;
56323
56341
  } else if (Array.isArray(value)) {
@@ -56326,9 +56344,10 @@ var CacheInternal = class {
56326
56344
  variables,
56327
56345
  linkedList: value,
56328
56346
  stepsFromConnection: nextStep,
56329
- ignoreMasking: !!ignoreMasking
56347
+ ignoreMasking: !!ignoreMasking,
56348
+ fullCheck
56330
56349
  });
56331
- target[attributeName] = listValue.data;
56350
+ fieldTarget[attributeName] = listValue.data;
56332
56351
  if (listValue.partial) {
56333
56352
  partial = true;
56334
56353
  }
@@ -56344,9 +56363,10 @@ var CacheInternal = class {
56344
56363
  selection: fieldSelection,
56345
56364
  variables,
56346
56365
  stepsFromConnection: nextStep,
56347
- ignoreMasking
56366
+ ignoreMasking,
56367
+ fullCheck
56348
56368
  });
56349
- target[attributeName] = objectFields.data;
56369
+ fieldTarget[attributeName] = objectFields.data;
56350
56370
  if (objectFields.partial) {
56351
56371
  partial = true;
56352
56372
  }
@@ -56357,7 +56377,7 @@ var CacheInternal = class {
56357
56377
  hasData = true;
56358
56378
  }
56359
56379
  }
56360
- if (target[attributeName] === null && !nullable && !embeddedCursor) {
56380
+ if (fieldTarget[attributeName] === null && !nullable && !embeddedCursor) {
56361
56381
  cascadeNull = true;
56362
56382
  }
56363
56383
  }
@@ -56389,7 +56409,8 @@ var CacheInternal = class {
56389
56409
  variables,
56390
56410
  linkedList,
56391
56411
  stepsFromConnection,
56392
- ignoreMasking
56412
+ ignoreMasking,
56413
+ fullCheck
56393
56414
  }) {
56394
56415
  const result = [];
56395
56416
  let partialData = false;
@@ -56402,7 +56423,8 @@ var CacheInternal = class {
56402
56423
  variables,
56403
56424
  linkedList: entry,
56404
56425
  stepsFromConnection,
56405
- ignoreMasking
56426
+ ignoreMasking,
56427
+ fullCheck
56406
56428
  });
56407
56429
  result.push(nestedValue.data);
56408
56430
  if (nestedValue.partial) {
@@ -56424,7 +56446,8 @@ var CacheInternal = class {
56424
56446
  selection: fields,
56425
56447
  variables,
56426
56448
  stepsFromConnection,
56427
- ignoreMasking
56449
+ ignoreMasking,
56450
+ fullCheck
56428
56451
  });
56429
56452
  result.push(data);
56430
56453
  if (partial) {
@@ -56623,11 +56646,10 @@ var query = documentPlugin(ArtifactKind.Query, function() {
56623
56646
  cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
56624
56647
  }
56625
56648
  lastVariables = { ...marshalVariables(ctx) };
56626
- const variables = lastVariables;
56627
56649
  subscriptionSpec = {
56628
56650
  rootType: ctx.artifact.rootType,
56629
56651
  selection: ctx.artifact.selection,
56630
- variables: () => variables,
56652
+ variables: () => lastVariables,
56631
56653
  set: (newValue) => {
56632
56654
  resolve2(ctx, {
56633
56655
  data: newValue,
@@ -56656,17 +56678,12 @@ var query = documentPlugin(ArtifactKind.Query, function() {
56656
56678
  // src/runtime/client/plugins/fragment.ts
56657
56679
  var fragment = documentPlugin(ArtifactKind.Fragment, function() {
56658
56680
  let subscriptionSpec = null;
56659
- let lastReference = null;
56660
56681
  return {
56661
56682
  start(ctx, { next, resolve: resolve2, variablesChanged, marshalVariables }) {
56662
56683
  if (!ctx.stuff.parentID) {
56663
56684
  return next(ctx);
56664
56685
  }
56665
- const currentReference = {
56666
- parent: ctx.stuff.parentID,
56667
- variables: marshalVariables(ctx)
56668
- };
56669
- if (!ctx.cacheParams?.disableSubscriptions && (!deepEquals(lastReference, currentReference) || variablesChanged(ctx))) {
56686
+ if (variablesChanged(ctx) && !ctx.cacheParams?.disableSubscriptions) {
56670
56687
  if (subscriptionSpec) {
56671
56688
  cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
56672
56689
  }
@@ -56689,7 +56706,6 @@ var fragment = documentPlugin(ArtifactKind.Fragment, function() {
56689
56706
  }
56690
56707
  };
56691
56708
  cache_default.subscribe(subscriptionSpec, variables);
56692
- lastReference = currentReference;
56693
56709
  }
56694
56710
  next(ctx);
56695
56711
  },
@@ -56854,7 +56870,7 @@ var Config = class {
56854
56870
  this.logLevel = (logLevel || LogLevel.Summary).toLowerCase();
56855
56871
  this.defaultFragmentMasking = defaultFragmentMasking;
56856
56872
  this.routesDir = join(this.projectRoot, "src", "routes");
56857
- this.schemaPollInterval = watchSchema?.interval ?? 2e3;
56873
+ this.schemaPollInterval = watchSchema?.interval === void 0 ? 2e3 : watchSchema.interval;
56858
56874
  this.schemaPollHeaders = watchSchema?.headers ?? {};
56859
56875
  this.rootDir = join(this.projectRoot, "$houdini");
56860
56876
  this.#fragmentVariableMaps = {};
@@ -56873,8 +56889,8 @@ var Config = class {
56873
56889
  if (!apiURL) {
56874
56890
  return "";
56875
56891
  }
56876
- const env = await this.getEnv();
56877
- return this.processEnvValues(env, apiURL);
56892
+ const env2 = await this.getEnv();
56893
+ return this.processEnvValues(env2, apiURL);
56878
56894
  }
56879
56895
  get include() {
56880
56896
  if (this.configFile.include) {
@@ -56889,35 +56905,35 @@ var Config = class {
56889
56905
  return this.configFile.plugins?.[name] ?? {};
56890
56906
  }
56891
56907
  async getEnv() {
56892
- let env = process.env;
56908
+ let env2 = process.env;
56893
56909
  for (const plugin2 of this.plugins) {
56894
56910
  if (plugin2.env) {
56895
- env = {
56896
- ...await plugin2.env({ config: this, env })
56911
+ env2 = {
56912
+ ...await plugin2.env({ config: this, env: env2 })
56897
56913
  };
56898
56914
  }
56899
56915
  }
56900
- return env;
56916
+ return env2;
56901
56917
  }
56902
- processEnvValues(env, value) {
56918
+ processEnvValues(env2, value) {
56903
56919
  let headerValue;
56904
56920
  if (typeof value === "function") {
56905
- headerValue = value(env);
56921
+ headerValue = value(env2);
56906
56922
  } else if (value.startsWith("env:")) {
56907
- headerValue = env[value.slice("env:".length)];
56923
+ headerValue = env2[value.slice("env:".length)];
56908
56924
  } else {
56909
56925
  headerValue = value;
56910
56926
  }
56911
56927
  return headerValue;
56912
56928
  }
56913
56929
  async pullHeaders() {
56914
- const env = await this.getEnv();
56930
+ const env2 = await this.getEnv();
56915
56931
  if (typeof this.schemaPollHeaders === "function") {
56916
- return this.schemaPollHeaders(env);
56932
+ return this.schemaPollHeaders(env2);
56917
56933
  }
56918
56934
  const headers = Object.fromEntries(
56919
56935
  Object.entries(this.schemaPollHeaders || {}).map(([key, value]) => {
56920
- const headerValue = this.processEnvValues(env, value);
56936
+ const headerValue = this.processEnvValues(env2, value);
56921
56937
  if (!headerValue) {
56922
56938
  return [];
56923
56939
  }
@@ -57198,17 +57214,6 @@ var Config = class {
57198
57214
  }, []) ?? [];
57199
57215
  return !defaultDirectives.includes(name) && (internalDirectives.includes(name) || this.isDeleteDirective(name));
57200
57216
  }
57201
- needsRefetchArtifact(document) {
57202
- let needsArtifact = false;
57203
- graphql.visit(document, {
57204
- Directive: (node) => {
57205
- if ([this.paginateDirective].includes(node.name.value)) {
57206
- needsArtifact = true;
57207
- }
57208
- }
57209
- });
57210
- return needsArtifact;
57211
- }
57212
57217
  #fragmentVariableMaps;
57213
57218
  registerFragmentVariablesHash({
57214
57219
  hash,
@@ -57216,7 +57221,7 @@ var Config = class {
57216
57221
  fragment: fragment2
57217
57222
  }) {
57218
57223
  this.#fragmentVariableMaps[hash] = {
57219
- args: this.#serializeValueMap(args),
57224
+ args: this.serializeValueMap(args),
57220
57225
  fragment: fragment2
57221
57226
  };
57222
57227
  }
@@ -57227,7 +57232,7 @@ var Config = class {
57227
57232
  hash
57228
57233
  };
57229
57234
  }
57230
- #serializeValueMap(map) {
57235
+ serializeValueMap(map) {
57231
57236
  if (!map) {
57232
57237
  return null;
57233
57238
  }
@@ -57242,7 +57247,7 @@ var Config = class {
57242
57247
  }
57243
57248
  if ("values" in input) {
57244
57249
  result.values = input.values.map(
57245
- (value) => this.#serializeValueMap({ foo: value }).foo
57250
+ (value) => this.serializeValueMap({ foo: value }).foo
57246
57251
  );
57247
57252
  }
57248
57253
  if ("name" in input) {
@@ -57251,7 +57256,7 @@ var Config = class {
57251
57256
  if ("fields" in input) {
57252
57257
  result.fields = input.fields.map((field) => ({
57253
57258
  name: field.name,
57254
- value: this.#serializeValueMap({ foo: field.value }).foo
57259
+ value: this.serializeValueMap({ foo: field.value }).foo
57255
57260
  }));
57256
57261
  }
57257
57262
  }
@@ -57480,40 +57485,13 @@ var TypeWrapper = /* @__PURE__ */ ((TypeWrapper2) => {
57480
57485
 
57481
57486
  // src/lib/parse.ts
57482
57487
  var import_parser = __toESM(require_lib3(), 1);
57483
-
57484
- // src/lib/deepMerge.ts
57485
- var import_deepmerge = __toESM(require_cjs(), 1);
57486
- function deepMerge(filepath, ...targets) {
57487
- try {
57488
- if (targets.length === 1) {
57489
- return targets[0];
57490
- } else if (targets.length === 2) {
57491
- return (0, import_deepmerge.default)(targets[0], targets[1], {
57492
- arrayMerge: (source, update) => [...new Set(source.concat(update))]
57493
- });
57494
- }
57495
- return deepMerge(filepath, targets[0], deepMerge(filepath, ...targets.slice(1)));
57496
- } catch (e) {
57497
- throw new HoudiniError({
57498
- filepath,
57499
- message: "could not merge: " + JSON.stringify(targets, null, 4),
57500
- description: e.message
57501
- });
57502
- }
57503
- }
57504
-
57505
- // src/lib/parse.ts
57506
- async function parseJS(str, config2) {
57507
- const defaultConfig = {
57508
- plugins: ["typescript"],
57509
- sourceType: "module"
57510
- };
57488
+ async function parseJS(str) {
57511
57489
  return {
57512
57490
  start: 0,
57513
- script: (0, import_parser.parse)(
57514
- str || "",
57515
- config2 ? deepMerge("", defaultConfig, config2) : defaultConfig
57516
- ).program,
57491
+ script: (0, import_parser.parse)(str || "", {
57492
+ plugins: ["typescript"],
57493
+ sourceType: "module"
57494
+ }).program,
57517
57495
  end: str.length
57518
57496
  };
57519
57497
  }
@@ -57563,6 +57541,27 @@ async function cleanupFiles(pathFolder, listOfObj) {
57563
57541
  return allFilesNotInList;
57564
57542
  }
57565
57543
 
57544
+ // src/lib/deepMerge.ts
57545
+ var import_deepmerge = __toESM(require_cjs(), 1);
57546
+ function deepMerge(filepath, ...targets) {
57547
+ try {
57548
+ if (targets.length === 1) {
57549
+ return targets[0];
57550
+ } else if (targets.length === 2) {
57551
+ return (0, import_deepmerge.default)(targets[0], targets[1], {
57552
+ arrayMerge: (source, update) => [...new Set(source.concat(update))]
57553
+ });
57554
+ }
57555
+ return deepMerge(filepath, targets[0], deepMerge(filepath, ...targets.slice(1)));
57556
+ } catch (e) {
57557
+ throw new HoudiniError({
57558
+ filepath,
57559
+ message: "could not merge: " + targets,
57560
+ description: e.message
57561
+ });
57562
+ }
57563
+ }
57564
+
57566
57565
  // src/codegen/generators/artifacts/index.ts
57567
57566
  var graphql12 = __toESM(require_graphql2(), 1);
57568
57567
  var recast5 = __toESM(require_main2(), 1);
@@ -57864,6 +57863,205 @@ function murmurHash(str) {
57864
57863
  return s;
57865
57864
  }
57866
57865
 
57866
+ // ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/types.js
57867
+ var VOID = -1;
57868
+ var PRIMITIVE = 0;
57869
+ var ARRAY = 1;
57870
+ var OBJECT = 2;
57871
+ var DATE = 3;
57872
+ var REGEXP = 4;
57873
+ var MAP = 5;
57874
+ var SET = 6;
57875
+ var ERROR = 7;
57876
+ var BIGINT = 8;
57877
+
57878
+ // ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/deserialize.js
57879
+ var env = typeof self === "object" ? self : globalThis;
57880
+ var deserializer = ($, _) => {
57881
+ const as = (out, index) => {
57882
+ $.set(index, out);
57883
+ return out;
57884
+ };
57885
+ const unpair = (index) => {
57886
+ if ($.has(index))
57887
+ return $.get(index);
57888
+ const [type, value] = _[index];
57889
+ switch (type) {
57890
+ case PRIMITIVE:
57891
+ case VOID:
57892
+ return as(value, index);
57893
+ case ARRAY: {
57894
+ const arr = as([], index);
57895
+ for (const index2 of value)
57896
+ arr.push(unpair(index2));
57897
+ return arr;
57898
+ }
57899
+ case OBJECT: {
57900
+ const object = as({}, index);
57901
+ for (const [key, index2] of value)
57902
+ object[unpair(key)] = unpair(index2);
57903
+ return object;
57904
+ }
57905
+ case DATE:
57906
+ return as(new Date(value), index);
57907
+ case REGEXP: {
57908
+ const { source, flags } = value;
57909
+ return as(new RegExp(source, flags), index);
57910
+ }
57911
+ case MAP: {
57912
+ const map = as(/* @__PURE__ */ new Map(), index);
57913
+ for (const [key, index2] of value)
57914
+ map.set(unpair(key), unpair(index2));
57915
+ return map;
57916
+ }
57917
+ case SET: {
57918
+ const set = as(/* @__PURE__ */ new Set(), index);
57919
+ for (const index2 of value)
57920
+ set.add(unpair(index2));
57921
+ return set;
57922
+ }
57923
+ case ERROR: {
57924
+ const { name, message } = value;
57925
+ return as(new env[name](message), index);
57926
+ }
57927
+ case BIGINT:
57928
+ return as(BigInt(value), index);
57929
+ case "BigInt":
57930
+ return as(Object(BigInt(value)), index);
57931
+ }
57932
+ return as(new env[type](value), index);
57933
+ };
57934
+ return unpair;
57935
+ };
57936
+ var deserialize = (serialized) => deserializer(/* @__PURE__ */ new Map(), serialized)(0);
57937
+
57938
+ // ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/serialize.js
57939
+ var EMPTY = "";
57940
+ var { toString } = {};
57941
+ var { keys } = Object;
57942
+ var typeOf = (value) => {
57943
+ const type = typeof value;
57944
+ if (type !== "object" || !value)
57945
+ return [PRIMITIVE, type];
57946
+ const asString = toString.call(value).slice(8, -1);
57947
+ switch (asString) {
57948
+ case "Array":
57949
+ return [ARRAY, EMPTY];
57950
+ case "Object":
57951
+ return [OBJECT, EMPTY];
57952
+ case "Date":
57953
+ return [DATE, EMPTY];
57954
+ case "RegExp":
57955
+ return [REGEXP, EMPTY];
57956
+ case "Map":
57957
+ return [MAP, EMPTY];
57958
+ case "Set":
57959
+ return [SET, EMPTY];
57960
+ }
57961
+ if (asString.includes("Array"))
57962
+ return [ARRAY, asString];
57963
+ if (asString.includes("Error"))
57964
+ return [ERROR, asString];
57965
+ return [OBJECT, asString];
57966
+ };
57967
+ var shouldSkip = ([TYPE, type]) => TYPE === PRIMITIVE && (type === "function" || type === "symbol");
57968
+ var serializer = (strict, json, $, _) => {
57969
+ const as = (out, value) => {
57970
+ const index = _.push(out) - 1;
57971
+ $.set(value, index);
57972
+ return index;
57973
+ };
57974
+ const pair = (value) => {
57975
+ if ($.has(value))
57976
+ return $.get(value);
57977
+ let [TYPE, type] = typeOf(value);
57978
+ switch (TYPE) {
57979
+ case PRIMITIVE: {
57980
+ let entry = value;
57981
+ switch (type) {
57982
+ case "bigint":
57983
+ TYPE = BIGINT;
57984
+ entry = value.toString();
57985
+ break;
57986
+ case "function":
57987
+ case "symbol":
57988
+ if (strict)
57989
+ throw new TypeError("unable to serialize " + type);
57990
+ entry = null;
57991
+ break;
57992
+ case "undefined":
57993
+ return as([VOID], value);
57994
+ }
57995
+ return as([TYPE, entry], value);
57996
+ }
57997
+ case ARRAY: {
57998
+ if (type)
57999
+ return as([type, [...value]], value);
58000
+ const arr = [];
58001
+ const index = as([TYPE, arr], value);
58002
+ for (const entry of value)
58003
+ arr.push(pair(entry));
58004
+ return index;
58005
+ }
58006
+ case OBJECT: {
58007
+ if (type) {
58008
+ switch (type) {
58009
+ case "BigInt":
58010
+ return as([type, value.toString()], value);
58011
+ case "Boolean":
58012
+ case "Number":
58013
+ case "String":
58014
+ return as([type, value.valueOf()], value);
58015
+ }
58016
+ }
58017
+ if (json && "toJSON" in value)
58018
+ return pair(value.toJSON());
58019
+ const entries = [];
58020
+ const index = as([TYPE, entries], value);
58021
+ for (const key of keys(value)) {
58022
+ if (strict || !shouldSkip(typeOf(value[key])))
58023
+ entries.push([pair(key), pair(value[key])]);
58024
+ }
58025
+ return index;
58026
+ }
58027
+ case DATE:
58028
+ return as([TYPE, value.toISOString()], value);
58029
+ case REGEXP: {
58030
+ const { source, flags } = value;
58031
+ return as([TYPE, { source, flags }], value);
58032
+ }
58033
+ case MAP: {
58034
+ const entries = [];
58035
+ const index = as([TYPE, entries], value);
58036
+ for (const [key, entry] of value) {
58037
+ if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry))))
58038
+ entries.push([pair(key), pair(entry)]);
58039
+ }
58040
+ return index;
58041
+ }
58042
+ case SET: {
58043
+ const entries = [];
58044
+ const index = as([TYPE, entries], value);
58045
+ for (const entry of value) {
58046
+ if (strict || !shouldSkip(typeOf(entry)))
58047
+ entries.push(pair(entry));
58048
+ }
58049
+ return index;
58050
+ }
58051
+ }
58052
+ const { message } = value;
58053
+ return as([TYPE, { name: type, message }], value);
58054
+ };
58055
+ return pair;
58056
+ };
58057
+ var serialize = (value, { json, lossy } = {}) => {
58058
+ const _ = [];
58059
+ return serializer(!(json || lossy), !!json, /* @__PURE__ */ new Map(), _)(value), _;
58060
+ };
58061
+
58062
+ // ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/index.js
58063
+ var esm_default = typeof structuredClone === "function" ? (any, options) => options && ("json" in options || "lossy" in options) ? deserialize(serialize(any, options)) : structuredClone(any) : (any, options) => deserialize(serialize(any, options));
58064
+
57867
58065
  // src/codegen/transforms/fragmentVariables.ts
57868
58066
  var graphql3 = __toESM(require_graphql2(), 1);
57869
58067
 
@@ -58011,61 +58209,67 @@ function inlineFragmentArgs({
58011
58209
  filepath,
58012
58210
  document
58013
58211
  ).reduce((acc, arg) => ({ ...acc, [arg.name]: arg }), {});
58014
- const result = graphql3.visit(document, {
58015
- FragmentSpread(node) {
58016
- if (!fragmentDefinitions[node.name.value]) {
58017
- throw new Error("Could not find definition for fragment" + node.name.value);
58018
- }
58019
- const { definition } = fragmentDefinitions[node.name.value];
58020
- let { args, hash } = collectWithArguments(config2, filepath, node, scope);
58021
- const newFragmentName = `${node.name.value}${hash}`;
58022
- config2.registerFragmentVariablesHash({
58023
- hash: newFragmentName,
58024
- fragment: node.name.value,
58025
- args
58026
- });
58027
- if (!visitedFragments.has(newFragmentName)) {
58028
- visitedFragments.add(newFragmentName);
58029
- const defaultArguments = collectDefaultArgumentValues(config2, filepath, definition);
58030
- if (args) {
58031
- for (const [field, value] of Object.entries(defaultArguments || {})) {
58032
- if (!args[field]) {
58033
- args[field] = value;
58034
- }
58035
- }
58036
- generatedFragments[newFragmentName] = inlineFragmentArgs({
58037
- config: config2,
58212
+ const result = esm_default(
58213
+ graphql3.visit(document, {
58214
+ FragmentSpread(node) {
58215
+ if (!fragmentDefinitions[node.name.value]) {
58216
+ throw new Error("Could not find definition for fragment" + node.name.value);
58217
+ }
58218
+ const { definition } = fragmentDefinitions[node.name.value];
58219
+ let { args, hash } = collectWithArguments(config2, filepath, node, scope);
58220
+ const newFragmentName = `${node.name.value}${hash}`;
58221
+ config2.registerFragmentVariablesHash({
58222
+ hash: newFragmentName,
58223
+ fragment: node.name.value,
58224
+ args
58225
+ });
58226
+ if (!visitedFragments.has(newFragmentName)) {
58227
+ visitedFragments.add(newFragmentName);
58228
+ const defaultArguments = collectDefaultArgumentValues(
58229
+ config2,
58038
58230
  filepath,
58039
- fragmentDefinitions,
58040
- document: fragmentDefinitions[node.name.value].definition,
58041
- generatedFragments,
58042
- visitedFragments,
58043
- scope: args,
58044
- newName: newFragmentName
58045
- });
58046
- } else {
58047
- const doc = fragmentDefinitions[node.name.value].document;
58048
- const definitionIndex = doc.document.definitions.findIndex(
58049
- (definition2) => definition2.kind === "FragmentDefinition" && definition2.name.value === node.name.value
58231
+ definition
58050
58232
  );
58051
- const localDefinitions = [...doc.document.definitions];
58052
- localDefinitions.splice(definitionIndex, 1);
58053
- localDefinitions.push(
58054
- inlineFragmentArgs({
58233
+ if (args) {
58234
+ for (const [field, value] of Object.entries(defaultArguments || {})) {
58235
+ if (!args[field]) {
58236
+ args[field] = value;
58237
+ }
58238
+ }
58239
+ generatedFragments[newFragmentName] = inlineFragmentArgs({
58055
58240
  config: config2,
58056
58241
  filepath,
58057
58242
  fragmentDefinitions,
58058
58243
  document: fragmentDefinitions[node.name.value].definition,
58059
58244
  generatedFragments,
58060
58245
  visitedFragments,
58061
- scope: defaultArguments,
58062
- newName: ""
58063
- })
58064
- );
58065
- doc.document = {
58066
- ...doc.document,
58067
- definitions: localDefinitions
58068
- };
58246
+ scope: args,
58247
+ newName: newFragmentName
58248
+ });
58249
+ } else {
58250
+ const doc = fragmentDefinitions[node.name.value].document;
58251
+ const definitionIndex = doc.document.definitions.findIndex(
58252
+ (definition2) => definition2.kind === "FragmentDefinition" && definition2.name.value === node.name.value
58253
+ );
58254
+ const localDefinitions = [...doc.document.definitions];
58255
+ localDefinitions.splice(definitionIndex, 1);
58256
+ localDefinitions.push(
58257
+ inlineFragmentArgs({
58258
+ config: config2,
58259
+ filepath,
58260
+ fragmentDefinitions,
58261
+ document: fragmentDefinitions[node.name.value].definition,
58262
+ generatedFragments,
58263
+ visitedFragments,
58264
+ scope: defaultArguments,
58265
+ newName: ""
58266
+ })
58267
+ );
58268
+ doc.document = {
58269
+ ...doc.document,
58270
+ definitions: localDefinitions
58271
+ };
58272
+ }
58069
58273
  }
58070
58274
  if (node.name.value !== newFragmentName) {
58071
58275
  return {
@@ -58076,35 +58280,35 @@ function inlineFragmentArgs({
58076
58280
  }
58077
58281
  };
58078
58282
  }
58283
+ },
58284
+ Argument(node) {
58285
+ const value = node.value;
58286
+ if (value.kind !== "Variable") {
58287
+ return;
58288
+ }
58289
+ if (!scope) {
58290
+ throw new HoudiniError({
58291
+ filepath,
58292
+ message: node.name.value + " is not defined in the current scope: " + JSON.stringify(scope)
58293
+ });
58294
+ }
58295
+ const newValue = scope[value.name.value];
58296
+ if (newValue) {
58297
+ return {
58298
+ ...node,
58299
+ value: newValue
58300
+ };
58301
+ }
58302
+ if (definitionArgs[value.name.value] && definitionArgs[value.name.value].required) {
58303
+ throw new HoudiniError({
58304
+ filepath,
58305
+ message: "Missing value for required arg: " + value.name.value
58306
+ });
58307
+ }
58308
+ return null;
58079
58309
  }
58080
- },
58081
- Argument(node) {
58082
- const value = node.value;
58083
- if (value.kind !== "Variable") {
58084
- return;
58085
- }
58086
- if (!scope) {
58087
- throw new HoudiniError({
58088
- filepath,
58089
- message: node.name.value + " is not defined in the current scope: " + JSON.stringify(scope)
58090
- });
58091
- }
58092
- const newValue = scope[value.name.value];
58093
- if (newValue) {
58094
- return {
58095
- ...node,
58096
- value: newValue
58097
- };
58098
- }
58099
- if (definitionArgs[value.name.value] && definitionArgs[value.name.value].required) {
58100
- throw new HoudiniError({
58101
- filepath,
58102
- message: "Missing value for required arg: " + value.name.value
58103
- });
58104
- }
58105
- return null;
58106
- }
58107
- });
58310
+ })
58311
+ );
58108
58312
  if (newName) {
58109
58313
  result.name = {
58110
58314
  kind: graphql3.Kind.NAME,
@@ -58820,7 +59024,7 @@ async function paginate(config2, documents) {
58820
59024
  ]
58821
59025
  }
58822
59026
  ];
58823
- const keys = config2.keyFieldsForType(!nodeQuery ? config2.schema.getQueryType()?.name || "" : fragment2).flatMap((key) => {
59027
+ const keys2 = config2.keyFieldsForType(!nodeQuery ? config2.schema.getQueryType()?.name || "" : fragment2).flatMap((key) => {
58824
59028
  if (fragment2 === config2.schema.getQueryType()?.name) {
58825
59029
  return [];
58826
59030
  }
@@ -58870,7 +59074,7 @@ async function paginate(config2, documents) {
58870
59074
  }
58871
59075
  })
58872
59076
  ).concat(
58873
- !nodeQuery ? [] : keys.map(
59077
+ !nodeQuery ? [] : keys2.map(
58874
59078
  (key) => ({
58875
59079
  kind: graphql8.Kind.VARIABLE_DEFINITION,
58876
59080
  type: key.type,
@@ -58893,7 +59097,7 @@ async function paginate(config2, documents) {
58893
59097
  kind: graphql8.Kind.NAME,
58894
59098
  value: typeConfig?.resolve?.queryField || "node"
58895
59099
  },
58896
- ["arguments"]: keys.map((key) => ({
59100
+ ["arguments"]: keys2.map((key) => ({
58897
59101
  kind: graphql8.Kind.ARGUMENT,
58898
59102
  name: {
58899
59103
  kind: graphql8.Kind.NAME,
@@ -59587,12 +59791,24 @@ function prepareSelection({
59587
59791
  }
59588
59792
  const typeName = fieldType.toString();
59589
59793
  const pathSoFar = path2.concat(attributeName);
59590
- const keys = config2.keyFieldsForType(rootType);
59794
+ const keys2 = config2.keyFieldsForType(rootType);
59591
59795
  let fieldObj = {
59592
59796
  type: typeName,
59593
59797
  keyRaw: fieldKey(config2, field)
59594
59798
  };
59595
- if (keys.includes(field.name.value)) {
59799
+ if (field.directives && field.directives.length > 0) {
59800
+ fieldObj.directives = field.directives?.map((directive) => ({
59801
+ name: directive.name.value,
59802
+ arguments: (directive.arguments ?? []).reduce(
59803
+ (acc, arg) => ({
59804
+ ...acc,
59805
+ [arg.name.value]: config2.serializeValueMap({ field: arg.value })["field"]
59806
+ }),
59807
+ {}
59808
+ )
59809
+ }));
59810
+ }
59811
+ if (keys2.includes(field.name.value)) {
59596
59812
  fieldObj.visible = true;
59597
59813
  }
59598
59814
  if (nullable) {
@@ -59817,12 +60033,7 @@ function artifactGenerator(stats) {
59817
60033
  writeIndexFile(config2, docs)
59818
60034
  ].concat(
59819
60035
  docs.map(async (doc) => {
59820
- const {
59821
- document,
59822
- name,
59823
- generateArtifact,
59824
- originalParsed
59825
- } = doc;
60036
+ const { document, name, generateArtifact, originalParsed, originalString } = doc;
59826
60037
  if (!generateArtifact) {
59827
60038
  return;
59828
60039
  }
@@ -60237,12 +60448,12 @@ ${exportStatement("config")}
60237
60448
  },
60238
60449
  [path_exports.join(config2.runtimeSource, "client", "plugins", "injectedPlugins.js")]: (content) => injectPlugins({ config: config2, content, importStatement, exportStatement })
60239
60450
  }),
60240
- ...config2.plugins.filter((plugin2) => plugin2.includeRuntime).map((plugin2) => generatePluginRuntime(config2, docs, plugin2)),
60451
+ ...config2.plugins.filter((plugin2) => plugin2.includeRuntime).map((plugin2) => generatePluginRuntime(config2, plugin2)),
60241
60452
  generatePluginIndex({ config: config2, exportStatement: exportStar })
60242
60453
  ]);
60243
60454
  await generateGraphqlReturnTypes(config2, docs);
60244
60455
  }
60245
- async function generatePluginRuntime(config2, docs, plugin2) {
60456
+ async function generatePluginRuntime(config2, plugin2) {
60246
60457
  if (houdini_mode.is_testing || !plugin2.includeRuntime) {
60247
60458
  return;
60248
60459
  }
@@ -60259,16 +60470,12 @@ async function generatePluginRuntime(config2, docs, plugin2) {
60259
60470
  });
60260
60471
  }
60261
60472
  const pluginDir = config2.pluginRuntimeDirectory(plugin2.name);
60262
- let transformMap = plugin2.transformRuntime ?? {};
60263
- if (transformMap && typeof transformMap === "function") {
60264
- transformMap = transformMap(docs);
60265
- }
60266
60473
  await fs_exports.mkdirp(pluginDir);
60267
60474
  await fs_exports.recursiveCopy(
60268
60475
  runtime_path,
60269
60476
  pluginDir,
60270
60477
  Object.fromEntries(
60271
- Object.entries(transformMap).map(([key, value]) => [
60478
+ Object.entries(plugin2.transformRuntime ?? {}).map(([key, value]) => [
60272
60479
  path_exports.join(runtime_path, key),
60273
60480
  (content) => value({ config: config2, content })
60274
60481
  ])
@@ -60708,8 +60915,7 @@ async function generateDocumentTypes(config2, docs) {
60708
60915
  originalParsed: originalDocument,
60709
60916
  name,
60710
60917
  filename,
60711
- generateArtifact,
60712
- artifact
60918
+ generateArtifact
60713
60919
  }) => {
60714
60920
  if (!generateArtifact) {
60715
60921
  return;
@@ -60748,14 +60954,6 @@ async function generateDocumentTypes(config2, docs) {
60748
60954
  missingScalars
60749
60955
  );
60750
60956
  }
60751
- program.body.push(
60752
- AST11.exportNamedDeclaration(
60753
- AST11.tsTypeAliasDeclaration(
60754
- AST11.identifier(`${name}$artifact`),
60755
- convertToTs(serializeValue(artifact))
60756
- )
60757
- )
60758
- );
60759
60957
  await fs_exports.writeFile(typeDefPath, recast11.print(program).code);
60760
60958
  typePaths.push(typeDefPath);
60761
60959
  }
@@ -60782,17 +60980,18 @@ export * from "${module2}"
60782
60980
  `;
60783
60981
  let indexContent = recast11.print(typeIndex).code;
60784
60982
  for (const plugin2 of config2.plugins) {
60785
- if (plugin2.indexFile) {
60786
- indexContent = plugin2.indexFile({
60787
- config: config2,
60788
- content: indexContent,
60789
- exportDefaultAs,
60790
- exportStarFrom: exportStarFrom2,
60791
- pluginRoot: config2.pluginDirectory(plugin2.name),
60792
- typedef: true,
60793
- documents: docs
60794
- });
60983
+ if (!plugin2.indexFile) {
60984
+ continue;
60795
60985
  }
60986
+ indexContent = plugin2.indexFile({
60987
+ config: config2,
60988
+ content: indexContent,
60989
+ exportDefaultAs,
60990
+ exportStarFrom: exportStarFrom2,
60991
+ pluginRoot: config2.pluginDirectory(plugin2.name),
60992
+ typedef: true,
60993
+ documents: docs
60994
+ });
60796
60995
  if (plugin2.includeRuntime) {
60797
60996
  indexContent += exportStarFrom2({
60798
60997
  module: "./" + path_exports.relative(config2.rootDir, config2.pluginRuntimeDirectory(plugin2.name))
@@ -60824,42 +61023,6 @@ ${[...missingScalars].map(
60824
61023
  For more information, please visit this link: ${siteURL}/api/config#custom-scalars`);
60825
61024
  }
60826
61025
  }
60827
- function convertToTs(source) {
60828
- if (source.type === "ObjectExpression") {
60829
- return AST11.tsTypeLiteral(
60830
- source.properties.reduce(
60831
- (props, prop) => {
60832
- if (prop.type !== "ObjectProperty" || prop.key.type !== "StringLiteral" && prop.key.type === "Identifier") {
60833
- return props;
60834
- }
60835
- return [
60836
- ...props,
60837
- AST11.tsPropertySignature(
60838
- prop.key,
60839
- AST11.tsTypeAnnotation(convertToTs(prop.value))
60840
- )
60841
- ];
60842
- },
60843
- []
60844
- )
60845
- );
60846
- }
60847
- if (source.type === "ArrayExpression") {
60848
- return AST11.tsTupleType(
60849
- source.elements.map((element) => convertToTs(element))
60850
- );
60851
- }
60852
- if (source.type === "Literal" && typeof source.value === "boolean") {
60853
- return AST11.tsLiteralType(AST11.booleanLiteral(source.value));
60854
- }
60855
- if (source.type === "Literal" && typeof source.value === "number") {
60856
- return AST11.tsLiteralType(AST11.numericLiteral(source.value));
60857
- }
60858
- if (source.type === "Literal" && typeof source.value === "string") {
60859
- return AST11.tsLiteralType(AST11.stringLiteral(source.value));
60860
- }
60861
- return AST11.tsLiteralType(source);
60862
- }
60863
61026
  async function generateOperationTypeDefs(config2, filepath, body, definition, selections, visitedTypes, missingScalars) {
60864
61027
  let parentType = null;
60865
61028
  if (definition.operation === "query") {
@@ -61131,10 +61294,10 @@ function typeDefinitions(config2, body, docs, returnType) {
61131
61294
  typeName = "__ROOT__";
61132
61295
  }
61133
61296
  let idFields = AST12.tsNeverKeyword();
61134
- const keys = keyFieldsForType(config2.configFile, type.name);
61135
- if (graphql17.isObjectType(type) && keys.length > 0 && keys.every((key) => type.getFields()[key])) {
61297
+ const keys2 = keyFieldsForType(config2.configFile, type.name);
61298
+ if (graphql17.isObjectType(type) && keys2.length > 0 && keys2.every((key) => type.getFields()[key])) {
61136
61299
  idFields = AST12.tsTypeLiteral(
61137
- keys.map((key) => {
61300
+ keys2.map((key) => {
61138
61301
  const fieldType = type.getFields()[key];
61139
61302
  const unwrapped = unwrapType(config2, fieldType.type);
61140
61303
  return AST12.tsPropertySignature(
@@ -61567,6 +61730,9 @@ async function writeIndexFile2(config2, docs) {
61567
61730
  module: relative2(config2.pluginRuntimeDirectory(plugin2.name))
61568
61731
  });
61569
61732
  }
61733
+ if (!plugin2.indexFile) {
61734
+ continue;
61735
+ }
61570
61736
  }
61571
61737
  await fs_exports.writeFile(path_exports.join(config2.rootDir, "index.js"), body);
61572
61738
  }
@@ -62877,7 +63043,7 @@ function testConfigFile({ plugins, ...config2 } = {}) {
62877
63043
  usersByCursor(first: Int, after: String, last: Int, before: String): UserConnection!
62878
63044
  usersByBackwardsCursor(last: Int, before: String): UserConnection!
62879
63045
  usersByForwardsCursor(first: Int, after: String): UserConnection!
62880
- usersByOffset(offset: Int, limit: Int): [User!]!
63046
+ usersByOffset(offset: Int, limit: Int, stringFilter: String, filter: UserFilter): [User!]!
62881
63047
  friendsByCursor(first: Int, after: String, last: Int, before: String): FriendConnection!
62882
63048
  ghostsByCursor(first: Int, after: String, last: Int, before: String): IsGhostConnection!
62883
63049
  entitiesByCursor(first: Int, after: String, last: Int, before: String): EntityConnection!
@@ -62887,6 +63053,10 @@ function testConfigFile({ plugins, ...config2 } = {}) {
62887
63053
  monkeys: MonkeyConnection!
62888
63054
  }
62889
63055
 
63056
+ input UserFilter {
63057
+ name: String
63058
+ }
63059
+
62890
63060
  type PageInfo {
62891
63061
  hasPreviousPage: Boolean!
62892
63062
  hasNextPage: Boolean!
@@ -62965,7 +63135,7 @@ function testConfigFile({ plugins, ...config2 } = {}) {
62965
63135
  interface IsGhost {
62966
63136
  aka: String!
62967
63137
  }
62968
-
63138
+
62969
63139
  interface Animal implements Node {
62970
63140
  id: ID!
62971
63141
  name: String!