houdini 1.1.4-react.0 → 1.1.4

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 +607 -444
  2. package/build/cmd-esm/index.js +607 -444
  3. package/build/codegen/transforms/fragmentVariables.d.ts +0 -11
  4. package/build/codegen-cjs/index.js +577 -403
  5. package/build/codegen-esm/index.js +577 -403
  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 +187 -195
  10. package/build/lib-esm/index.js +187 -195
  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 +598 -428
  34. package/build/test-esm/index.js +598 -428
  35. package/build/vite-cjs/index.js +617 -454
  36. package/build/vite-esm/index.js +617 -454
  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
@@ -1128,8 +1128,8 @@ ${originalIndentation}`;
1128
1128
  stack.pop();
1129
1129
  return `[${res}]`;
1130
1130
  }
1131
- let keys = Object.keys(value);
1132
- const keyLength = keys.length;
1131
+ let keys2 = Object.keys(value);
1132
+ const keyLength = keys2.length;
1133
1133
  if (keyLength === 0) {
1134
1134
  return "{}";
1135
1135
  }
@@ -1147,16 +1147,16 @@ ${indentation}`;
1147
1147
  let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
1148
1148
  if (isTypedArrayWithEntries(value)) {
1149
1149
  res += stringifyTypedArray(value, join3, maximumBreadth);
1150
- keys = keys.slice(value.length);
1150
+ keys2 = keys2.slice(value.length);
1151
1151
  maximumPropertiesToStringify -= value.length;
1152
1152
  separator = join3;
1153
1153
  }
1154
1154
  if (deterministic) {
1155
- keys = insertSort(keys);
1155
+ keys2 = insertSort(keys2);
1156
1156
  }
1157
1157
  stack.push(value);
1158
1158
  for (let i2 = 0; i2 < maximumPropertiesToStringify; i2++) {
1159
- const key2 = keys[i2];
1159
+ const key2 = keys2[i2];
1160
1160
  const tmp = stringifyFnReplacer(key2, value, stack, replacer, spacer, indentation);
1161
1161
  if (tmp !== void 0) {
1162
1162
  res += `${separator}"${strEscape(key2)}":${whitespace}${tmp}`;
@@ -1335,8 +1335,8 @@ ${originalIndentation}`;
1335
1335
  stack.pop();
1336
1336
  return `[${res2}]`;
1337
1337
  }
1338
- let keys = Object.keys(value);
1339
- const keyLength = keys.length;
1338
+ let keys2 = Object.keys(value);
1339
+ const keyLength = keys2.length;
1340
1340
  if (keyLength === 0) {
1341
1341
  return "{}";
1342
1342
  }
@@ -1351,16 +1351,16 @@ ${indentation}`;
1351
1351
  let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
1352
1352
  if (isTypedArrayWithEntries(value)) {
1353
1353
  res += stringifyTypedArray(value, join3, maximumBreadth);
1354
- keys = keys.slice(value.length);
1354
+ keys2 = keys2.slice(value.length);
1355
1355
  maximumPropertiesToStringify -= value.length;
1356
1356
  separator = join3;
1357
1357
  }
1358
1358
  if (deterministic) {
1359
- keys = insertSort(keys);
1359
+ keys2 = insertSort(keys2);
1360
1360
  }
1361
1361
  stack.push(value);
1362
1362
  for (let i2 = 0; i2 < maximumPropertiesToStringify; i2++) {
1363
- const key2 = keys[i2];
1363
+ const key2 = keys2[i2];
1364
1364
  const tmp = stringifyIndent(key2, value[key2], stack, spacer, indentation);
1365
1365
  if (tmp !== void 0) {
1366
1366
  res += `${separator}"${strEscape(key2)}": ${tmp}`;
@@ -1439,8 +1439,8 @@ ${originalIndentation}`;
1439
1439
  stack.pop();
1440
1440
  return `[${res}]`;
1441
1441
  }
1442
- let keys = Object.keys(value);
1443
- const keyLength = keys.length;
1442
+ let keys2 = Object.keys(value);
1443
+ const keyLength = keys2.length;
1444
1444
  if (keyLength === 0) {
1445
1445
  return "{}";
1446
1446
  }
@@ -1451,16 +1451,16 @@ ${originalIndentation}`;
1451
1451
  let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
1452
1452
  if (isTypedArrayWithEntries(value)) {
1453
1453
  res += stringifyTypedArray(value, ",", maximumBreadth);
1454
- keys = keys.slice(value.length);
1454
+ keys2 = keys2.slice(value.length);
1455
1455
  maximumPropertiesToStringify -= value.length;
1456
1456
  separator = ",";
1457
1457
  }
1458
1458
  if (deterministic) {
1459
- keys = insertSort(keys);
1459
+ keys2 = insertSort(keys2);
1460
1460
  }
1461
1461
  stack.push(value);
1462
1462
  for (let i2 = 0; i2 < maximumPropertiesToStringify; i2++) {
1463
- const key2 = keys[i2];
1463
+ const key2 = keys2[i2];
1464
1464
  const tmp = stringifySimple(key2, value[key2], stack);
1465
1465
  if (tmp !== void 0) {
1466
1466
  res += `${separator}"${strEscape(key2)}":${tmp}`;
@@ -4112,9 +4112,9 @@ var require_micromatch = __commonJS({
4112
4112
  if (!utils.isObject(obj)) {
4113
4113
  throw new TypeError("Expected the first argument to be an object");
4114
4114
  }
4115
- let keys = micromatch2(Object.keys(obj), patterns, options);
4115
+ let keys2 = micromatch2(Object.keys(obj), patterns, options);
4116
4116
  let res = {};
4117
- for (let key of keys)
4117
+ for (let key of keys2)
4118
4118
  res[key] = obj[key];
4119
4119
  return res;
4120
4120
  };
@@ -4378,16 +4378,16 @@ var require_GraphQLError = __commonJS({
4378
4378
  return obj && obj.__esModule ? obj : { default: obj };
4379
4379
  }
4380
4380
  function ownKeys(object, enumerableOnly) {
4381
- var keys = Object.keys(object);
4381
+ var keys2 = Object.keys(object);
4382
4382
  if (Object.getOwnPropertySymbols) {
4383
4383
  var symbols = Object.getOwnPropertySymbols(object);
4384
4384
  if (enumerableOnly)
4385
4385
  symbols = symbols.filter(function(sym) {
4386
4386
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
4387
4387
  });
4388
- keys.push.apply(keys, symbols);
4388
+ keys2.push.apply(keys2, symbols);
4389
4389
  }
4390
- return keys;
4390
+ return keys2;
4391
4391
  }
4392
4392
  function _objectSpread(target) {
4393
4393
  for (var i2 = 1; i2 < arguments.length; i2++) {
@@ -4624,7 +4624,7 @@ var require_GraphQLError = __commonJS({
4624
4624
  }
4625
4625
  _createClass(GraphQLError5, [{
4626
4626
  key: "toString",
4627
- value: function toString() {
4627
+ value: function toString2() {
4628
4628
  return printError(this);
4629
4629
  }
4630
4630
  }, {
@@ -4946,14 +4946,14 @@ var require_inspect = __commonJS({
4946
4946
  return formatObject2(value, seenValues);
4947
4947
  }
4948
4948
  function formatObject2(object, seenValues) {
4949
- var keys = Object.keys(object);
4950
- if (keys.length === 0) {
4949
+ var keys2 = Object.keys(object);
4950
+ if (keys2.length === 0) {
4951
4951
  return "{}";
4952
4952
  }
4953
4953
  if (seenValues.length > MAX_RECURSIVE_DEPTH2) {
4954
4954
  return "[" + getObjectTag2(object) + "]";
4955
4955
  }
4956
- var properties = keys.map(function(key) {
4956
+ var properties = keys2.map(function(key) {
4957
4957
  var value = formatValue2(object[key], seenValues);
4958
4958
  return key + ": " + value;
4959
4959
  });
@@ -6551,7 +6551,7 @@ var require_visitor = __commonJS({
6551
6551
  Object.defineProperty(exports, "__esModule", {
6552
6552
  value: true
6553
6553
  });
6554
- exports.visit = visit14;
6554
+ exports.visit = visit13;
6555
6555
  exports.visitInParallel = visitInParallel;
6556
6556
  exports.getVisitFn = getVisitFn;
6557
6557
  exports.BREAK = exports.QueryDocumentKeys = void 0;
@@ -6614,11 +6614,11 @@ var require_visitor = __commonJS({
6614
6614
  exports.QueryDocumentKeys = QueryDocumentKeys;
6615
6615
  var BREAK = Object.freeze({});
6616
6616
  exports.BREAK = BREAK;
6617
- function visit14(root, visitor) {
6617
+ function visit13(root, visitor) {
6618
6618
  var visitorKeys = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : QueryDocumentKeys;
6619
6619
  var stack = void 0;
6620
6620
  var inArray = Array.isArray(root);
6621
- var keys = [root];
6621
+ var keys2 = [root];
6622
6622
  var index = -1;
6623
6623
  var edits = [];
6624
6624
  var node = void 0;
@@ -6629,7 +6629,7 @@ var require_visitor = __commonJS({
6629
6629
  var newRoot = root;
6630
6630
  do {
6631
6631
  index++;
6632
- var isLeaving = index === keys.length;
6632
+ var isLeaving = index === keys2.length;
6633
6633
  var isEdited = isLeaving && edits.length !== 0;
6634
6634
  if (isLeaving) {
6635
6635
  key = ancestors.length === 0 ? void 0 : path2[path2.length - 1];
@@ -6662,12 +6662,12 @@ var require_visitor = __commonJS({
6662
6662
  }
6663
6663
  }
6664
6664
  index = stack.index;
6665
- keys = stack.keys;
6665
+ keys2 = stack.keys;
6666
6666
  edits = stack.edits;
6667
6667
  inArray = stack.inArray;
6668
6668
  stack = stack.prev;
6669
6669
  } else {
6670
- key = parent ? inArray ? index : keys[index] : void 0;
6670
+ key = parent ? inArray ? index : keys2[index] : void 0;
6671
6671
  node = parent ? parent[key] : newRoot;
6672
6672
  if (node === null || node === void 0) {
6673
6673
  continue;
@@ -6715,12 +6715,12 @@ var require_visitor = __commonJS({
6715
6715
  stack = {
6716
6716
  inArray,
6717
6717
  index,
6718
- keys,
6718
+ keys: keys2,
6719
6719
  edits,
6720
6720
  prev: stack
6721
6721
  };
6722
6722
  inArray = Array.isArray(node);
6723
- keys = inArray ? node : (_visitorKeys$node$kin = visitorKeys[node.kind]) !== null && _visitorKeys$node$kin !== void 0 ? _visitorKeys$node$kin : [];
6723
+ keys2 = inArray ? node : (_visitorKeys$node$kin = visitorKeys[node.kind]) !== null && _visitorKeys$node$kin !== void 0 ? _visitorKeys$node$kin : [];
6724
6724
  index = -1;
6725
6725
  edits = [];
6726
6726
  if (parent) {
@@ -7703,7 +7703,7 @@ var require_definition = __commonJS({
7703
7703
  return new GraphQLList6(ofType);
7704
7704
  }
7705
7705
  }
7706
- GraphQLList6.prototype.toString = function toString() {
7706
+ GraphQLList6.prototype.toString = function toString2() {
7707
7707
  return "[" + String(this.ofType) + "]";
7708
7708
  };
7709
7709
  GraphQLList6.prototype.toJSON = function toJSON() {
@@ -7722,7 +7722,7 @@ var require_definition = __commonJS({
7722
7722
  return new GraphQLNonNull6(ofType);
7723
7723
  }
7724
7724
  }
7725
- GraphQLNonNull6.prototype.toString = function toString() {
7725
+ GraphQLNonNull6.prototype.toString = function toString2() {
7726
7726
  return String(this.ofType) + "!";
7727
7727
  };
7728
7728
  GraphQLNonNull6.prototype.toJSON = function toJSON() {
@@ -7818,7 +7818,7 @@ var require_definition = __commonJS({
7818
7818
  extensionASTNodes: (_this$extensionASTNod = this.extensionASTNodes) !== null && _this$extensionASTNod !== void 0 ? _this$extensionASTNod : []
7819
7819
  };
7820
7820
  };
7821
- _proto.toString = function toString() {
7821
+ _proto.toString = function toString2() {
7822
7822
  return this.name;
7823
7823
  };
7824
7824
  _proto.toJSON = function toJSON() {
@@ -7872,7 +7872,7 @@ var require_definition = __commonJS({
7872
7872
  extensionASTNodes: this.extensionASTNodes || []
7873
7873
  };
7874
7874
  };
7875
- _proto2.toString = function toString() {
7875
+ _proto2.toString = function toString2() {
7876
7876
  return this.name;
7877
7877
  };
7878
7878
  _proto2.toJSON = function toJSON() {
@@ -8003,7 +8003,7 @@ var require_definition = __commonJS({
8003
8003
  extensionASTNodes: (_this$extensionASTNod2 = this.extensionASTNodes) !== null && _this$extensionASTNod2 !== void 0 ? _this$extensionASTNod2 : []
8004
8004
  };
8005
8005
  };
8006
- _proto3.toString = function toString() {
8006
+ _proto3.toString = function toString2() {
8007
8007
  return this.name;
8008
8008
  };
8009
8009
  _proto3.toJSON = function toJSON() {
@@ -8050,7 +8050,7 @@ var require_definition = __commonJS({
8050
8050
  extensionASTNodes: (_this$extensionASTNod3 = this.extensionASTNodes) !== null && _this$extensionASTNod3 !== void 0 ? _this$extensionASTNod3 : []
8051
8051
  };
8052
8052
  };
8053
- _proto4.toString = function toString() {
8053
+ _proto4.toString = function toString2() {
8054
8054
  return this.name;
8055
8055
  };
8056
8056
  _proto4.toJSON = function toJSON() {
@@ -8094,7 +8094,7 @@ var require_definition = __commonJS({
8094
8094
  _proto5.getValue = function getValue(name) {
8095
8095
  return this._nameLookup[name];
8096
8096
  };
8097
- _proto5.serialize = function serialize(outputValue) {
8097
+ _proto5.serialize = function serialize2(outputValue) {
8098
8098
  var enumValue = this._valueLookup.get(outputValue);
8099
8099
  if (enumValue === void 0) {
8100
8100
  throw new _GraphQLError.GraphQLError('Enum "'.concat(this.name, '" cannot represent value: ').concat((0, _inspect.default)(outputValue)));
@@ -8146,7 +8146,7 @@ var require_definition = __commonJS({
8146
8146
  extensionASTNodes: (_this$extensionASTNod4 = this.extensionASTNodes) !== null && _this$extensionASTNod4 !== void 0 ? _this$extensionASTNod4 : []
8147
8147
  };
8148
8148
  };
8149
- _proto5.toString = function toString() {
8149
+ _proto5.toString = function toString2() {
8150
8150
  return this.name;
8151
8151
  };
8152
8152
  _proto5.toJSON = function toJSON() {
@@ -8224,7 +8224,7 @@ var require_definition = __commonJS({
8224
8224
  extensionASTNodes: (_this$extensionASTNod5 = this.extensionASTNodes) !== null && _this$extensionASTNod5 !== void 0 ? _this$extensionASTNod5 : []
8225
8225
  };
8226
8226
  };
8227
- _proto6.toString = function toString() {
8227
+ _proto6.toString = function toString2() {
8228
8228
  return this.name;
8229
8229
  };
8230
8230
  _proto6.toJSON = function toJSON() {
@@ -9478,7 +9478,7 @@ var require_directives = __commonJS({
9478
9478
  astNode: this.astNode
9479
9479
  };
9480
9480
  };
9481
- _proto.toString = function toString() {
9481
+ _proto.toString = function toString2() {
9482
9482
  return "@" + this.name;
9483
9483
  };
9484
9484
  _proto.toJSON = function toJSON() {
@@ -11415,16 +11415,16 @@ var require_KnownArgumentNamesRule = __commonJS({
11415
11415
  return obj && obj.__esModule ? obj : { default: obj };
11416
11416
  }
11417
11417
  function ownKeys(object, enumerableOnly) {
11418
- var keys = Object.keys(object);
11418
+ var keys2 = Object.keys(object);
11419
11419
  if (Object.getOwnPropertySymbols) {
11420
11420
  var symbols = Object.getOwnPropertySymbols(object);
11421
11421
  if (enumerableOnly)
11422
11422
  symbols = symbols.filter(function(sym) {
11423
11423
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
11424
11424
  });
11425
- keys.push.apply(keys, symbols);
11425
+ keys2.push.apply(keys2, symbols);
11426
11426
  }
11427
- return keys;
11427
+ return keys2;
11428
11428
  }
11429
11429
  function _objectSpread(target) {
11430
11430
  for (var i2 = 1; i2 < arguments.length; i2++) {
@@ -11671,16 +11671,16 @@ var require_ProvidedRequiredArgumentsRule = __commonJS({
11671
11671
  return obj && obj.__esModule ? obj : { default: obj };
11672
11672
  }
11673
11673
  function ownKeys(object, enumerableOnly) {
11674
- var keys = Object.keys(object);
11674
+ var keys2 = Object.keys(object);
11675
11675
  if (Object.getOwnPropertySymbols) {
11676
11676
  var symbols = Object.getOwnPropertySymbols(object);
11677
11677
  if (enumerableOnly)
11678
11678
  symbols = symbols.filter(function(sym) {
11679
11679
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
11680
11680
  });
11681
- keys.push.apply(keys, symbols);
11681
+ keys2.push.apply(keys2, symbols);
11682
11682
  }
11683
- return keys;
11683
+ return keys2;
11684
11684
  }
11685
11685
  function _objectSpread(target) {
11686
11686
  for (var i2 = 1; i2 < arguments.length; i2++) {
@@ -12938,13 +12938,13 @@ var require_promiseForObject = __commonJS({
12938
12938
  });
12939
12939
  exports.default = promiseForObject;
12940
12940
  function promiseForObject(object) {
12941
- var keys = Object.keys(object);
12942
- var valuesAndPromises = keys.map(function(name) {
12941
+ var keys2 = Object.keys(object);
12942
+ var valuesAndPromises = keys2.map(function(name) {
12943
12943
  return object[name];
12944
12944
  });
12945
12945
  return Promise.all(valuesAndPromises).then(function(values) {
12946
12946
  return values.reduce(function(resolvedObject, value, i2) {
12947
- resolvedObject[keys[i2]] = value;
12947
+ resolvedObject[keys2[i2]] = value;
12948
12948
  return resolvedObject;
12949
12949
  }, /* @__PURE__ */ Object.create(null));
12950
12950
  });
@@ -15396,16 +15396,16 @@ var require_getIntrospectionQuery = __commonJS({
15396
15396
  });
15397
15397
  exports.getIntrospectionQuery = getIntrospectionQuery2;
15398
15398
  function ownKeys(object, enumerableOnly) {
15399
- var keys = Object.keys(object);
15399
+ var keys2 = Object.keys(object);
15400
15400
  if (Object.getOwnPropertySymbols) {
15401
15401
  var symbols = Object.getOwnPropertySymbols(object);
15402
15402
  if (enumerableOnly)
15403
15403
  symbols = symbols.filter(function(sym) {
15404
15404
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
15405
15405
  });
15406
- keys.push.apply(keys, symbols);
15406
+ keys2.push.apply(keys2, symbols);
15407
15407
  }
15408
- return keys;
15408
+ return keys2;
15409
15409
  }
15410
15410
  function _objectSpread(target) {
15411
15411
  for (var i2 = 1; i2 < arguments.length; i2++) {
@@ -15498,16 +15498,16 @@ var require_introspectionFromSchema = __commonJS({
15498
15498
  return obj && obj.__esModule ? obj : { default: obj };
15499
15499
  }
15500
15500
  function ownKeys(object, enumerableOnly) {
15501
- var keys = Object.keys(object);
15501
+ var keys2 = Object.keys(object);
15502
15502
  if (Object.getOwnPropertySymbols) {
15503
15503
  var symbols = Object.getOwnPropertySymbols(object);
15504
15504
  if (enumerableOnly)
15505
15505
  symbols = symbols.filter(function(sym) {
15506
15506
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
15507
15507
  });
15508
- keys.push.apply(keys, symbols);
15508
+ keys2.push.apply(keys2, symbols);
15509
15509
  }
15510
- return keys;
15510
+ return keys2;
15511
15511
  }
15512
15512
  function _objectSpread(target) {
15513
15513
  for (var i2 = 1; i2 < arguments.length; i2++) {
@@ -15839,16 +15839,16 @@ var require_extendSchema = __commonJS({
15839
15839
  return obj && obj.__esModule ? obj : { default: obj };
15840
15840
  }
15841
15841
  function ownKeys(object, enumerableOnly) {
15842
- var keys = Object.keys(object);
15842
+ var keys2 = Object.keys(object);
15843
15843
  if (Object.getOwnPropertySymbols) {
15844
15844
  var symbols = Object.getOwnPropertySymbols(object);
15845
15845
  if (enumerableOnly)
15846
15846
  symbols = symbols.filter(function(sym) {
15847
15847
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
15848
15848
  });
15849
- keys.push.apply(keys, symbols);
15849
+ keys2.push.apply(keys2, symbols);
15850
15850
  }
15851
- return keys;
15851
+ return keys2;
15852
15852
  }
15853
15853
  function _objectSpread(target) {
15854
15854
  for (var i2 = 1; i2 < arguments.length; i2++) {
@@ -16439,16 +16439,16 @@ var require_lexicographicSortSchema = __commonJS({
16439
16439
  return obj && obj.__esModule ? obj : { default: obj };
16440
16440
  }
16441
16441
  function ownKeys(object, enumerableOnly) {
16442
- var keys = Object.keys(object);
16442
+ var keys2 = Object.keys(object);
16443
16443
  if (Object.getOwnPropertySymbols) {
16444
16444
  var symbols = Object.getOwnPropertySymbols(object);
16445
16445
  if (enumerableOnly)
16446
16446
  symbols = symbols.filter(function(sym) {
16447
16447
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
16448
16448
  });
16449
- keys.push.apply(keys, symbols);
16449
+ keys2.push.apply(keys2, symbols);
16450
16450
  }
16451
- return keys;
16451
+ return keys2;
16452
16452
  }
16453
16453
  function _objectSpread(target) {
16454
16454
  for (var i2 = 1; i2 < arguments.length; i2++) {
@@ -16989,16 +16989,16 @@ var require_findBreakingChanges = __commonJS({
16989
16989
  return obj && obj.__esModule ? obj : { default: obj };
16990
16990
  }
16991
16991
  function ownKeys(object, enumerableOnly) {
16992
- var keys = Object.keys(object);
16992
+ var keys2 = Object.keys(object);
16993
16993
  if (Object.getOwnPropertySymbols) {
16994
16994
  var symbols = Object.getOwnPropertySymbols(object);
16995
16995
  if (enumerableOnly)
16996
16996
  symbols = symbols.filter(function(sym) {
16997
16997
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
16998
16998
  });
16999
- keys.push.apply(keys, symbols);
16999
+ keys2.push.apply(keys2, symbols);
17000
17000
  }
17001
- return keys;
17001
+ return keys2;
17002
17002
  }
17003
17003
  function _objectSpread(target) {
17004
17004
  for (var i2 = 1; i2 < arguments.length; i2++) {
@@ -19232,9 +19232,9 @@ var require_legacy_streams = __commonJS({
19232
19232
  this.mode = 438;
19233
19233
  this.bufferSize = 64 * 1024;
19234
19234
  options = options || {};
19235
- var keys = Object.keys(options);
19236
- for (var index = 0, length = keys.length; index < length; index++) {
19237
- var key = keys[index];
19235
+ var keys2 = Object.keys(options);
19236
+ for (var index = 0, length = keys2.length; index < length; index++) {
19237
+ var key = keys2[index];
19238
19238
  this[key] = options[key];
19239
19239
  }
19240
19240
  if (this.encoding)
@@ -19282,9 +19282,9 @@ var require_legacy_streams = __commonJS({
19282
19282
  this.mode = 438;
19283
19283
  this.bytesWritten = 0;
19284
19284
  options = options || {};
19285
- var keys = Object.keys(options);
19286
- for (var index = 0, length = keys.length; index < length; index++) {
19287
- var key = keys[index];
19285
+ var keys2 = Object.keys(options);
19286
+ for (var index = 0, length = keys2.length; index < length; index++) {
19287
+ var key = keys2[index];
19288
19288
  this[key] = options[key];
19289
19289
  }
19290
19290
  if (this.start !== void 0) {
@@ -22501,10 +22501,10 @@ var require_glob = __commonJS({
22501
22501
  if (add === null || typeof add !== "object") {
22502
22502
  return origin;
22503
22503
  }
22504
- var keys = Object.keys(add);
22505
- var i2 = keys.length;
22504
+ var keys2 = Object.keys(add);
22505
+ var i2 = keys2.length;
22506
22506
  while (i2--) {
22507
- origin[keys[i2]] = add[keys[i2]];
22507
+ origin[keys2[i2]] = add[keys2[i2]];
22508
22508
  }
22509
22509
  return origin;
22510
22510
  }
@@ -30919,12 +30919,12 @@ var require_lib3 = __commonJS({
30919
30919
  SyntaxError: "BABEL_PARSER_SYNTAX_ERROR",
30920
30920
  SourceTypeModuleError: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"
30921
30921
  };
30922
- var reflect = (keys, last = keys.length - 1) => ({
30922
+ var reflect = (keys2, last = keys2.length - 1) => ({
30923
30923
  get() {
30924
- return keys.reduce((object, key) => object[key], this);
30924
+ return keys2.reduce((object, key) => object[key], this);
30925
30925
  },
30926
30926
  set(value) {
30927
- keys.reduce(
30927
+ keys2.reduce(
30928
30928
  (item, key, i2) => i2 === last ? item[key] = value : item[key],
30929
30929
  this
30930
30930
  );
@@ -32857,9 +32857,9 @@ var require_lib3 = __commonJS({
32857
32857
  }
32858
32858
  clone(skipArrays) {
32859
32859
  const state = new State();
32860
- const keys = Object.keys(this);
32861
- for (let i2 = 0, length = keys.length; i2 < length; i2++) {
32862
- const key = keys[i2];
32860
+ const keys2 = Object.keys(this);
32861
+ for (let i2 = 0, length = keys2.length; i2 < length; i2++) {
32862
+ const key = keys2[i2];
32863
32863
  let val = this[key];
32864
32864
  if (!skipArrays && Array.isArray(val)) {
32865
32865
  val = val.slice();
@@ -34764,9 +34764,9 @@ var require_lib3 = __commonJS({
34764
34764
  {
34765
34765
  NodePrototype.__clone = function() {
34766
34766
  const newNode = new Node(void 0, this.start, this.loc.start);
34767
- const keys = Object.keys(this);
34768
- for (let i2 = 0, length = keys.length; i2 < length; i2++) {
34769
- const key = keys[i2];
34767
+ const keys2 = Object.keys(this);
34768
+ for (let i2 = 0, length = keys2.length; i2 < length; i2++) {
34769
+ const key = keys2[i2];
34770
34770
  if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") {
34771
34771
  newNode[key] = this[key];
34772
34772
  }
@@ -45406,109 +45406,6 @@ var require_lib3 = __commonJS({
45406
45406
  }
45407
45407
  });
45408
45408
 
45409
- // ../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js
45410
- var require_cjs = __commonJS({
45411
- "../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module) {
45412
- "use strict";
45413
- var isMergeableObject = function isMergeableObject2(value) {
45414
- return isNonNullObject(value) && !isSpecial(value);
45415
- };
45416
- function isNonNullObject(value) {
45417
- return !!value && typeof value === "object";
45418
- }
45419
- function isSpecial(value) {
45420
- var stringValue = Object.prototype.toString.call(value);
45421
- return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
45422
- }
45423
- var canUseSymbol = typeof Symbol === "function" && Symbol.for;
45424
- var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
45425
- function isReactElement(value) {
45426
- return value.$$typeof === REACT_ELEMENT_TYPE;
45427
- }
45428
- function emptyTarget(val) {
45429
- return Array.isArray(val) ? [] : {};
45430
- }
45431
- function cloneUnlessOtherwiseSpecified(value, options) {
45432
- return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
45433
- }
45434
- function defaultArrayMerge(target, source, options) {
45435
- return target.concat(source).map(function(element) {
45436
- return cloneUnlessOtherwiseSpecified(element, options);
45437
- });
45438
- }
45439
- function getMergeFunction(key, options) {
45440
- if (!options.customMerge) {
45441
- return deepmerge;
45442
- }
45443
- var customMerge = options.customMerge(key);
45444
- return typeof customMerge === "function" ? customMerge : deepmerge;
45445
- }
45446
- function getEnumerableOwnPropertySymbols(target) {
45447
- return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
45448
- return target.propertyIsEnumerable(symbol);
45449
- }) : [];
45450
- }
45451
- function getKeys(target) {
45452
- return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
45453
- }
45454
- function propertyIsOnObject(object, property) {
45455
- try {
45456
- return property in object;
45457
- } catch (_) {
45458
- return false;
45459
- }
45460
- }
45461
- function propertyIsUnsafe(target, key) {
45462
- return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
45463
- }
45464
- function mergeObject(target, source, options) {
45465
- var destination = {};
45466
- if (options.isMergeableObject(target)) {
45467
- getKeys(target).forEach(function(key) {
45468
- destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
45469
- });
45470
- }
45471
- getKeys(source).forEach(function(key) {
45472
- if (propertyIsUnsafe(target, key)) {
45473
- return;
45474
- }
45475
- if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
45476
- destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
45477
- } else {
45478
- destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
45479
- }
45480
- });
45481
- return destination;
45482
- }
45483
- function deepmerge(target, source, options) {
45484
- options = options || {};
45485
- options.arrayMerge = options.arrayMerge || defaultArrayMerge;
45486
- options.isMergeableObject = options.isMergeableObject || isMergeableObject;
45487
- options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
45488
- var sourceIsArray = Array.isArray(source);
45489
- var targetIsArray = Array.isArray(target);
45490
- var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
45491
- if (!sourceAndTargetTypesMatch) {
45492
- return cloneUnlessOtherwiseSpecified(source, options);
45493
- } else if (sourceIsArray) {
45494
- return options.arrayMerge(target, source, options);
45495
- } else {
45496
- return mergeObject(target, source, options);
45497
- }
45498
- }
45499
- deepmerge.all = function deepmergeAll(array, options) {
45500
- if (!Array.isArray(array)) {
45501
- throw new Error("first argument should be an array");
45502
- }
45503
- return array.reduce(function(prev, next) {
45504
- return deepmerge(prev, next, options);
45505
- }, {});
45506
- };
45507
- var deepmerge_1 = deepmerge;
45508
- module.exports = deepmerge_1;
45509
- }
45510
- });
45511
-
45512
45409
  // ../../node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.js
45513
45410
  var require_tslib = __commonJS({
45514
45411
  "../../node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.js"(exports, module) {
@@ -47778,7 +47675,7 @@ var require_path_visitor = __commonJS({
47778
47675
  }
47779
47676
  return target;
47780
47677
  }
47781
- PathVisitor.visit = function visit14(node, methods) {
47678
+ PathVisitor.visit = function visit13(node, methods) {
47782
47679
  return PathVisitor.fromMethodsObject(methods).visit(node);
47783
47680
  };
47784
47681
  var PVp = PathVisitor.prototype;
@@ -47969,7 +47866,7 @@ var require_path_visitor = __commonJS({
47969
47866
  this.needToCallTraverse = false;
47970
47867
  return visitChildren(path2, PathVisitor.fromMethodsObject(newVisitor || this.visitor));
47971
47868
  };
47972
- sharedContextProtoMethods.visit = function visit14(path2, newVisitor) {
47869
+ sharedContextProtoMethods.visit = function visit13(path2, newVisitor) {
47973
47870
  if (!(this instanceof this.Context)) {
47974
47871
  throw new Error("");
47975
47872
  }
@@ -49362,7 +49259,7 @@ var require_main = __commonJS({
49362
49259
  var someField = _a.someField;
49363
49260
  var Type = _a.Type;
49364
49261
  var use = _a.use;
49365
- var visit14 = _a.visit;
49262
+ var visit13 = _a.visit;
49366
49263
  exports.astNodesAreEquivalent = astNodesAreEquivalent;
49367
49264
  exports.builders = builders;
49368
49265
  exports.builtInTypes = builtInTypes;
@@ -49379,7 +49276,7 @@ var require_main = __commonJS({
49379
49276
  exports.someField = someField;
49380
49277
  exports.Type = Type;
49381
49278
  exports.use = use;
49382
- exports.visit = visit14;
49279
+ exports.visit = visit13;
49383
49280
  Object.assign(namedTypes_1.namedTypes, n);
49384
49281
  }
49385
49282
  });
@@ -51167,10 +51064,10 @@ var require_util2 = __commonJS({
51167
51064
  var result = {};
51168
51065
  var argc = args.length;
51169
51066
  for (var i2 = 0; i2 < argc; ++i2) {
51170
- var keys = Object.keys(args[i2]);
51171
- var keyCount = keys.length;
51067
+ var keys2 = Object.keys(args[i2]);
51068
+ var keyCount = keys2.length;
51172
51069
  for (var j = 0; j < keyCount; ++j) {
51173
- result[keys[j]] = true;
51070
+ result[keys2[j]] = true;
51174
51071
  }
51175
51072
  }
51176
51073
  return result;
@@ -58830,10 +58727,10 @@ var require_parser2 = __commonJS({
58830
58727
  loc.indent = newIndent;
58831
58728
  this.findTokenRange(loc);
58832
58729
  }
58833
- var keys = Object.keys(node);
58834
- var keyCount = keys.length;
58730
+ var keys2 = Object.keys(node);
58731
+ var keyCount = keys2.length;
58835
58732
  for (var i2 = 0; i2 < keyCount; ++i2) {
58836
- var key = keys[i2];
58733
+ var key = keys2[i2];
58837
58734
  if (key === "loc") {
58838
58735
  copy[key] = node[key];
58839
58736
  } else if (key === "tokens" && node.type === "File") {
@@ -59592,13 +59489,13 @@ var require_patcher = __commonJS({
59592
59489
  if (newPath.needsParens() && !oldPath.hasParens()) {
59593
59490
  return false;
59594
59491
  }
59595
- var keys = (0, util_1.getUnionOfKeys)(oldNode, newNode);
59492
+ var keys2 = (0, util_1.getUnionOfKeys)(oldNode, newNode);
59596
59493
  if (oldNode.type === "File" || newNode.type === "File") {
59597
- delete keys.tokens;
59494
+ delete keys2.tokens;
59598
59495
  }
59599
- delete keys.loc;
59496
+ delete keys2.loc;
59600
59497
  var originalReprintCount = reprints.length;
59601
- for (var k in keys) {
59498
+ for (var k in keys2) {
59602
59499
  if (k.charAt(0) === "_") {
59603
59500
  continue;
59604
59501
  }
@@ -61841,6 +61738,109 @@ var require_main2 = __commonJS({
61841
61738
  }
61842
61739
  });
61843
61740
 
61741
+ // ../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js
61742
+ var require_cjs = __commonJS({
61743
+ "../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module) {
61744
+ "use strict";
61745
+ var isMergeableObject = function isMergeableObject2(value) {
61746
+ return isNonNullObject(value) && !isSpecial(value);
61747
+ };
61748
+ function isNonNullObject(value) {
61749
+ return !!value && typeof value === "object";
61750
+ }
61751
+ function isSpecial(value) {
61752
+ var stringValue = Object.prototype.toString.call(value);
61753
+ return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
61754
+ }
61755
+ var canUseSymbol = typeof Symbol === "function" && Symbol.for;
61756
+ var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
61757
+ function isReactElement(value) {
61758
+ return value.$$typeof === REACT_ELEMENT_TYPE;
61759
+ }
61760
+ function emptyTarget(val) {
61761
+ return Array.isArray(val) ? [] : {};
61762
+ }
61763
+ function cloneUnlessOtherwiseSpecified(value, options) {
61764
+ return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
61765
+ }
61766
+ function defaultArrayMerge(target, source, options) {
61767
+ return target.concat(source).map(function(element) {
61768
+ return cloneUnlessOtherwiseSpecified(element, options);
61769
+ });
61770
+ }
61771
+ function getMergeFunction(key, options) {
61772
+ if (!options.customMerge) {
61773
+ return deepmerge;
61774
+ }
61775
+ var customMerge = options.customMerge(key);
61776
+ return typeof customMerge === "function" ? customMerge : deepmerge;
61777
+ }
61778
+ function getEnumerableOwnPropertySymbols(target) {
61779
+ return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
61780
+ return target.propertyIsEnumerable(symbol);
61781
+ }) : [];
61782
+ }
61783
+ function getKeys(target) {
61784
+ return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
61785
+ }
61786
+ function propertyIsOnObject(object, property) {
61787
+ try {
61788
+ return property in object;
61789
+ } catch (_) {
61790
+ return false;
61791
+ }
61792
+ }
61793
+ function propertyIsUnsafe(target, key) {
61794
+ return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
61795
+ }
61796
+ function mergeObject(target, source, options) {
61797
+ var destination = {};
61798
+ if (options.isMergeableObject(target)) {
61799
+ getKeys(target).forEach(function(key) {
61800
+ destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
61801
+ });
61802
+ }
61803
+ getKeys(source).forEach(function(key) {
61804
+ if (propertyIsUnsafe(target, key)) {
61805
+ return;
61806
+ }
61807
+ if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
61808
+ destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
61809
+ } else {
61810
+ destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
61811
+ }
61812
+ });
61813
+ return destination;
61814
+ }
61815
+ function deepmerge(target, source, options) {
61816
+ options = options || {};
61817
+ options.arrayMerge = options.arrayMerge || defaultArrayMerge;
61818
+ options.isMergeableObject = options.isMergeableObject || isMergeableObject;
61819
+ options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
61820
+ var sourceIsArray = Array.isArray(source);
61821
+ var targetIsArray = Array.isArray(target);
61822
+ var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
61823
+ if (!sourceAndTargetTypesMatch) {
61824
+ return cloneUnlessOtherwiseSpecified(source, options);
61825
+ } else if (sourceIsArray) {
61826
+ return options.arrayMerge(target, source, options);
61827
+ } else {
61828
+ return mergeObject(target, source, options);
61829
+ }
61830
+ }
61831
+ deepmerge.all = function deepmergeAll(array, options) {
61832
+ if (!Array.isArray(array)) {
61833
+ throw new Error("first argument should be an array");
61834
+ }
61835
+ return array.reduce(function(prev, next) {
61836
+ return deepmerge(prev, next, options);
61837
+ }, {});
61838
+ };
61839
+ var deepmerge_1 = deepmerge;
61840
+ module.exports = deepmerge_1;
61841
+ }
61842
+ });
61843
+
61844
61844
  // src/vite/index.ts
61845
61845
  var import_minimatch2 = __toESM(require_minimatch(), 1);
61846
61846
 
@@ -62855,14 +62855,14 @@ function pushComment(node, entity, field, argument) {
62855
62855
  if (typeof comment !== "string" || comment.length === 0) {
62856
62856
  return;
62857
62857
  }
62858
- const keys = [entity];
62858
+ const keys2 = [entity];
62859
62859
  if (field) {
62860
- keys.push(field);
62860
+ keys2.push(field);
62861
62861
  if (argument) {
62862
- keys.push(argument);
62862
+ keys2.push(argument);
62863
62863
  }
62864
62864
  }
62865
- const path2 = keys.join(".");
62865
+ const path2 = keys2.join(".");
62866
62866
  if (!commentsRegistry[path2]) {
62867
62867
  commentsRegistry[path2] = [];
62868
62868
  }
@@ -62881,14 +62881,14 @@ function hasMultilineItems(maybeArray) {
62881
62881
  function addDescription(cb) {
62882
62882
  return (node, _key, _parent, path2, ancestors) => {
62883
62883
  var _a;
62884
- const keys = [];
62884
+ const keys2 = [];
62885
62885
  const parent = path2.reduce((prev, key2) => {
62886
62886
  if (["fields", "arguments", "values"].includes(key2) && prev.name) {
62887
- keys.push(prev.name.value);
62887
+ keys2.push(prev.name.value);
62888
62888
  }
62889
62889
  return prev[key2];
62890
62890
  }, ancestors[0]);
62891
- const key = [...keys, (_a = parent === null || parent === void 0 ? void 0 : parent.name) === null || _a === void 0 ? void 0 : _a.value].filter(Boolean).join(".");
62891
+ const key = [...keys2, (_a = parent === null || parent === void 0 ? void 0 : parent.name) === null || _a === void 0 ? void 0 : _a.value].filter(Boolean).join(".");
62892
62892
  const items = [];
62893
62893
  if (node.kind.includes("Definition") && commentsRegistry[key]) {
62894
62894
  items.push(...commentsRegistry[key]);
@@ -65424,9 +65424,9 @@ var fragmentKey = " $fragments";
65424
65424
 
65425
65425
  // src/runtime/lib/key.ts
65426
65426
  var computeKey = ({ field, args }) => {
65427
- const keys = Object.keys(args ?? {});
65428
- keys.sort();
65429
- return args && keys.length > 0 ? `${field}(${keys.map((key) => `${key}: ${stringifyObjectWithNoQuotesOnKeys(args[key])}`).join(", ")})` : field;
65427
+ const keys2 = Object.keys(args ?? {});
65428
+ keys2.sort();
65429
+ return args && keys2.length > 0 ? `${field}(${keys2.map((key) => `${key}: ${stringifyObjectWithNoQuotesOnKeys(args[key])}`).join(", ")})` : field;
65430
65430
  };
65431
65431
  var stringifyObjectWithNoQuotesOnKeys = (obj_from_json) => {
65432
65432
  if (Array.isArray(obj_from_json)) {
@@ -68634,7 +68634,8 @@ var CacheInternal = class {
68634
68634
  parent = rootID,
68635
68635
  variables,
68636
68636
  stepsFromConnection = null,
68637
- ignoreMasking
68637
+ ignoreMasking,
68638
+ fullCheck = false
68638
68639
  }) {
68639
68640
  if (parent === null) {
68640
68641
  return { data: null, partial: false, stale: false, hasData: true };
@@ -68659,11 +68660,28 @@ var CacheInternal = class {
68659
68660
  let targetSelection = getFieldsForType(selection, typename);
68660
68661
  for (const [
68661
68662
  attributeName,
68662
- { type, keyRaw, selection: fieldSelection, nullable, list, visible }
68663
+ { type, keyRaw, selection: fieldSelection, nullable, list, visible, directives }
68663
68664
  ] of Object.entries(targetSelection)) {
68664
- if (!visible && !ignoreMasking) {
68665
+ if (!visible && !ignoreMasking && !fullCheck) {
68665
68666
  continue;
68666
68667
  }
68668
+ const includeDirective = directives?.find((d) => {
68669
+ return d.name === "include";
68670
+ });
68671
+ if (includeDirective) {
68672
+ if (!evaluateFragmentVariables(includeDirective.arguments, variables ?? {})["if"]) {
68673
+ continue;
68674
+ }
68675
+ }
68676
+ const skipDirective = directives?.find((d) => {
68677
+ return d.name === "skip";
68678
+ });
68679
+ if (skipDirective) {
68680
+ if (evaluateFragmentVariables(skipDirective.arguments, variables ?? {})["if"]) {
68681
+ continue;
68682
+ }
68683
+ }
68684
+ const fieldTarget = visible || ignoreMasking ? target : {};
68667
68685
  const key = evaluateKey(keyRaw, variables);
68668
68686
  const { value } = this.storage.get(parent, key);
68669
68687
  const dt_field = this.staleManager.getFieldTime(parent, key);
@@ -68686,16 +68704,16 @@ var CacheInternal = class {
68686
68704
  partial = true;
68687
68705
  }
68688
68706
  if (typeof value === "undefined" || value === null) {
68689
- target[attributeName] = null;
68707
+ fieldTarget[attributeName] = null;
68690
68708
  if (typeof value !== "undefined") {
68691
68709
  hasData = true;
68692
68710
  }
68693
68711
  } else if (!fieldSelection) {
68694
68712
  const fnUnmarshal = this.config?.scalars?.[type]?.unmarshal;
68695
68713
  if (fnUnmarshal) {
68696
- target[attributeName] = fnUnmarshal(value);
68714
+ fieldTarget[attributeName] = fnUnmarshal(value);
68697
68715
  } else {
68698
- target[attributeName] = value;
68716
+ fieldTarget[attributeName] = value;
68699
68717
  }
68700
68718
  hasData = true;
68701
68719
  } else if (Array.isArray(value)) {
@@ -68704,9 +68722,10 @@ var CacheInternal = class {
68704
68722
  variables,
68705
68723
  linkedList: value,
68706
68724
  stepsFromConnection: nextStep,
68707
- ignoreMasking: !!ignoreMasking
68725
+ ignoreMasking: !!ignoreMasking,
68726
+ fullCheck
68708
68727
  });
68709
- target[attributeName] = listValue.data;
68728
+ fieldTarget[attributeName] = listValue.data;
68710
68729
  if (listValue.partial) {
68711
68730
  partial = true;
68712
68731
  }
@@ -68722,9 +68741,10 @@ var CacheInternal = class {
68722
68741
  selection: fieldSelection,
68723
68742
  variables,
68724
68743
  stepsFromConnection: nextStep,
68725
- ignoreMasking
68744
+ ignoreMasking,
68745
+ fullCheck
68726
68746
  });
68727
- target[attributeName] = objectFields.data;
68747
+ fieldTarget[attributeName] = objectFields.data;
68728
68748
  if (objectFields.partial) {
68729
68749
  partial = true;
68730
68750
  }
@@ -68735,7 +68755,7 @@ var CacheInternal = class {
68735
68755
  hasData = true;
68736
68756
  }
68737
68757
  }
68738
- if (target[attributeName] === null && !nullable && !embeddedCursor) {
68758
+ if (fieldTarget[attributeName] === null && !nullable && !embeddedCursor) {
68739
68759
  cascadeNull = true;
68740
68760
  }
68741
68761
  }
@@ -68767,7 +68787,8 @@ var CacheInternal = class {
68767
68787
  variables,
68768
68788
  linkedList,
68769
68789
  stepsFromConnection,
68770
- ignoreMasking
68790
+ ignoreMasking,
68791
+ fullCheck
68771
68792
  }) {
68772
68793
  const result = [];
68773
68794
  let partialData = false;
@@ -68780,7 +68801,8 @@ var CacheInternal = class {
68780
68801
  variables,
68781
68802
  linkedList: entry,
68782
68803
  stepsFromConnection,
68783
- ignoreMasking
68804
+ ignoreMasking,
68805
+ fullCheck
68784
68806
  });
68785
68807
  result.push(nestedValue.data);
68786
68808
  if (nestedValue.partial) {
@@ -68802,7 +68824,8 @@ var CacheInternal = class {
68802
68824
  selection: fields,
68803
68825
  variables,
68804
68826
  stepsFromConnection,
68805
- ignoreMasking
68827
+ ignoreMasking,
68828
+ fullCheck
68806
68829
  });
68807
68830
  result.push(data);
68808
68831
  if (partial) {
@@ -69001,11 +69024,10 @@ var query = documentPlugin(ArtifactKind.Query, function() {
69001
69024
  cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
69002
69025
  }
69003
69026
  lastVariables = { ...marshalVariables(ctx) };
69004
- const variables = lastVariables;
69005
69027
  subscriptionSpec = {
69006
69028
  rootType: ctx.artifact.rootType,
69007
69029
  selection: ctx.artifact.selection,
69008
- variables: () => variables,
69030
+ variables: () => lastVariables,
69009
69031
  set: (newValue) => {
69010
69032
  resolve2(ctx, {
69011
69033
  data: newValue,
@@ -69034,17 +69056,12 @@ var query = documentPlugin(ArtifactKind.Query, function() {
69034
69056
  // src/runtime/client/plugins/fragment.ts
69035
69057
  var fragment = documentPlugin(ArtifactKind.Fragment, function() {
69036
69058
  let subscriptionSpec = null;
69037
- let lastReference = null;
69038
69059
  return {
69039
69060
  start(ctx, { next, resolve: resolve2, variablesChanged, marshalVariables }) {
69040
69061
  if (!ctx.stuff.parentID) {
69041
69062
  return next(ctx);
69042
69063
  }
69043
- const currentReference = {
69044
- parent: ctx.stuff.parentID,
69045
- variables: marshalVariables(ctx)
69046
- };
69047
- if (!ctx.cacheParams?.disableSubscriptions && (!deepEquals(lastReference, currentReference) || variablesChanged(ctx))) {
69064
+ if (variablesChanged(ctx) && !ctx.cacheParams?.disableSubscriptions) {
69048
69065
  if (subscriptionSpec) {
69049
69066
  cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
69050
69067
  }
@@ -69067,7 +69084,6 @@ var fragment = documentPlugin(ArtifactKind.Fragment, function() {
69067
69084
  }
69068
69085
  };
69069
69086
  cache_default.subscribe(subscriptionSpec, variables);
69070
- lastReference = currentReference;
69071
69087
  }
69072
69088
  next(ctx);
69073
69089
  },
@@ -69250,8 +69266,8 @@ var Config = class {
69250
69266
  if (!apiURL) {
69251
69267
  return "";
69252
69268
  }
69253
- const env = await this.getEnv();
69254
- return this.processEnvValues(env, apiURL);
69269
+ const env2 = await this.getEnv();
69270
+ return this.processEnvValues(env2, apiURL);
69255
69271
  }
69256
69272
  get include() {
69257
69273
  if (this.configFile.include) {
@@ -69266,35 +69282,35 @@ var Config = class {
69266
69282
  return this.configFile.plugins?.[name] ?? {};
69267
69283
  }
69268
69284
  async getEnv() {
69269
- let env = process.env;
69285
+ let env2 = process.env;
69270
69286
  for (const plugin2 of this.plugins) {
69271
69287
  if (plugin2.env) {
69272
- env = {
69273
- ...await plugin2.env({ config: this, env })
69288
+ env2 = {
69289
+ ...await plugin2.env({ config: this, env: env2 })
69274
69290
  };
69275
69291
  }
69276
69292
  }
69277
- return env;
69293
+ return env2;
69278
69294
  }
69279
- processEnvValues(env, value) {
69295
+ processEnvValues(env2, value) {
69280
69296
  let headerValue;
69281
69297
  if (typeof value === "function") {
69282
- headerValue = value(env);
69298
+ headerValue = value(env2);
69283
69299
  } else if (value.startsWith("env:")) {
69284
- headerValue = env[value.slice("env:".length)];
69300
+ headerValue = env2[value.slice("env:".length)];
69285
69301
  } else {
69286
69302
  headerValue = value;
69287
69303
  }
69288
69304
  return headerValue;
69289
69305
  }
69290
69306
  async pullHeaders() {
69291
- const env = await this.getEnv();
69307
+ const env2 = await this.getEnv();
69292
69308
  if (typeof this.schemaPollHeaders === "function") {
69293
- return this.schemaPollHeaders(env);
69309
+ return this.schemaPollHeaders(env2);
69294
69310
  }
69295
69311
  const headers = Object.fromEntries(
69296
69312
  Object.entries(this.schemaPollHeaders || {}).map(([key, value]) => {
69297
- const headerValue = this.processEnvValues(env, value);
69313
+ const headerValue = this.processEnvValues(env2, value);
69298
69314
  if (!headerValue) {
69299
69315
  return [];
69300
69316
  }
@@ -69575,17 +69591,6 @@ var Config = class {
69575
69591
  }, []) ?? [];
69576
69592
  return !defaultDirectives.includes(name) && (internalDirectives.includes(name) || this.isDeleteDirective(name));
69577
69593
  }
69578
- needsRefetchArtifact(document) {
69579
- let needsArtifact = false;
69580
- graphql2.visit(document, {
69581
- Directive: (node) => {
69582
- if ([this.paginateDirective].includes(node.name.value)) {
69583
- needsArtifact = true;
69584
- }
69585
- }
69586
- });
69587
- return needsArtifact;
69588
- }
69589
69594
  #fragmentVariableMaps;
69590
69595
  registerFragmentVariablesHash({
69591
69596
  hash,
@@ -69593,7 +69598,7 @@ var Config = class {
69593
69598
  fragment: fragment2
69594
69599
  }) {
69595
69600
  this.#fragmentVariableMaps[hash] = {
69596
- args: this.#serializeValueMap(args),
69601
+ args: this.serializeValueMap(args),
69597
69602
  fragment: fragment2
69598
69603
  };
69599
69604
  }
@@ -69604,7 +69609,7 @@ var Config = class {
69604
69609
  hash
69605
69610
  };
69606
69611
  }
69607
- #serializeValueMap(map) {
69612
+ serializeValueMap(map) {
69608
69613
  if (!map) {
69609
69614
  return null;
69610
69615
  }
@@ -69619,7 +69624,7 @@ var Config = class {
69619
69624
  }
69620
69625
  if ("values" in input) {
69621
69626
  result.values = input.values.map(
69622
- (value) => this.#serializeValueMap({ foo: value }).foo
69627
+ (value) => this.serializeValueMap({ foo: value }).foo
69623
69628
  );
69624
69629
  }
69625
69630
  if ("name" in input) {
@@ -69628,7 +69633,7 @@ var Config = class {
69628
69633
  if ("fields" in input) {
69629
69634
  result.fields = input.fields.map((field) => ({
69630
69635
  name: field.name,
69631
- value: this.#serializeValueMap({ foo: field.value }).foo
69636
+ value: this.serializeValueMap({ foo: field.value }).foo
69632
69637
  }));
69633
69638
  }
69634
69639
  }
@@ -70074,40 +70079,13 @@ var TypeWrapper = /* @__PURE__ */ ((TypeWrapper2) => {
70074
70079
 
70075
70080
  // src/lib/parse.ts
70076
70081
  var import_parser = __toESM(require_lib3(), 1);
70077
-
70078
- // src/lib/deepMerge.ts
70079
- var import_deepmerge = __toESM(require_cjs(), 1);
70080
- function deepMerge(filepath, ...targets) {
70081
- try {
70082
- if (targets.length === 1) {
70083
- return targets[0];
70084
- } else if (targets.length === 2) {
70085
- return (0, import_deepmerge.default)(targets[0], targets[1], {
70086
- arrayMerge: (source, update) => [...new Set(source.concat(update))]
70087
- });
70088
- }
70089
- return deepMerge(filepath, targets[0], deepMerge(filepath, ...targets.slice(1)));
70090
- } catch (e2) {
70091
- throw new HoudiniError({
70092
- filepath,
70093
- message: "could not merge: " + JSON.stringify(targets, null, 4),
70094
- description: e2.message
70095
- });
70096
- }
70097
- }
70098
-
70099
- // src/lib/parse.ts
70100
- async function parseJS(str, config4) {
70101
- const defaultConfig = {
70102
- plugins: ["typescript"],
70103
- sourceType: "module"
70104
- };
70082
+ async function parseJS(str) {
70105
70083
  return {
70106
70084
  start: 0,
70107
- script: (0, import_parser.parse)(
70108
- str || "",
70109
- config4 ? deepMerge("", defaultConfig, config4) : defaultConfig
70110
- ).program,
70085
+ script: (0, import_parser.parse)(str || "", {
70086
+ plugins: ["typescript"],
70087
+ sourceType: "module"
70088
+ }).program,
70111
70089
  end: str.length
70112
70090
  };
70113
70091
  }
@@ -70157,6 +70135,27 @@ async function cleanupFiles(pathFolder, listOfObj) {
70157
70135
  return allFilesNotInList;
70158
70136
  }
70159
70137
 
70138
+ // src/lib/deepMerge.ts
70139
+ var import_deepmerge = __toESM(require_cjs(), 1);
70140
+ function deepMerge(filepath, ...targets) {
70141
+ try {
70142
+ if (targets.length === 1) {
70143
+ return targets[0];
70144
+ } else if (targets.length === 2) {
70145
+ return (0, import_deepmerge.default)(targets[0], targets[1], {
70146
+ arrayMerge: (source, update) => [...new Set(source.concat(update))]
70147
+ });
70148
+ }
70149
+ return deepMerge(filepath, targets[0], deepMerge(filepath, ...targets.slice(1)));
70150
+ } catch (e2) {
70151
+ throw new HoudiniError({
70152
+ filepath,
70153
+ message: "could not merge: " + targets,
70154
+ description: e2.message
70155
+ });
70156
+ }
70157
+ }
70158
+
70160
70159
  // ../../node_modules/.pnpm/estree-walker@3.0.1/node_modules/estree-walker/src/walker.js
70161
70160
  var WalkerBase = class {
70162
70161
  constructor() {
@@ -70642,6 +70641,205 @@ function murmurHash(str) {
70642
70641
  return s2;
70643
70642
  }
70644
70643
 
70644
+ // ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/types.js
70645
+ var VOID = -1;
70646
+ var PRIMITIVE = 0;
70647
+ var ARRAY = 1;
70648
+ var OBJECT = 2;
70649
+ var DATE = 3;
70650
+ var REGEXP = 4;
70651
+ var MAP = 5;
70652
+ var SET = 6;
70653
+ var ERROR = 7;
70654
+ var BIGINT = 8;
70655
+
70656
+ // ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/deserialize.js
70657
+ var env = typeof self === "object" ? self : globalThis;
70658
+ var deserializer = ($, _) => {
70659
+ const as = (out, index) => {
70660
+ $.set(index, out);
70661
+ return out;
70662
+ };
70663
+ const unpair = (index) => {
70664
+ if ($.has(index))
70665
+ return $.get(index);
70666
+ const [type, value] = _[index];
70667
+ switch (type) {
70668
+ case PRIMITIVE:
70669
+ case VOID:
70670
+ return as(value, index);
70671
+ case ARRAY: {
70672
+ const arr = as([], index);
70673
+ for (const index2 of value)
70674
+ arr.push(unpair(index2));
70675
+ return arr;
70676
+ }
70677
+ case OBJECT: {
70678
+ const object = as({}, index);
70679
+ for (const [key, index2] of value)
70680
+ object[unpair(key)] = unpair(index2);
70681
+ return object;
70682
+ }
70683
+ case DATE:
70684
+ return as(new Date(value), index);
70685
+ case REGEXP: {
70686
+ const { source, flags } = value;
70687
+ return as(new RegExp(source, flags), index);
70688
+ }
70689
+ case MAP: {
70690
+ const map = as(/* @__PURE__ */ new Map(), index);
70691
+ for (const [key, index2] of value)
70692
+ map.set(unpair(key), unpair(index2));
70693
+ return map;
70694
+ }
70695
+ case SET: {
70696
+ const set = as(/* @__PURE__ */ new Set(), index);
70697
+ for (const index2 of value)
70698
+ set.add(unpair(index2));
70699
+ return set;
70700
+ }
70701
+ case ERROR: {
70702
+ const { name, message } = value;
70703
+ return as(new env[name](message), index);
70704
+ }
70705
+ case BIGINT:
70706
+ return as(BigInt(value), index);
70707
+ case "BigInt":
70708
+ return as(Object(BigInt(value)), index);
70709
+ }
70710
+ return as(new env[type](value), index);
70711
+ };
70712
+ return unpair;
70713
+ };
70714
+ var deserialize = (serialized) => deserializer(/* @__PURE__ */ new Map(), serialized)(0);
70715
+
70716
+ // ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/serialize.js
70717
+ var EMPTY = "";
70718
+ var { toString } = {};
70719
+ var { keys } = Object;
70720
+ var typeOf = (value) => {
70721
+ const type = typeof value;
70722
+ if (type !== "object" || !value)
70723
+ return [PRIMITIVE, type];
70724
+ const asString = toString.call(value).slice(8, -1);
70725
+ switch (asString) {
70726
+ case "Array":
70727
+ return [ARRAY, EMPTY];
70728
+ case "Object":
70729
+ return [OBJECT, EMPTY];
70730
+ case "Date":
70731
+ return [DATE, EMPTY];
70732
+ case "RegExp":
70733
+ return [REGEXP, EMPTY];
70734
+ case "Map":
70735
+ return [MAP, EMPTY];
70736
+ case "Set":
70737
+ return [SET, EMPTY];
70738
+ }
70739
+ if (asString.includes("Array"))
70740
+ return [ARRAY, asString];
70741
+ if (asString.includes("Error"))
70742
+ return [ERROR, asString];
70743
+ return [OBJECT, asString];
70744
+ };
70745
+ var shouldSkip = ([TYPE, type]) => TYPE === PRIMITIVE && (type === "function" || type === "symbol");
70746
+ var serializer = (strict, json, $, _) => {
70747
+ const as = (out, value) => {
70748
+ const index = _.push(out) - 1;
70749
+ $.set(value, index);
70750
+ return index;
70751
+ };
70752
+ const pair = (value) => {
70753
+ if ($.has(value))
70754
+ return $.get(value);
70755
+ let [TYPE, type] = typeOf(value);
70756
+ switch (TYPE) {
70757
+ case PRIMITIVE: {
70758
+ let entry = value;
70759
+ switch (type) {
70760
+ case "bigint":
70761
+ TYPE = BIGINT;
70762
+ entry = value.toString();
70763
+ break;
70764
+ case "function":
70765
+ case "symbol":
70766
+ if (strict)
70767
+ throw new TypeError("unable to serialize " + type);
70768
+ entry = null;
70769
+ break;
70770
+ case "undefined":
70771
+ return as([VOID], value);
70772
+ }
70773
+ return as([TYPE, entry], value);
70774
+ }
70775
+ case ARRAY: {
70776
+ if (type)
70777
+ return as([type, [...value]], value);
70778
+ const arr = [];
70779
+ const index = as([TYPE, arr], value);
70780
+ for (const entry of value)
70781
+ arr.push(pair(entry));
70782
+ return index;
70783
+ }
70784
+ case OBJECT: {
70785
+ if (type) {
70786
+ switch (type) {
70787
+ case "BigInt":
70788
+ return as([type, value.toString()], value);
70789
+ case "Boolean":
70790
+ case "Number":
70791
+ case "String":
70792
+ return as([type, value.valueOf()], value);
70793
+ }
70794
+ }
70795
+ if (json && "toJSON" in value)
70796
+ return pair(value.toJSON());
70797
+ const entries = [];
70798
+ const index = as([TYPE, entries], value);
70799
+ for (const key of keys(value)) {
70800
+ if (strict || !shouldSkip(typeOf(value[key])))
70801
+ entries.push([pair(key), pair(value[key])]);
70802
+ }
70803
+ return index;
70804
+ }
70805
+ case DATE:
70806
+ return as([TYPE, value.toISOString()], value);
70807
+ case REGEXP: {
70808
+ const { source, flags } = value;
70809
+ return as([TYPE, { source, flags }], value);
70810
+ }
70811
+ case MAP: {
70812
+ const entries = [];
70813
+ const index = as([TYPE, entries], value);
70814
+ for (const [key, entry] of value) {
70815
+ if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry))))
70816
+ entries.push([pair(key), pair(entry)]);
70817
+ }
70818
+ return index;
70819
+ }
70820
+ case SET: {
70821
+ const entries = [];
70822
+ const index = as([TYPE, entries], value);
70823
+ for (const entry of value) {
70824
+ if (strict || !shouldSkip(typeOf(entry)))
70825
+ entries.push(pair(entry));
70826
+ }
70827
+ return index;
70828
+ }
70829
+ }
70830
+ const { message } = value;
70831
+ return as([TYPE, { name: type, message }], value);
70832
+ };
70833
+ return pair;
70834
+ };
70835
+ var serialize = (value, { json, lossy } = {}) => {
70836
+ const _ = [];
70837
+ return serializer(!(json || lossy), !!json, /* @__PURE__ */ new Map(), _)(value), _;
70838
+ };
70839
+
70840
+ // ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/index.js
70841
+ 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));
70842
+
70645
70843
  // src/codegen/transforms/fragmentVariables.ts
70646
70844
  var graphql5 = __toESM(require_graphql2(), 1);
70647
70845
 
@@ -70789,100 +70987,106 @@ function inlineFragmentArgs({
70789
70987
  filepath,
70790
70988
  document
70791
70989
  ).reduce((acc, arg) => ({ ...acc, [arg.name]: arg }), {});
70792
- const result = graphql5.visit(document, {
70793
- FragmentSpread(node) {
70794
- if (!fragmentDefinitions[node.name.value]) {
70795
- throw new Error("Could not find definition for fragment" + node.name.value);
70796
- }
70797
- const { definition } = fragmentDefinitions[node.name.value];
70798
- let { args, hash } = collectWithArguments(config4, filepath, node, scope);
70799
- const newFragmentName = `${node.name.value}${hash}`;
70800
- config4.registerFragmentVariablesHash({
70801
- hash: newFragmentName,
70802
- fragment: node.name.value,
70803
- args
70804
- });
70805
- if (!visitedFragments.has(newFragmentName)) {
70806
- visitedFragments.add(newFragmentName);
70807
- const defaultArguments = collectDefaultArgumentValues(config4, filepath, definition);
70808
- if (args) {
70809
- for (const [field, value] of Object.entries(defaultArguments || {})) {
70810
- if (!args[field]) {
70811
- args[field] = value;
70812
- }
70813
- }
70814
- generatedFragments[newFragmentName] = inlineFragmentArgs({
70815
- config: config4,
70990
+ const result = esm_default(
70991
+ graphql5.visit(document, {
70992
+ FragmentSpread(node) {
70993
+ if (!fragmentDefinitions[node.name.value]) {
70994
+ throw new Error("Could not find definition for fragment" + node.name.value);
70995
+ }
70996
+ const { definition } = fragmentDefinitions[node.name.value];
70997
+ let { args, hash } = collectWithArguments(config4, filepath, node, scope);
70998
+ const newFragmentName = `${node.name.value}${hash}`;
70999
+ config4.registerFragmentVariablesHash({
71000
+ hash: newFragmentName,
71001
+ fragment: node.name.value,
71002
+ args
71003
+ });
71004
+ if (!visitedFragments.has(newFragmentName)) {
71005
+ visitedFragments.add(newFragmentName);
71006
+ const defaultArguments = collectDefaultArgumentValues(
71007
+ config4,
70816
71008
  filepath,
70817
- fragmentDefinitions,
70818
- document: fragmentDefinitions[node.name.value].definition,
70819
- generatedFragments,
70820
- visitedFragments,
70821
- scope: args,
70822
- newName: newFragmentName
70823
- });
70824
- } else {
70825
- const doc = fragmentDefinitions[node.name.value].document;
70826
- const definitionIndex = doc.document.definitions.findIndex(
70827
- (definition2) => definition2.kind === "FragmentDefinition" && definition2.name.value === node.name.value
71009
+ definition
70828
71010
  );
70829
- const localDefinitions = [...doc.document.definitions];
70830
- localDefinitions.splice(definitionIndex, 1);
70831
- localDefinitions.push(
70832
- inlineFragmentArgs({
71011
+ if (args) {
71012
+ for (const [field, value] of Object.entries(defaultArguments || {})) {
71013
+ if (!args[field]) {
71014
+ args[field] = value;
71015
+ }
71016
+ }
71017
+ generatedFragments[newFragmentName] = inlineFragmentArgs({
70833
71018
  config: config4,
70834
71019
  filepath,
70835
71020
  fragmentDefinitions,
70836
71021
  document: fragmentDefinitions[node.name.value].definition,
70837
71022
  generatedFragments,
70838
71023
  visitedFragments,
70839
- scope: defaultArguments,
70840
- newName: ""
70841
- })
70842
- );
70843
- doc.document = {
70844
- ...doc.document,
70845
- definitions: localDefinitions
70846
- };
71024
+ scope: args,
71025
+ newName: newFragmentName
71026
+ });
71027
+ } else {
71028
+ const doc = fragmentDefinitions[node.name.value].document;
71029
+ const definitionIndex = doc.document.definitions.findIndex(
71030
+ (definition2) => definition2.kind === "FragmentDefinition" && definition2.name.value === node.name.value
71031
+ );
71032
+ const localDefinitions = [...doc.document.definitions];
71033
+ localDefinitions.splice(definitionIndex, 1);
71034
+ localDefinitions.push(
71035
+ inlineFragmentArgs({
71036
+ config: config4,
71037
+ filepath,
71038
+ fragmentDefinitions,
71039
+ document: fragmentDefinitions[node.name.value].definition,
71040
+ generatedFragments,
71041
+ visitedFragments,
71042
+ scope: defaultArguments,
71043
+ newName: ""
71044
+ })
71045
+ );
71046
+ doc.document = {
71047
+ ...doc.document,
71048
+ definitions: localDefinitions
71049
+ };
71050
+ }
71051
+ if (node.name.value !== newFragmentName) {
71052
+ return {
71053
+ ...node,
71054
+ name: {
71055
+ kind: "Name",
71056
+ value: newFragmentName
71057
+ }
71058
+ };
71059
+ }
71060
+ }
71061
+ },
71062
+ Argument(node) {
71063
+ const value = node.value;
71064
+ if (value.kind !== "Variable") {
71065
+ return;
70847
71066
  }
70848
- if (node.name.value !== newFragmentName) {
71067
+ if (!scope) {
71068
+ throw new HoudiniError({
71069
+ filepath,
71070
+ message: node.name.value + " is not defined in the current scope: " + JSON.stringify(scope)
71071
+ });
71072
+ }
71073
+ const newValue = scope[value.name.value];
71074
+ if (newValue) {
70849
71075
  return {
70850
71076
  ...node,
70851
- name: {
70852
- kind: "Name",
70853
- value: newFragmentName
70854
- }
71077
+ value: newValue
70855
71078
  };
70856
71079
  }
71080
+ if (definitionArgs[value.name.value] && definitionArgs[value.name.value].required) {
71081
+ throw new HoudiniError({
71082
+ filepath,
71083
+ message: "Missing value for required arg: " + value.name.value
71084
+ });
71085
+ }
71086
+ return null;
70857
71087
  }
70858
- },
70859
- Argument(node) {
70860
- const value = node.value;
70861
- if (value.kind !== "Variable") {
70862
- return;
70863
- }
70864
- if (!scope) {
70865
- throw new HoudiniError({
70866
- filepath,
70867
- message: node.name.value + " is not defined in the current scope: " + JSON.stringify(scope)
70868
- });
70869
- }
70870
- const newValue = scope[value.name.value];
70871
- if (newValue) {
70872
- return {
70873
- ...node,
70874
- value: newValue
70875
- };
70876
- }
70877
- if (definitionArgs[value.name.value] && definitionArgs[value.name.value].required) {
70878
- throw new HoudiniError({
70879
- filepath,
70880
- message: "Missing value for required arg: " + value.name.value
70881
- });
70882
- }
70883
- return null;
70884
- }
70885
- });
71088
+ })
71089
+ );
70886
71090
  if (newName) {
70887
71091
  result.name = {
70888
71092
  kind: graphql5.Kind.NAME,
@@ -71604,7 +71808,7 @@ async function paginate(config4, documents) {
71604
71808
  ]
71605
71809
  }
71606
71810
  ];
71607
- const keys = config4.keyFieldsForType(!nodeQuery ? config4.schema.getQueryType()?.name || "" : fragment2).flatMap((key) => {
71811
+ const keys2 = config4.keyFieldsForType(!nodeQuery ? config4.schema.getQueryType()?.name || "" : fragment2).flatMap((key) => {
71608
71812
  if (fragment2 === config4.schema.getQueryType()?.name) {
71609
71813
  return [];
71610
71814
  }
@@ -71654,7 +71858,7 @@ async function paginate(config4, documents) {
71654
71858
  }
71655
71859
  })
71656
71860
  ).concat(
71657
- !nodeQuery ? [] : keys.map(
71861
+ !nodeQuery ? [] : keys2.map(
71658
71862
  (key) => ({
71659
71863
  kind: graphql10.Kind.VARIABLE_DEFINITION,
71660
71864
  type: key.type,
@@ -71677,7 +71881,7 @@ async function paginate(config4, documents) {
71677
71881
  kind: graphql10.Kind.NAME,
71678
71882
  value: typeConfig?.resolve?.queryField || "node"
71679
71883
  },
71680
- ["arguments"]: keys.map((key) => ({
71884
+ ["arguments"]: keys2.map((key) => ({
71681
71885
  kind: graphql10.Kind.ARGUMENT,
71682
71886
  name: {
71683
71887
  kind: graphql10.Kind.NAME,
@@ -72371,12 +72575,24 @@ function prepareSelection({
72371
72575
  }
72372
72576
  const typeName = fieldType.toString();
72373
72577
  const pathSoFar = path2.concat(attributeName);
72374
- const keys = config4.keyFieldsForType(rootType);
72578
+ const keys2 = config4.keyFieldsForType(rootType);
72375
72579
  let fieldObj = {
72376
72580
  type: typeName,
72377
72581
  keyRaw: fieldKey(config4, field)
72378
72582
  };
72379
- if (keys.includes(field.name.value)) {
72583
+ if (field.directives && field.directives.length > 0) {
72584
+ fieldObj.directives = field.directives?.map((directive) => ({
72585
+ name: directive.name.value,
72586
+ arguments: (directive.arguments ?? []).reduce(
72587
+ (acc, arg) => ({
72588
+ ...acc,
72589
+ [arg.name.value]: config4.serializeValueMap({ field: arg.value })["field"]
72590
+ }),
72591
+ {}
72592
+ )
72593
+ }));
72594
+ }
72595
+ if (keys2.includes(field.name.value)) {
72380
72596
  fieldObj.visible = true;
72381
72597
  }
72382
72598
  if (nullable) {
@@ -72601,12 +72817,7 @@ function artifactGenerator(stats) {
72601
72817
  writeIndexFile(config4, docs)
72602
72818
  ].concat(
72603
72819
  docs.map(async (doc) => {
72604
- const {
72605
- document,
72606
- name,
72607
- generateArtifact,
72608
- originalParsed
72609
- } = doc;
72820
+ const { document, name, generateArtifact, originalParsed, originalString } = doc;
72610
72821
  if (!generateArtifact) {
72611
72822
  return;
72612
72823
  }
@@ -73021,12 +73232,12 @@ ${exportStatement("config")}
73021
73232
  },
73022
73233
  [path_exports.join(config4.runtimeSource, "client", "plugins", "injectedPlugins.js")]: (content) => injectPlugins({ config: config4, content, importStatement, exportStatement })
73023
73234
  }),
73024
- ...config4.plugins.filter((plugin2) => plugin2.includeRuntime).map((plugin2) => generatePluginRuntime(config4, docs, plugin2)),
73235
+ ...config4.plugins.filter((plugin2) => plugin2.includeRuntime).map((plugin2) => generatePluginRuntime(config4, plugin2)),
73025
73236
  generatePluginIndex({ config: config4, exportStatement: exportStar })
73026
73237
  ]);
73027
73238
  await generateGraphqlReturnTypes(config4, docs);
73028
73239
  }
73029
- async function generatePluginRuntime(config4, docs, plugin2) {
73240
+ async function generatePluginRuntime(config4, plugin2) {
73030
73241
  if (houdini_mode.is_testing || !plugin2.includeRuntime) {
73031
73242
  return;
73032
73243
  }
@@ -73043,16 +73254,12 @@ async function generatePluginRuntime(config4, docs, plugin2) {
73043
73254
  });
73044
73255
  }
73045
73256
  const pluginDir = config4.pluginRuntimeDirectory(plugin2.name);
73046
- let transformMap = plugin2.transformRuntime ?? {};
73047
- if (transformMap && typeof transformMap === "function") {
73048
- transformMap = transformMap(docs);
73049
- }
73050
73257
  await fs_exports.mkdirp(pluginDir);
73051
73258
  await fs_exports.recursiveCopy(
73052
73259
  runtime_path,
73053
73260
  pluginDir,
73054
73261
  Object.fromEntries(
73055
- Object.entries(transformMap).map(([key, value]) => [
73262
+ Object.entries(plugin2.transformRuntime ?? {}).map(([key, value]) => [
73056
73263
  path_exports.join(runtime_path, key),
73057
73264
  (content) => value({ config: config4, content })
73058
73265
  ])
@@ -73492,8 +73699,7 @@ async function generateDocumentTypes(config4, docs) {
73492
73699
  originalParsed: originalDocument,
73493
73700
  name,
73494
73701
  filename,
73495
- generateArtifact,
73496
- artifact
73702
+ generateArtifact
73497
73703
  }) => {
73498
73704
  if (!generateArtifact) {
73499
73705
  return;
@@ -73532,14 +73738,6 @@ async function generateDocumentTypes(config4, docs) {
73532
73738
  missingScalars
73533
73739
  );
73534
73740
  }
73535
- program.body.push(
73536
- AST11.exportNamedDeclaration(
73537
- AST11.tsTypeAliasDeclaration(
73538
- AST11.identifier(`${name}$artifact`),
73539
- convertToTs(serializeValue(artifact))
73540
- )
73541
- )
73542
- );
73543
73741
  await fs_exports.writeFile(typeDefPath, recast11.print(program).code);
73544
73742
  typePaths.push(typeDefPath);
73545
73743
  }
@@ -73566,17 +73764,18 @@ export * from "${module}"
73566
73764
  `;
73567
73765
  let indexContent = recast11.print(typeIndex).code;
73568
73766
  for (const plugin2 of config4.plugins) {
73569
- if (plugin2.indexFile) {
73570
- indexContent = plugin2.indexFile({
73571
- config: config4,
73572
- content: indexContent,
73573
- exportDefaultAs,
73574
- exportStarFrom: exportStarFrom2,
73575
- pluginRoot: config4.pluginDirectory(plugin2.name),
73576
- typedef: true,
73577
- documents: docs
73578
- });
73767
+ if (!plugin2.indexFile) {
73768
+ continue;
73579
73769
  }
73770
+ indexContent = plugin2.indexFile({
73771
+ config: config4,
73772
+ content: indexContent,
73773
+ exportDefaultAs,
73774
+ exportStarFrom: exportStarFrom2,
73775
+ pluginRoot: config4.pluginDirectory(plugin2.name),
73776
+ typedef: true,
73777
+ documents: docs
73778
+ });
73580
73779
  if (plugin2.includeRuntime) {
73581
73780
  indexContent += exportStarFrom2({
73582
73781
  module: "./" + path_exports.relative(config4.rootDir, config4.pluginRuntimeDirectory(plugin2.name))
@@ -73608,42 +73807,6 @@ ${[...missingScalars].map(
73608
73807
  For more information, please visit this link: ${siteURL}/api/config#custom-scalars`);
73609
73808
  }
73610
73809
  }
73611
- function convertToTs(source) {
73612
- if (source.type === "ObjectExpression") {
73613
- return AST11.tsTypeLiteral(
73614
- source.properties.reduce(
73615
- (props, prop) => {
73616
- if (prop.type !== "ObjectProperty" || prop.key.type !== "StringLiteral" && prop.key.type === "Identifier") {
73617
- return props;
73618
- }
73619
- return [
73620
- ...props,
73621
- AST11.tsPropertySignature(
73622
- prop.key,
73623
- AST11.tsTypeAnnotation(convertToTs(prop.value))
73624
- )
73625
- ];
73626
- },
73627
- []
73628
- )
73629
- );
73630
- }
73631
- if (source.type === "ArrayExpression") {
73632
- return AST11.tsTupleType(
73633
- source.elements.map((element) => convertToTs(element))
73634
- );
73635
- }
73636
- if (source.type === "Literal" && typeof source.value === "boolean") {
73637
- return AST11.tsLiteralType(AST11.booleanLiteral(source.value));
73638
- }
73639
- if (source.type === "Literal" && typeof source.value === "number") {
73640
- return AST11.tsLiteralType(AST11.numericLiteral(source.value));
73641
- }
73642
- if (source.type === "Literal" && typeof source.value === "string") {
73643
- return AST11.tsLiteralType(AST11.stringLiteral(source.value));
73644
- }
73645
- return AST11.tsLiteralType(source);
73646
- }
73647
73810
  async function generateOperationTypeDefs(config4, filepath, body, definition, selections, visitedTypes, missingScalars) {
73648
73811
  let parentType = null;
73649
73812
  if (definition.operation === "query") {
@@ -73915,10 +74078,10 @@ function typeDefinitions(config4, body, docs, returnType) {
73915
74078
  typeName = "__ROOT__";
73916
74079
  }
73917
74080
  let idFields = AST12.tsNeverKeyword();
73918
- const keys = keyFieldsForType(config4.configFile, type.name);
73919
- if (graphql19.isObjectType(type) && keys.length > 0 && keys.every((key) => type.getFields()[key])) {
74081
+ const keys2 = keyFieldsForType(config4.configFile, type.name);
74082
+ if (graphql19.isObjectType(type) && keys2.length > 0 && keys2.every((key) => type.getFields()[key])) {
73920
74083
  idFields = AST12.tsTypeLiteral(
73921
- keys.map((key) => {
74084
+ keys2.map((key) => {
73922
74085
  const fieldType = type.getFields()[key];
73923
74086
  const unwrapped = unwrapType(config4, fieldType.type);
73924
74087
  return AST12.tsPropertySignature(
@@ -74351,6 +74514,9 @@ async function writeIndexFile2(config4, docs) {
74351
74514
  module: relative2(config4.pluginRuntimeDirectory(plugin2.name))
74352
74515
  });
74353
74516
  }
74517
+ if (!plugin2.indexFile) {
74518
+ continue;
74519
+ }
74354
74520
  }
74355
74521
  await fs_exports.writeFile(path_exports.join(config4.rootDir, "index.js"), body);
74356
74522
  }
@@ -75616,10 +75782,7 @@ async function collectDocuments(config4) {
75616
75782
  }
75617
75783
  }
75618
75784
  } catch (err) {
75619
- throw {
75620
- message: err.message,
75621
- filepath
75622
- };
75785
+ throw new HoudiniError({ ...err, filepath });
75623
75786
  }
75624
75787
  })
75625
75788
  );