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
@@ -1123,8 +1123,8 @@ ${originalIndentation}`;
1123
1123
  stack.pop();
1124
1124
  return `[${res}]`;
1125
1125
  }
1126
- let keys = Object.keys(value);
1127
- const keyLength = keys.length;
1126
+ let keys2 = Object.keys(value);
1127
+ const keyLength = keys2.length;
1128
1128
  if (keyLength === 0) {
1129
1129
  return "{}";
1130
1130
  }
@@ -1142,16 +1142,16 @@ ${indentation}`;
1142
1142
  let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
1143
1143
  if (isTypedArrayWithEntries(value)) {
1144
1144
  res += stringifyTypedArray(value, join3, maximumBreadth);
1145
- keys = keys.slice(value.length);
1145
+ keys2 = keys2.slice(value.length);
1146
1146
  maximumPropertiesToStringify -= value.length;
1147
1147
  separator = join3;
1148
1148
  }
1149
1149
  if (deterministic) {
1150
- keys = insertSort(keys);
1150
+ keys2 = insertSort(keys2);
1151
1151
  }
1152
1152
  stack.push(value);
1153
1153
  for (let i2 = 0; i2 < maximumPropertiesToStringify; i2++) {
1154
- const key2 = keys[i2];
1154
+ const key2 = keys2[i2];
1155
1155
  const tmp = stringifyFnReplacer(key2, value, stack, replacer, spacer, indentation);
1156
1156
  if (tmp !== void 0) {
1157
1157
  res += `${separator}"${strEscape(key2)}":${whitespace}${tmp}`;
@@ -1330,8 +1330,8 @@ ${originalIndentation}`;
1330
1330
  stack.pop();
1331
1331
  return `[${res2}]`;
1332
1332
  }
1333
- let keys = Object.keys(value);
1334
- const keyLength = keys.length;
1333
+ let keys2 = Object.keys(value);
1334
+ const keyLength = keys2.length;
1335
1335
  if (keyLength === 0) {
1336
1336
  return "{}";
1337
1337
  }
@@ -1346,16 +1346,16 @@ ${indentation}`;
1346
1346
  let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
1347
1347
  if (isTypedArrayWithEntries(value)) {
1348
1348
  res += stringifyTypedArray(value, join3, maximumBreadth);
1349
- keys = keys.slice(value.length);
1349
+ keys2 = keys2.slice(value.length);
1350
1350
  maximumPropertiesToStringify -= value.length;
1351
1351
  separator = join3;
1352
1352
  }
1353
1353
  if (deterministic) {
1354
- keys = insertSort(keys);
1354
+ keys2 = insertSort(keys2);
1355
1355
  }
1356
1356
  stack.push(value);
1357
1357
  for (let i2 = 0; i2 < maximumPropertiesToStringify; i2++) {
1358
- const key2 = keys[i2];
1358
+ const key2 = keys2[i2];
1359
1359
  const tmp = stringifyIndent(key2, value[key2], stack, spacer, indentation);
1360
1360
  if (tmp !== void 0) {
1361
1361
  res += `${separator}"${strEscape(key2)}": ${tmp}`;
@@ -1434,8 +1434,8 @@ ${originalIndentation}`;
1434
1434
  stack.pop();
1435
1435
  return `[${res}]`;
1436
1436
  }
1437
- let keys = Object.keys(value);
1438
- const keyLength = keys.length;
1437
+ let keys2 = Object.keys(value);
1438
+ const keyLength = keys2.length;
1439
1439
  if (keyLength === 0) {
1440
1440
  return "{}";
1441
1441
  }
@@ -1446,16 +1446,16 @@ ${originalIndentation}`;
1446
1446
  let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
1447
1447
  if (isTypedArrayWithEntries(value)) {
1448
1448
  res += stringifyTypedArray(value, ",", maximumBreadth);
1449
- keys = keys.slice(value.length);
1449
+ keys2 = keys2.slice(value.length);
1450
1450
  maximumPropertiesToStringify -= value.length;
1451
1451
  separator = ",";
1452
1452
  }
1453
1453
  if (deterministic) {
1454
- keys = insertSort(keys);
1454
+ keys2 = insertSort(keys2);
1455
1455
  }
1456
1456
  stack.push(value);
1457
1457
  for (let i2 = 0; i2 < maximumPropertiesToStringify; i2++) {
1458
- const key2 = keys[i2];
1458
+ const key2 = keys2[i2];
1459
1459
  const tmp = stringifySimple(key2, value[key2], stack);
1460
1460
  if (tmp !== void 0) {
1461
1461
  res += `${separator}"${strEscape(key2)}":${tmp}`;
@@ -4107,9 +4107,9 @@ var require_micromatch = __commonJS({
4107
4107
  if (!utils.isObject(obj)) {
4108
4108
  throw new TypeError("Expected the first argument to be an object");
4109
4109
  }
4110
- let keys = micromatch2(Object.keys(obj), patterns, options);
4110
+ let keys2 = micromatch2(Object.keys(obj), patterns, options);
4111
4111
  let res = {};
4112
- for (let key of keys)
4112
+ for (let key of keys2)
4113
4113
  res[key] = obj[key];
4114
4114
  return res;
4115
4115
  };
@@ -4373,16 +4373,16 @@ var require_GraphQLError = __commonJS({
4373
4373
  return obj && obj.__esModule ? obj : { default: obj };
4374
4374
  }
4375
4375
  function ownKeys(object, enumerableOnly) {
4376
- var keys = Object.keys(object);
4376
+ var keys2 = Object.keys(object);
4377
4377
  if (Object.getOwnPropertySymbols) {
4378
4378
  var symbols = Object.getOwnPropertySymbols(object);
4379
4379
  if (enumerableOnly)
4380
4380
  symbols = symbols.filter(function(sym) {
4381
4381
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
4382
4382
  });
4383
- keys.push.apply(keys, symbols);
4383
+ keys2.push.apply(keys2, symbols);
4384
4384
  }
4385
- return keys;
4385
+ return keys2;
4386
4386
  }
4387
4387
  function _objectSpread(target) {
4388
4388
  for (var i2 = 1; i2 < arguments.length; i2++) {
@@ -4619,7 +4619,7 @@ var require_GraphQLError = __commonJS({
4619
4619
  }
4620
4620
  _createClass(GraphQLError5, [{
4621
4621
  key: "toString",
4622
- value: function toString() {
4622
+ value: function toString2() {
4623
4623
  return printError(this);
4624
4624
  }
4625
4625
  }, {
@@ -4941,14 +4941,14 @@ var require_inspect = __commonJS({
4941
4941
  return formatObject2(value, seenValues);
4942
4942
  }
4943
4943
  function formatObject2(object, seenValues) {
4944
- var keys = Object.keys(object);
4945
- if (keys.length === 0) {
4944
+ var keys2 = Object.keys(object);
4945
+ if (keys2.length === 0) {
4946
4946
  return "{}";
4947
4947
  }
4948
4948
  if (seenValues.length > MAX_RECURSIVE_DEPTH2) {
4949
4949
  return "[" + getObjectTag2(object) + "]";
4950
4950
  }
4951
- var properties = keys.map(function(key) {
4951
+ var properties = keys2.map(function(key) {
4952
4952
  var value = formatValue2(object[key], seenValues);
4953
4953
  return key + ": " + value;
4954
4954
  });
@@ -6546,7 +6546,7 @@ var require_visitor = __commonJS({
6546
6546
  Object.defineProperty(exports, "__esModule", {
6547
6547
  value: true
6548
6548
  });
6549
- exports.visit = visit14;
6549
+ exports.visit = visit13;
6550
6550
  exports.visitInParallel = visitInParallel;
6551
6551
  exports.getVisitFn = getVisitFn;
6552
6552
  exports.BREAK = exports.QueryDocumentKeys = void 0;
@@ -6609,11 +6609,11 @@ var require_visitor = __commonJS({
6609
6609
  exports.QueryDocumentKeys = QueryDocumentKeys;
6610
6610
  var BREAK = Object.freeze({});
6611
6611
  exports.BREAK = BREAK;
6612
- function visit14(root, visitor) {
6612
+ function visit13(root, visitor) {
6613
6613
  var visitorKeys = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : QueryDocumentKeys;
6614
6614
  var stack = void 0;
6615
6615
  var inArray = Array.isArray(root);
6616
- var keys = [root];
6616
+ var keys2 = [root];
6617
6617
  var index = -1;
6618
6618
  var edits = [];
6619
6619
  var node = void 0;
@@ -6624,7 +6624,7 @@ var require_visitor = __commonJS({
6624
6624
  var newRoot = root;
6625
6625
  do {
6626
6626
  index++;
6627
- var isLeaving = index === keys.length;
6627
+ var isLeaving = index === keys2.length;
6628
6628
  var isEdited = isLeaving && edits.length !== 0;
6629
6629
  if (isLeaving) {
6630
6630
  key = ancestors.length === 0 ? void 0 : path2[path2.length - 1];
@@ -6657,12 +6657,12 @@ var require_visitor = __commonJS({
6657
6657
  }
6658
6658
  }
6659
6659
  index = stack.index;
6660
- keys = stack.keys;
6660
+ keys2 = stack.keys;
6661
6661
  edits = stack.edits;
6662
6662
  inArray = stack.inArray;
6663
6663
  stack = stack.prev;
6664
6664
  } else {
6665
- key = parent ? inArray ? index : keys[index] : void 0;
6665
+ key = parent ? inArray ? index : keys2[index] : void 0;
6666
6666
  node = parent ? parent[key] : newRoot;
6667
6667
  if (node === null || node === void 0) {
6668
6668
  continue;
@@ -6710,12 +6710,12 @@ var require_visitor = __commonJS({
6710
6710
  stack = {
6711
6711
  inArray,
6712
6712
  index,
6713
- keys,
6713
+ keys: keys2,
6714
6714
  edits,
6715
6715
  prev: stack
6716
6716
  };
6717
6717
  inArray = Array.isArray(node);
6718
- keys = inArray ? node : (_visitorKeys$node$kin = visitorKeys[node.kind]) !== null && _visitorKeys$node$kin !== void 0 ? _visitorKeys$node$kin : [];
6718
+ keys2 = inArray ? node : (_visitorKeys$node$kin = visitorKeys[node.kind]) !== null && _visitorKeys$node$kin !== void 0 ? _visitorKeys$node$kin : [];
6719
6719
  index = -1;
6720
6720
  edits = [];
6721
6721
  if (parent) {
@@ -7698,7 +7698,7 @@ var require_definition = __commonJS({
7698
7698
  return new GraphQLList6(ofType);
7699
7699
  }
7700
7700
  }
7701
- GraphQLList6.prototype.toString = function toString() {
7701
+ GraphQLList6.prototype.toString = function toString2() {
7702
7702
  return "[" + String(this.ofType) + "]";
7703
7703
  };
7704
7704
  GraphQLList6.prototype.toJSON = function toJSON() {
@@ -7717,7 +7717,7 @@ var require_definition = __commonJS({
7717
7717
  return new GraphQLNonNull6(ofType);
7718
7718
  }
7719
7719
  }
7720
- GraphQLNonNull6.prototype.toString = function toString() {
7720
+ GraphQLNonNull6.prototype.toString = function toString2() {
7721
7721
  return String(this.ofType) + "!";
7722
7722
  };
7723
7723
  GraphQLNonNull6.prototype.toJSON = function toJSON() {
@@ -7813,7 +7813,7 @@ var require_definition = __commonJS({
7813
7813
  extensionASTNodes: (_this$extensionASTNod = this.extensionASTNodes) !== null && _this$extensionASTNod !== void 0 ? _this$extensionASTNod : []
7814
7814
  };
7815
7815
  };
7816
- _proto.toString = function toString() {
7816
+ _proto.toString = function toString2() {
7817
7817
  return this.name;
7818
7818
  };
7819
7819
  _proto.toJSON = function toJSON() {
@@ -7867,7 +7867,7 @@ var require_definition = __commonJS({
7867
7867
  extensionASTNodes: this.extensionASTNodes || []
7868
7868
  };
7869
7869
  };
7870
- _proto2.toString = function toString() {
7870
+ _proto2.toString = function toString2() {
7871
7871
  return this.name;
7872
7872
  };
7873
7873
  _proto2.toJSON = function toJSON() {
@@ -7998,7 +7998,7 @@ var require_definition = __commonJS({
7998
7998
  extensionASTNodes: (_this$extensionASTNod2 = this.extensionASTNodes) !== null && _this$extensionASTNod2 !== void 0 ? _this$extensionASTNod2 : []
7999
7999
  };
8000
8000
  };
8001
- _proto3.toString = function toString() {
8001
+ _proto3.toString = function toString2() {
8002
8002
  return this.name;
8003
8003
  };
8004
8004
  _proto3.toJSON = function toJSON() {
@@ -8045,7 +8045,7 @@ var require_definition = __commonJS({
8045
8045
  extensionASTNodes: (_this$extensionASTNod3 = this.extensionASTNodes) !== null && _this$extensionASTNod3 !== void 0 ? _this$extensionASTNod3 : []
8046
8046
  };
8047
8047
  };
8048
- _proto4.toString = function toString() {
8048
+ _proto4.toString = function toString2() {
8049
8049
  return this.name;
8050
8050
  };
8051
8051
  _proto4.toJSON = function toJSON() {
@@ -8089,7 +8089,7 @@ var require_definition = __commonJS({
8089
8089
  _proto5.getValue = function getValue(name) {
8090
8090
  return this._nameLookup[name];
8091
8091
  };
8092
- _proto5.serialize = function serialize(outputValue) {
8092
+ _proto5.serialize = function serialize2(outputValue) {
8093
8093
  var enumValue = this._valueLookup.get(outputValue);
8094
8094
  if (enumValue === void 0) {
8095
8095
  throw new _GraphQLError.GraphQLError('Enum "'.concat(this.name, '" cannot represent value: ').concat((0, _inspect.default)(outputValue)));
@@ -8141,7 +8141,7 @@ var require_definition = __commonJS({
8141
8141
  extensionASTNodes: (_this$extensionASTNod4 = this.extensionASTNodes) !== null && _this$extensionASTNod4 !== void 0 ? _this$extensionASTNod4 : []
8142
8142
  };
8143
8143
  };
8144
- _proto5.toString = function toString() {
8144
+ _proto5.toString = function toString2() {
8145
8145
  return this.name;
8146
8146
  };
8147
8147
  _proto5.toJSON = function toJSON() {
@@ -8219,7 +8219,7 @@ var require_definition = __commonJS({
8219
8219
  extensionASTNodes: (_this$extensionASTNod5 = this.extensionASTNodes) !== null && _this$extensionASTNod5 !== void 0 ? _this$extensionASTNod5 : []
8220
8220
  };
8221
8221
  };
8222
- _proto6.toString = function toString() {
8222
+ _proto6.toString = function toString2() {
8223
8223
  return this.name;
8224
8224
  };
8225
8225
  _proto6.toJSON = function toJSON() {
@@ -9473,7 +9473,7 @@ var require_directives = __commonJS({
9473
9473
  astNode: this.astNode
9474
9474
  };
9475
9475
  };
9476
- _proto.toString = function toString() {
9476
+ _proto.toString = function toString2() {
9477
9477
  return "@" + this.name;
9478
9478
  };
9479
9479
  _proto.toJSON = function toJSON() {
@@ -11410,16 +11410,16 @@ var require_KnownArgumentNamesRule = __commonJS({
11410
11410
  return obj && obj.__esModule ? obj : { default: obj };
11411
11411
  }
11412
11412
  function ownKeys(object, enumerableOnly) {
11413
- var keys = Object.keys(object);
11413
+ var keys2 = Object.keys(object);
11414
11414
  if (Object.getOwnPropertySymbols) {
11415
11415
  var symbols = Object.getOwnPropertySymbols(object);
11416
11416
  if (enumerableOnly)
11417
11417
  symbols = symbols.filter(function(sym) {
11418
11418
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
11419
11419
  });
11420
- keys.push.apply(keys, symbols);
11420
+ keys2.push.apply(keys2, symbols);
11421
11421
  }
11422
- return keys;
11422
+ return keys2;
11423
11423
  }
11424
11424
  function _objectSpread(target) {
11425
11425
  for (var i2 = 1; i2 < arguments.length; i2++) {
@@ -11666,16 +11666,16 @@ var require_ProvidedRequiredArgumentsRule = __commonJS({
11666
11666
  return obj && obj.__esModule ? obj : { default: obj };
11667
11667
  }
11668
11668
  function ownKeys(object, enumerableOnly) {
11669
- var keys = Object.keys(object);
11669
+ var keys2 = Object.keys(object);
11670
11670
  if (Object.getOwnPropertySymbols) {
11671
11671
  var symbols = Object.getOwnPropertySymbols(object);
11672
11672
  if (enumerableOnly)
11673
11673
  symbols = symbols.filter(function(sym) {
11674
11674
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
11675
11675
  });
11676
- keys.push.apply(keys, symbols);
11676
+ keys2.push.apply(keys2, symbols);
11677
11677
  }
11678
- return keys;
11678
+ return keys2;
11679
11679
  }
11680
11680
  function _objectSpread(target) {
11681
11681
  for (var i2 = 1; i2 < arguments.length; i2++) {
@@ -12933,13 +12933,13 @@ var require_promiseForObject = __commonJS({
12933
12933
  });
12934
12934
  exports.default = promiseForObject;
12935
12935
  function promiseForObject(object) {
12936
- var keys = Object.keys(object);
12937
- var valuesAndPromises = keys.map(function(name) {
12936
+ var keys2 = Object.keys(object);
12937
+ var valuesAndPromises = keys2.map(function(name) {
12938
12938
  return object[name];
12939
12939
  });
12940
12940
  return Promise.all(valuesAndPromises).then(function(values) {
12941
12941
  return values.reduce(function(resolvedObject, value, i2) {
12942
- resolvedObject[keys[i2]] = value;
12942
+ resolvedObject[keys2[i2]] = value;
12943
12943
  return resolvedObject;
12944
12944
  }, /* @__PURE__ */ Object.create(null));
12945
12945
  });
@@ -15391,16 +15391,16 @@ var require_getIntrospectionQuery = __commonJS({
15391
15391
  });
15392
15392
  exports.getIntrospectionQuery = getIntrospectionQuery2;
15393
15393
  function ownKeys(object, enumerableOnly) {
15394
- var keys = Object.keys(object);
15394
+ var keys2 = Object.keys(object);
15395
15395
  if (Object.getOwnPropertySymbols) {
15396
15396
  var symbols = Object.getOwnPropertySymbols(object);
15397
15397
  if (enumerableOnly)
15398
15398
  symbols = symbols.filter(function(sym) {
15399
15399
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
15400
15400
  });
15401
- keys.push.apply(keys, symbols);
15401
+ keys2.push.apply(keys2, symbols);
15402
15402
  }
15403
- return keys;
15403
+ return keys2;
15404
15404
  }
15405
15405
  function _objectSpread(target) {
15406
15406
  for (var i2 = 1; i2 < arguments.length; i2++) {
@@ -15493,16 +15493,16 @@ var require_introspectionFromSchema = __commonJS({
15493
15493
  return obj && obj.__esModule ? obj : { default: obj };
15494
15494
  }
15495
15495
  function ownKeys(object, enumerableOnly) {
15496
- var keys = Object.keys(object);
15496
+ var keys2 = Object.keys(object);
15497
15497
  if (Object.getOwnPropertySymbols) {
15498
15498
  var symbols = Object.getOwnPropertySymbols(object);
15499
15499
  if (enumerableOnly)
15500
15500
  symbols = symbols.filter(function(sym) {
15501
15501
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
15502
15502
  });
15503
- keys.push.apply(keys, symbols);
15503
+ keys2.push.apply(keys2, symbols);
15504
15504
  }
15505
- return keys;
15505
+ return keys2;
15506
15506
  }
15507
15507
  function _objectSpread(target) {
15508
15508
  for (var i2 = 1; i2 < arguments.length; i2++) {
@@ -15834,16 +15834,16 @@ var require_extendSchema = __commonJS({
15834
15834
  return obj && obj.__esModule ? obj : { default: obj };
15835
15835
  }
15836
15836
  function ownKeys(object, enumerableOnly) {
15837
- var keys = Object.keys(object);
15837
+ var keys2 = Object.keys(object);
15838
15838
  if (Object.getOwnPropertySymbols) {
15839
15839
  var symbols = Object.getOwnPropertySymbols(object);
15840
15840
  if (enumerableOnly)
15841
15841
  symbols = symbols.filter(function(sym) {
15842
15842
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
15843
15843
  });
15844
- keys.push.apply(keys, symbols);
15844
+ keys2.push.apply(keys2, symbols);
15845
15845
  }
15846
- return keys;
15846
+ return keys2;
15847
15847
  }
15848
15848
  function _objectSpread(target) {
15849
15849
  for (var i2 = 1; i2 < arguments.length; i2++) {
@@ -16434,16 +16434,16 @@ var require_lexicographicSortSchema = __commonJS({
16434
16434
  return obj && obj.__esModule ? obj : { default: obj };
16435
16435
  }
16436
16436
  function ownKeys(object, enumerableOnly) {
16437
- var keys = Object.keys(object);
16437
+ var keys2 = Object.keys(object);
16438
16438
  if (Object.getOwnPropertySymbols) {
16439
16439
  var symbols = Object.getOwnPropertySymbols(object);
16440
16440
  if (enumerableOnly)
16441
16441
  symbols = symbols.filter(function(sym) {
16442
16442
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
16443
16443
  });
16444
- keys.push.apply(keys, symbols);
16444
+ keys2.push.apply(keys2, symbols);
16445
16445
  }
16446
- return keys;
16446
+ return keys2;
16447
16447
  }
16448
16448
  function _objectSpread(target) {
16449
16449
  for (var i2 = 1; i2 < arguments.length; i2++) {
@@ -16984,16 +16984,16 @@ var require_findBreakingChanges = __commonJS({
16984
16984
  return obj && obj.__esModule ? obj : { default: obj };
16985
16985
  }
16986
16986
  function ownKeys(object, enumerableOnly) {
16987
- var keys = Object.keys(object);
16987
+ var keys2 = Object.keys(object);
16988
16988
  if (Object.getOwnPropertySymbols) {
16989
16989
  var symbols = Object.getOwnPropertySymbols(object);
16990
16990
  if (enumerableOnly)
16991
16991
  symbols = symbols.filter(function(sym) {
16992
16992
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
16993
16993
  });
16994
- keys.push.apply(keys, symbols);
16994
+ keys2.push.apply(keys2, symbols);
16995
16995
  }
16996
- return keys;
16996
+ return keys2;
16997
16997
  }
16998
16998
  function _objectSpread(target) {
16999
16999
  for (var i2 = 1; i2 < arguments.length; i2++) {
@@ -19227,9 +19227,9 @@ var require_legacy_streams = __commonJS({
19227
19227
  this.mode = 438;
19228
19228
  this.bufferSize = 64 * 1024;
19229
19229
  options = options || {};
19230
- var keys = Object.keys(options);
19231
- for (var index = 0, length = keys.length; index < length; index++) {
19232
- var key = keys[index];
19230
+ var keys2 = Object.keys(options);
19231
+ for (var index = 0, length = keys2.length; index < length; index++) {
19232
+ var key = keys2[index];
19233
19233
  this[key] = options[key];
19234
19234
  }
19235
19235
  if (this.encoding)
@@ -19277,9 +19277,9 @@ var require_legacy_streams = __commonJS({
19277
19277
  this.mode = 438;
19278
19278
  this.bytesWritten = 0;
19279
19279
  options = options || {};
19280
- var keys = Object.keys(options);
19281
- for (var index = 0, length = keys.length; index < length; index++) {
19282
- var key = keys[index];
19280
+ var keys2 = Object.keys(options);
19281
+ for (var index = 0, length = keys2.length; index < length; index++) {
19282
+ var key = keys2[index];
19283
19283
  this[key] = options[key];
19284
19284
  }
19285
19285
  if (this.start !== void 0) {
@@ -22496,10 +22496,10 @@ var require_glob = __commonJS({
22496
22496
  if (add === null || typeof add !== "object") {
22497
22497
  return origin;
22498
22498
  }
22499
- var keys = Object.keys(add);
22500
- var i2 = keys.length;
22499
+ var keys2 = Object.keys(add);
22500
+ var i2 = keys2.length;
22501
22501
  while (i2--) {
22502
- origin[keys[i2]] = add[keys[i2]];
22502
+ origin[keys2[i2]] = add[keys2[i2]];
22503
22503
  }
22504
22504
  return origin;
22505
22505
  }
@@ -30914,12 +30914,12 @@ var require_lib3 = __commonJS({
30914
30914
  SyntaxError: "BABEL_PARSER_SYNTAX_ERROR",
30915
30915
  SourceTypeModuleError: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"
30916
30916
  };
30917
- var reflect = (keys, last = keys.length - 1) => ({
30917
+ var reflect = (keys2, last = keys2.length - 1) => ({
30918
30918
  get() {
30919
- return keys.reduce((object, key) => object[key], this);
30919
+ return keys2.reduce((object, key) => object[key], this);
30920
30920
  },
30921
30921
  set(value) {
30922
- keys.reduce(
30922
+ keys2.reduce(
30923
30923
  (item, key, i2) => i2 === last ? item[key] = value : item[key],
30924
30924
  this
30925
30925
  );
@@ -32852,9 +32852,9 @@ var require_lib3 = __commonJS({
32852
32852
  }
32853
32853
  clone(skipArrays) {
32854
32854
  const state = new State();
32855
- const keys = Object.keys(this);
32856
- for (let i2 = 0, length = keys.length; i2 < length; i2++) {
32857
- const key = keys[i2];
32855
+ const keys2 = Object.keys(this);
32856
+ for (let i2 = 0, length = keys2.length; i2 < length; i2++) {
32857
+ const key = keys2[i2];
32858
32858
  let val = this[key];
32859
32859
  if (!skipArrays && Array.isArray(val)) {
32860
32860
  val = val.slice();
@@ -34759,9 +34759,9 @@ var require_lib3 = __commonJS({
34759
34759
  {
34760
34760
  NodePrototype.__clone = function() {
34761
34761
  const newNode = new Node(void 0, this.start, this.loc.start);
34762
- const keys = Object.keys(this);
34763
- for (let i2 = 0, length = keys.length; i2 < length; i2++) {
34764
- const key = keys[i2];
34762
+ const keys2 = Object.keys(this);
34763
+ for (let i2 = 0, length = keys2.length; i2 < length; i2++) {
34764
+ const key = keys2[i2];
34765
34765
  if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") {
34766
34766
  newNode[key] = this[key];
34767
34767
  }
@@ -45401,109 +45401,6 @@ var require_lib3 = __commonJS({
45401
45401
  }
45402
45402
  });
45403
45403
 
45404
- // ../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js
45405
- var require_cjs = __commonJS({
45406
- "../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module2) {
45407
- "use strict";
45408
- var isMergeableObject = function isMergeableObject2(value) {
45409
- return isNonNullObject(value) && !isSpecial(value);
45410
- };
45411
- function isNonNullObject(value) {
45412
- return !!value && typeof value === "object";
45413
- }
45414
- function isSpecial(value) {
45415
- var stringValue = Object.prototype.toString.call(value);
45416
- return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
45417
- }
45418
- var canUseSymbol = typeof Symbol === "function" && Symbol.for;
45419
- var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
45420
- function isReactElement(value) {
45421
- return value.$$typeof === REACT_ELEMENT_TYPE;
45422
- }
45423
- function emptyTarget(val) {
45424
- return Array.isArray(val) ? [] : {};
45425
- }
45426
- function cloneUnlessOtherwiseSpecified(value, options) {
45427
- return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
45428
- }
45429
- function defaultArrayMerge(target, source, options) {
45430
- return target.concat(source).map(function(element) {
45431
- return cloneUnlessOtherwiseSpecified(element, options);
45432
- });
45433
- }
45434
- function getMergeFunction(key, options) {
45435
- if (!options.customMerge) {
45436
- return deepmerge;
45437
- }
45438
- var customMerge = options.customMerge(key);
45439
- return typeof customMerge === "function" ? customMerge : deepmerge;
45440
- }
45441
- function getEnumerableOwnPropertySymbols(target) {
45442
- return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
45443
- return target.propertyIsEnumerable(symbol);
45444
- }) : [];
45445
- }
45446
- function getKeys(target) {
45447
- return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
45448
- }
45449
- function propertyIsOnObject(object, property) {
45450
- try {
45451
- return property in object;
45452
- } catch (_) {
45453
- return false;
45454
- }
45455
- }
45456
- function propertyIsUnsafe(target, key) {
45457
- return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
45458
- }
45459
- function mergeObject(target, source, options) {
45460
- var destination = {};
45461
- if (options.isMergeableObject(target)) {
45462
- getKeys(target).forEach(function(key) {
45463
- destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
45464
- });
45465
- }
45466
- getKeys(source).forEach(function(key) {
45467
- if (propertyIsUnsafe(target, key)) {
45468
- return;
45469
- }
45470
- if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
45471
- destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
45472
- } else {
45473
- destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
45474
- }
45475
- });
45476
- return destination;
45477
- }
45478
- function deepmerge(target, source, options) {
45479
- options = options || {};
45480
- options.arrayMerge = options.arrayMerge || defaultArrayMerge;
45481
- options.isMergeableObject = options.isMergeableObject || isMergeableObject;
45482
- options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
45483
- var sourceIsArray = Array.isArray(source);
45484
- var targetIsArray = Array.isArray(target);
45485
- var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
45486
- if (!sourceAndTargetTypesMatch) {
45487
- return cloneUnlessOtherwiseSpecified(source, options);
45488
- } else if (sourceIsArray) {
45489
- return options.arrayMerge(target, source, options);
45490
- } else {
45491
- return mergeObject(target, source, options);
45492
- }
45493
- }
45494
- deepmerge.all = function deepmergeAll(array, options) {
45495
- if (!Array.isArray(array)) {
45496
- throw new Error("first argument should be an array");
45497
- }
45498
- return array.reduce(function(prev, next) {
45499
- return deepmerge(prev, next, options);
45500
- }, {});
45501
- };
45502
- var deepmerge_1 = deepmerge;
45503
- module2.exports = deepmerge_1;
45504
- }
45505
- });
45506
-
45507
45404
  // ../../node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.js
45508
45405
  var require_tslib = __commonJS({
45509
45406
  "../../node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.js"(exports, module2) {
@@ -47773,7 +47670,7 @@ var require_path_visitor = __commonJS({
47773
47670
  }
47774
47671
  return target;
47775
47672
  }
47776
- PathVisitor.visit = function visit14(node, methods) {
47673
+ PathVisitor.visit = function visit13(node, methods) {
47777
47674
  return PathVisitor.fromMethodsObject(methods).visit(node);
47778
47675
  };
47779
47676
  var PVp = PathVisitor.prototype;
@@ -47964,7 +47861,7 @@ var require_path_visitor = __commonJS({
47964
47861
  this.needToCallTraverse = false;
47965
47862
  return visitChildren(path2, PathVisitor.fromMethodsObject(newVisitor || this.visitor));
47966
47863
  };
47967
- sharedContextProtoMethods.visit = function visit14(path2, newVisitor) {
47864
+ sharedContextProtoMethods.visit = function visit13(path2, newVisitor) {
47968
47865
  if (!(this instanceof this.Context)) {
47969
47866
  throw new Error("");
47970
47867
  }
@@ -49357,7 +49254,7 @@ var require_main = __commonJS({
49357
49254
  var someField = _a.someField;
49358
49255
  var Type = _a.Type;
49359
49256
  var use = _a.use;
49360
- var visit14 = _a.visit;
49257
+ var visit13 = _a.visit;
49361
49258
  exports.astNodesAreEquivalent = astNodesAreEquivalent;
49362
49259
  exports.builders = builders;
49363
49260
  exports.builtInTypes = builtInTypes;
@@ -49374,7 +49271,7 @@ var require_main = __commonJS({
49374
49271
  exports.someField = someField;
49375
49272
  exports.Type = Type;
49376
49273
  exports.use = use;
49377
- exports.visit = visit14;
49274
+ exports.visit = visit13;
49378
49275
  Object.assign(namedTypes_1.namedTypes, n);
49379
49276
  }
49380
49277
  });
@@ -51162,10 +51059,10 @@ var require_util2 = __commonJS({
51162
51059
  var result = {};
51163
51060
  var argc = args.length;
51164
51061
  for (var i2 = 0; i2 < argc; ++i2) {
51165
- var keys = Object.keys(args[i2]);
51166
- var keyCount = keys.length;
51062
+ var keys2 = Object.keys(args[i2]);
51063
+ var keyCount = keys2.length;
51167
51064
  for (var j = 0; j < keyCount; ++j) {
51168
- result[keys[j]] = true;
51065
+ result[keys2[j]] = true;
51169
51066
  }
51170
51067
  }
51171
51068
  return result;
@@ -58825,10 +58722,10 @@ var require_parser2 = __commonJS({
58825
58722
  loc.indent = newIndent;
58826
58723
  this.findTokenRange(loc);
58827
58724
  }
58828
- var keys = Object.keys(node);
58829
- var keyCount = keys.length;
58725
+ var keys2 = Object.keys(node);
58726
+ var keyCount = keys2.length;
58830
58727
  for (var i2 = 0; i2 < keyCount; ++i2) {
58831
- var key = keys[i2];
58728
+ var key = keys2[i2];
58832
58729
  if (key === "loc") {
58833
58730
  copy[key] = node[key];
58834
58731
  } else if (key === "tokens" && node.type === "File") {
@@ -59587,13 +59484,13 @@ var require_patcher = __commonJS({
59587
59484
  if (newPath.needsParens() && !oldPath.hasParens()) {
59588
59485
  return false;
59589
59486
  }
59590
- var keys = (0, util_1.getUnionOfKeys)(oldNode, newNode);
59487
+ var keys2 = (0, util_1.getUnionOfKeys)(oldNode, newNode);
59591
59488
  if (oldNode.type === "File" || newNode.type === "File") {
59592
- delete keys.tokens;
59489
+ delete keys2.tokens;
59593
59490
  }
59594
- delete keys.loc;
59491
+ delete keys2.loc;
59595
59492
  var originalReprintCount = reprints.length;
59596
- for (var k in keys) {
59493
+ for (var k in keys2) {
59597
59494
  if (k.charAt(0) === "_") {
59598
59495
  continue;
59599
59496
  }
@@ -61836,6 +61733,109 @@ var require_main2 = __commonJS({
61836
61733
  }
61837
61734
  });
61838
61735
 
61736
+ // ../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js
61737
+ var require_cjs = __commonJS({
61738
+ "../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module2) {
61739
+ "use strict";
61740
+ var isMergeableObject = function isMergeableObject2(value) {
61741
+ return isNonNullObject(value) && !isSpecial(value);
61742
+ };
61743
+ function isNonNullObject(value) {
61744
+ return !!value && typeof value === "object";
61745
+ }
61746
+ function isSpecial(value) {
61747
+ var stringValue = Object.prototype.toString.call(value);
61748
+ return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
61749
+ }
61750
+ var canUseSymbol = typeof Symbol === "function" && Symbol.for;
61751
+ var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
61752
+ function isReactElement(value) {
61753
+ return value.$$typeof === REACT_ELEMENT_TYPE;
61754
+ }
61755
+ function emptyTarget(val) {
61756
+ return Array.isArray(val) ? [] : {};
61757
+ }
61758
+ function cloneUnlessOtherwiseSpecified(value, options) {
61759
+ return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
61760
+ }
61761
+ function defaultArrayMerge(target, source, options) {
61762
+ return target.concat(source).map(function(element) {
61763
+ return cloneUnlessOtherwiseSpecified(element, options);
61764
+ });
61765
+ }
61766
+ function getMergeFunction(key, options) {
61767
+ if (!options.customMerge) {
61768
+ return deepmerge;
61769
+ }
61770
+ var customMerge = options.customMerge(key);
61771
+ return typeof customMerge === "function" ? customMerge : deepmerge;
61772
+ }
61773
+ function getEnumerableOwnPropertySymbols(target) {
61774
+ return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
61775
+ return target.propertyIsEnumerable(symbol);
61776
+ }) : [];
61777
+ }
61778
+ function getKeys(target) {
61779
+ return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
61780
+ }
61781
+ function propertyIsOnObject(object, property) {
61782
+ try {
61783
+ return property in object;
61784
+ } catch (_) {
61785
+ return false;
61786
+ }
61787
+ }
61788
+ function propertyIsUnsafe(target, key) {
61789
+ return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
61790
+ }
61791
+ function mergeObject(target, source, options) {
61792
+ var destination = {};
61793
+ if (options.isMergeableObject(target)) {
61794
+ getKeys(target).forEach(function(key) {
61795
+ destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
61796
+ });
61797
+ }
61798
+ getKeys(source).forEach(function(key) {
61799
+ if (propertyIsUnsafe(target, key)) {
61800
+ return;
61801
+ }
61802
+ if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
61803
+ destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
61804
+ } else {
61805
+ destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
61806
+ }
61807
+ });
61808
+ return destination;
61809
+ }
61810
+ function deepmerge(target, source, options) {
61811
+ options = options || {};
61812
+ options.arrayMerge = options.arrayMerge || defaultArrayMerge;
61813
+ options.isMergeableObject = options.isMergeableObject || isMergeableObject;
61814
+ options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
61815
+ var sourceIsArray = Array.isArray(source);
61816
+ var targetIsArray = Array.isArray(target);
61817
+ var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
61818
+ if (!sourceAndTargetTypesMatch) {
61819
+ return cloneUnlessOtherwiseSpecified(source, options);
61820
+ } else if (sourceIsArray) {
61821
+ return options.arrayMerge(target, source, options);
61822
+ } else {
61823
+ return mergeObject(target, source, options);
61824
+ }
61825
+ }
61826
+ deepmerge.all = function deepmergeAll(array, options) {
61827
+ if (!Array.isArray(array)) {
61828
+ throw new Error("first argument should be an array");
61829
+ }
61830
+ return array.reduce(function(prev, next) {
61831
+ return deepmerge(prev, next, options);
61832
+ }, {});
61833
+ };
61834
+ var deepmerge_1 = deepmerge;
61835
+ module2.exports = deepmerge_1;
61836
+ }
61837
+ });
61838
+
61839
61839
  // src/vite/index.ts
61840
61840
  var vite_exports = {};
61841
61841
  __export(vite_exports, {
@@ -62860,14 +62860,14 @@ function pushComment(node, entity, field, argument) {
62860
62860
  if (typeof comment !== "string" || comment.length === 0) {
62861
62861
  return;
62862
62862
  }
62863
- const keys = [entity];
62863
+ const keys2 = [entity];
62864
62864
  if (field) {
62865
- keys.push(field);
62865
+ keys2.push(field);
62866
62866
  if (argument) {
62867
- keys.push(argument);
62867
+ keys2.push(argument);
62868
62868
  }
62869
62869
  }
62870
- const path2 = keys.join(".");
62870
+ const path2 = keys2.join(".");
62871
62871
  if (!commentsRegistry[path2]) {
62872
62872
  commentsRegistry[path2] = [];
62873
62873
  }
@@ -62886,14 +62886,14 @@ function hasMultilineItems(maybeArray) {
62886
62886
  function addDescription(cb) {
62887
62887
  return (node, _key, _parent, path2, ancestors) => {
62888
62888
  var _a;
62889
- const keys = [];
62889
+ const keys2 = [];
62890
62890
  const parent = path2.reduce((prev, key2) => {
62891
62891
  if (["fields", "arguments", "values"].includes(key2) && prev.name) {
62892
- keys.push(prev.name.value);
62892
+ keys2.push(prev.name.value);
62893
62893
  }
62894
62894
  return prev[key2];
62895
62895
  }, ancestors[0]);
62896
- const key = [...keys, (_a = parent === null || parent === void 0 ? void 0 : parent.name) === null || _a === void 0 ? void 0 : _a.value].filter(Boolean).join(".");
62896
+ const key = [...keys2, (_a = parent === null || parent === void 0 ? void 0 : parent.name) === null || _a === void 0 ? void 0 : _a.value].filter(Boolean).join(".");
62897
62897
  const items = [];
62898
62898
  if (node.kind.includes("Definition") && commentsRegistry[key]) {
62899
62899
  items.push(...commentsRegistry[key]);
@@ -65429,9 +65429,9 @@ var fragmentKey = " $fragments";
65429
65429
 
65430
65430
  // src/runtime/lib/key.ts
65431
65431
  var computeKey = ({ field, args }) => {
65432
- const keys = Object.keys(args ?? {});
65433
- keys.sort();
65434
- return args && keys.length > 0 ? `${field}(${keys.map((key) => `${key}: ${stringifyObjectWithNoQuotesOnKeys(args[key])}`).join(", ")})` : field;
65432
+ const keys2 = Object.keys(args ?? {});
65433
+ keys2.sort();
65434
+ return args && keys2.length > 0 ? `${field}(${keys2.map((key) => `${key}: ${stringifyObjectWithNoQuotesOnKeys(args[key])}`).join(", ")})` : field;
65435
65435
  };
65436
65436
  var stringifyObjectWithNoQuotesOnKeys = (obj_from_json) => {
65437
65437
  if (Array.isArray(obj_from_json)) {
@@ -68639,7 +68639,8 @@ var CacheInternal = class {
68639
68639
  parent = rootID,
68640
68640
  variables,
68641
68641
  stepsFromConnection = null,
68642
- ignoreMasking
68642
+ ignoreMasking,
68643
+ fullCheck = false
68643
68644
  }) {
68644
68645
  if (parent === null) {
68645
68646
  return { data: null, partial: false, stale: false, hasData: true };
@@ -68664,11 +68665,28 @@ var CacheInternal = class {
68664
68665
  let targetSelection = getFieldsForType(selection, typename);
68665
68666
  for (const [
68666
68667
  attributeName,
68667
- { type, keyRaw, selection: fieldSelection, nullable, list, visible }
68668
+ { type, keyRaw, selection: fieldSelection, nullable, list, visible, directives }
68668
68669
  ] of Object.entries(targetSelection)) {
68669
- if (!visible && !ignoreMasking) {
68670
+ if (!visible && !ignoreMasking && !fullCheck) {
68670
68671
  continue;
68671
68672
  }
68673
+ const includeDirective = directives?.find((d) => {
68674
+ return d.name === "include";
68675
+ });
68676
+ if (includeDirective) {
68677
+ if (!evaluateFragmentVariables(includeDirective.arguments, variables ?? {})["if"]) {
68678
+ continue;
68679
+ }
68680
+ }
68681
+ const skipDirective = directives?.find((d) => {
68682
+ return d.name === "skip";
68683
+ });
68684
+ if (skipDirective) {
68685
+ if (evaluateFragmentVariables(skipDirective.arguments, variables ?? {})["if"]) {
68686
+ continue;
68687
+ }
68688
+ }
68689
+ const fieldTarget = visible || ignoreMasking ? target : {};
68672
68690
  const key = evaluateKey(keyRaw, variables);
68673
68691
  const { value } = this.storage.get(parent, key);
68674
68692
  const dt_field = this.staleManager.getFieldTime(parent, key);
@@ -68691,16 +68709,16 @@ var CacheInternal = class {
68691
68709
  partial = true;
68692
68710
  }
68693
68711
  if (typeof value === "undefined" || value === null) {
68694
- target[attributeName] = null;
68712
+ fieldTarget[attributeName] = null;
68695
68713
  if (typeof value !== "undefined") {
68696
68714
  hasData = true;
68697
68715
  }
68698
68716
  } else if (!fieldSelection) {
68699
68717
  const fnUnmarshal = this.config?.scalars?.[type]?.unmarshal;
68700
68718
  if (fnUnmarshal) {
68701
- target[attributeName] = fnUnmarshal(value);
68719
+ fieldTarget[attributeName] = fnUnmarshal(value);
68702
68720
  } else {
68703
- target[attributeName] = value;
68721
+ fieldTarget[attributeName] = value;
68704
68722
  }
68705
68723
  hasData = true;
68706
68724
  } else if (Array.isArray(value)) {
@@ -68709,9 +68727,10 @@ var CacheInternal = class {
68709
68727
  variables,
68710
68728
  linkedList: value,
68711
68729
  stepsFromConnection: nextStep,
68712
- ignoreMasking: !!ignoreMasking
68730
+ ignoreMasking: !!ignoreMasking,
68731
+ fullCheck
68713
68732
  });
68714
- target[attributeName] = listValue.data;
68733
+ fieldTarget[attributeName] = listValue.data;
68715
68734
  if (listValue.partial) {
68716
68735
  partial = true;
68717
68736
  }
@@ -68727,9 +68746,10 @@ var CacheInternal = class {
68727
68746
  selection: fieldSelection,
68728
68747
  variables,
68729
68748
  stepsFromConnection: nextStep,
68730
- ignoreMasking
68749
+ ignoreMasking,
68750
+ fullCheck
68731
68751
  });
68732
- target[attributeName] = objectFields.data;
68752
+ fieldTarget[attributeName] = objectFields.data;
68733
68753
  if (objectFields.partial) {
68734
68754
  partial = true;
68735
68755
  }
@@ -68740,7 +68760,7 @@ var CacheInternal = class {
68740
68760
  hasData = true;
68741
68761
  }
68742
68762
  }
68743
- if (target[attributeName] === null && !nullable && !embeddedCursor) {
68763
+ if (fieldTarget[attributeName] === null && !nullable && !embeddedCursor) {
68744
68764
  cascadeNull = true;
68745
68765
  }
68746
68766
  }
@@ -68772,7 +68792,8 @@ var CacheInternal = class {
68772
68792
  variables,
68773
68793
  linkedList,
68774
68794
  stepsFromConnection,
68775
- ignoreMasking
68795
+ ignoreMasking,
68796
+ fullCheck
68776
68797
  }) {
68777
68798
  const result = [];
68778
68799
  let partialData = false;
@@ -68785,7 +68806,8 @@ var CacheInternal = class {
68785
68806
  variables,
68786
68807
  linkedList: entry,
68787
68808
  stepsFromConnection,
68788
- ignoreMasking
68809
+ ignoreMasking,
68810
+ fullCheck
68789
68811
  });
68790
68812
  result.push(nestedValue.data);
68791
68813
  if (nestedValue.partial) {
@@ -68807,7 +68829,8 @@ var CacheInternal = class {
68807
68829
  selection: fields,
68808
68830
  variables,
68809
68831
  stepsFromConnection,
68810
- ignoreMasking
68832
+ ignoreMasking,
68833
+ fullCheck
68811
68834
  });
68812
68835
  result.push(data);
68813
68836
  if (partial) {
@@ -69006,11 +69029,10 @@ var query = documentPlugin(ArtifactKind.Query, function() {
69006
69029
  cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
69007
69030
  }
69008
69031
  lastVariables = { ...marshalVariables(ctx) };
69009
- const variables = lastVariables;
69010
69032
  subscriptionSpec = {
69011
69033
  rootType: ctx.artifact.rootType,
69012
69034
  selection: ctx.artifact.selection,
69013
- variables: () => variables,
69035
+ variables: () => lastVariables,
69014
69036
  set: (newValue) => {
69015
69037
  resolve2(ctx, {
69016
69038
  data: newValue,
@@ -69039,17 +69061,12 @@ var query = documentPlugin(ArtifactKind.Query, function() {
69039
69061
  // src/runtime/client/plugins/fragment.ts
69040
69062
  var fragment = documentPlugin(ArtifactKind.Fragment, function() {
69041
69063
  let subscriptionSpec = null;
69042
- let lastReference = null;
69043
69064
  return {
69044
69065
  start(ctx, { next, resolve: resolve2, variablesChanged, marshalVariables }) {
69045
69066
  if (!ctx.stuff.parentID) {
69046
69067
  return next(ctx);
69047
69068
  }
69048
- const currentReference = {
69049
- parent: ctx.stuff.parentID,
69050
- variables: marshalVariables(ctx)
69051
- };
69052
- if (!ctx.cacheParams?.disableSubscriptions && (!deepEquals(lastReference, currentReference) || variablesChanged(ctx))) {
69069
+ if (variablesChanged(ctx) && !ctx.cacheParams?.disableSubscriptions) {
69053
69070
  if (subscriptionSpec) {
69054
69071
  cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
69055
69072
  }
@@ -69072,7 +69089,6 @@ var fragment = documentPlugin(ArtifactKind.Fragment, function() {
69072
69089
  }
69073
69090
  };
69074
69091
  cache_default.subscribe(subscriptionSpec, variables);
69075
- lastReference = currentReference;
69076
69092
  }
69077
69093
  next(ctx);
69078
69094
  },
@@ -69256,8 +69272,8 @@ var Config = class {
69256
69272
  if (!apiURL) {
69257
69273
  return "";
69258
69274
  }
69259
- const env = await this.getEnv();
69260
- return this.processEnvValues(env, apiURL);
69275
+ const env2 = await this.getEnv();
69276
+ return this.processEnvValues(env2, apiURL);
69261
69277
  }
69262
69278
  get include() {
69263
69279
  if (this.configFile.include) {
@@ -69272,35 +69288,35 @@ var Config = class {
69272
69288
  return this.configFile.plugins?.[name] ?? {};
69273
69289
  }
69274
69290
  async getEnv() {
69275
- let env = process.env;
69291
+ let env2 = process.env;
69276
69292
  for (const plugin2 of this.plugins) {
69277
69293
  if (plugin2.env) {
69278
- env = {
69279
- ...await plugin2.env({ config: this, env })
69294
+ env2 = {
69295
+ ...await plugin2.env({ config: this, env: env2 })
69280
69296
  };
69281
69297
  }
69282
69298
  }
69283
- return env;
69299
+ return env2;
69284
69300
  }
69285
- processEnvValues(env, value) {
69301
+ processEnvValues(env2, value) {
69286
69302
  let headerValue;
69287
69303
  if (typeof value === "function") {
69288
- headerValue = value(env);
69304
+ headerValue = value(env2);
69289
69305
  } else if (value.startsWith("env:")) {
69290
- headerValue = env[value.slice("env:".length)];
69306
+ headerValue = env2[value.slice("env:".length)];
69291
69307
  } else {
69292
69308
  headerValue = value;
69293
69309
  }
69294
69310
  return headerValue;
69295
69311
  }
69296
69312
  async pullHeaders() {
69297
- const env = await this.getEnv();
69313
+ const env2 = await this.getEnv();
69298
69314
  if (typeof this.schemaPollHeaders === "function") {
69299
- return this.schemaPollHeaders(env);
69315
+ return this.schemaPollHeaders(env2);
69300
69316
  }
69301
69317
  const headers = Object.fromEntries(
69302
69318
  Object.entries(this.schemaPollHeaders || {}).map(([key, value]) => {
69303
- const headerValue = this.processEnvValues(env, value);
69319
+ const headerValue = this.processEnvValues(env2, value);
69304
69320
  if (!headerValue) {
69305
69321
  return [];
69306
69322
  }
@@ -69581,17 +69597,6 @@ var Config = class {
69581
69597
  }, []) ?? [];
69582
69598
  return !defaultDirectives.includes(name) && (internalDirectives.includes(name) || this.isDeleteDirective(name));
69583
69599
  }
69584
- needsRefetchArtifact(document) {
69585
- let needsArtifact = false;
69586
- graphql2.visit(document, {
69587
- Directive: (node) => {
69588
- if ([this.paginateDirective].includes(node.name.value)) {
69589
- needsArtifact = true;
69590
- }
69591
- }
69592
- });
69593
- return needsArtifact;
69594
- }
69595
69600
  #fragmentVariableMaps;
69596
69601
  registerFragmentVariablesHash({
69597
69602
  hash,
@@ -69599,7 +69604,7 @@ var Config = class {
69599
69604
  fragment: fragment2
69600
69605
  }) {
69601
69606
  this.#fragmentVariableMaps[hash] = {
69602
- args: this.#serializeValueMap(args),
69607
+ args: this.serializeValueMap(args),
69603
69608
  fragment: fragment2
69604
69609
  };
69605
69610
  }
@@ -69610,7 +69615,7 @@ var Config = class {
69610
69615
  hash
69611
69616
  };
69612
69617
  }
69613
- #serializeValueMap(map) {
69618
+ serializeValueMap(map) {
69614
69619
  if (!map) {
69615
69620
  return null;
69616
69621
  }
@@ -69625,7 +69630,7 @@ var Config = class {
69625
69630
  }
69626
69631
  if ("values" in input) {
69627
69632
  result.values = input.values.map(
69628
- (value) => this.#serializeValueMap({ foo: value }).foo
69633
+ (value) => this.serializeValueMap({ foo: value }).foo
69629
69634
  );
69630
69635
  }
69631
69636
  if ("name" in input) {
@@ -69634,7 +69639,7 @@ var Config = class {
69634
69639
  if ("fields" in input) {
69635
69640
  result.fields = input.fields.map((field) => ({
69636
69641
  name: field.name,
69637
- value: this.#serializeValueMap({ foo: field.value }).foo
69642
+ value: this.serializeValueMap({ foo: field.value }).foo
69638
69643
  }));
69639
69644
  }
69640
69645
  }
@@ -70080,40 +70085,13 @@ var TypeWrapper = /* @__PURE__ */ ((TypeWrapper2) => {
70080
70085
 
70081
70086
  // src/lib/parse.ts
70082
70087
  var import_parser = __toESM(require_lib3(), 1);
70083
-
70084
- // src/lib/deepMerge.ts
70085
- var import_deepmerge = __toESM(require_cjs(), 1);
70086
- function deepMerge(filepath, ...targets) {
70087
- try {
70088
- if (targets.length === 1) {
70089
- return targets[0];
70090
- } else if (targets.length === 2) {
70091
- return (0, import_deepmerge.default)(targets[0], targets[1], {
70092
- arrayMerge: (source, update) => [...new Set(source.concat(update))]
70093
- });
70094
- }
70095
- return deepMerge(filepath, targets[0], deepMerge(filepath, ...targets.slice(1)));
70096
- } catch (e2) {
70097
- throw new HoudiniError({
70098
- filepath,
70099
- message: "could not merge: " + JSON.stringify(targets, null, 4),
70100
- description: e2.message
70101
- });
70102
- }
70103
- }
70104
-
70105
- // src/lib/parse.ts
70106
- async function parseJS(str, config4) {
70107
- const defaultConfig = {
70108
- plugins: ["typescript"],
70109
- sourceType: "module"
70110
- };
70088
+ async function parseJS(str) {
70111
70089
  return {
70112
70090
  start: 0,
70113
- script: (0, import_parser.parse)(
70114
- str || "",
70115
- config4 ? deepMerge("", defaultConfig, config4) : defaultConfig
70116
- ).program,
70091
+ script: (0, import_parser.parse)(str || "", {
70092
+ plugins: ["typescript"],
70093
+ sourceType: "module"
70094
+ }).program,
70117
70095
  end: str.length
70118
70096
  };
70119
70097
  }
@@ -70163,6 +70141,27 @@ async function cleanupFiles(pathFolder, listOfObj) {
70163
70141
  return allFilesNotInList;
70164
70142
  }
70165
70143
 
70144
+ // src/lib/deepMerge.ts
70145
+ var import_deepmerge = __toESM(require_cjs(), 1);
70146
+ function deepMerge(filepath, ...targets) {
70147
+ try {
70148
+ if (targets.length === 1) {
70149
+ return targets[0];
70150
+ } else if (targets.length === 2) {
70151
+ return (0, import_deepmerge.default)(targets[0], targets[1], {
70152
+ arrayMerge: (source, update) => [...new Set(source.concat(update))]
70153
+ });
70154
+ }
70155
+ return deepMerge(filepath, targets[0], deepMerge(filepath, ...targets.slice(1)));
70156
+ } catch (e2) {
70157
+ throw new HoudiniError({
70158
+ filepath,
70159
+ message: "could not merge: " + targets,
70160
+ description: e2.message
70161
+ });
70162
+ }
70163
+ }
70164
+
70166
70165
  // ../../node_modules/.pnpm/estree-walker@3.0.1/node_modules/estree-walker/src/walker.js
70167
70166
  var WalkerBase = class {
70168
70167
  constructor() {
@@ -70648,6 +70647,205 @@ function murmurHash(str) {
70648
70647
  return s2;
70649
70648
  }
70650
70649
 
70650
+ // ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/types.js
70651
+ var VOID = -1;
70652
+ var PRIMITIVE = 0;
70653
+ var ARRAY = 1;
70654
+ var OBJECT = 2;
70655
+ var DATE = 3;
70656
+ var REGEXP = 4;
70657
+ var MAP = 5;
70658
+ var SET = 6;
70659
+ var ERROR = 7;
70660
+ var BIGINT = 8;
70661
+
70662
+ // ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/deserialize.js
70663
+ var env = typeof self === "object" ? self : globalThis;
70664
+ var deserializer = ($, _) => {
70665
+ const as = (out, index) => {
70666
+ $.set(index, out);
70667
+ return out;
70668
+ };
70669
+ const unpair = (index) => {
70670
+ if ($.has(index))
70671
+ return $.get(index);
70672
+ const [type, value] = _[index];
70673
+ switch (type) {
70674
+ case PRIMITIVE:
70675
+ case VOID:
70676
+ return as(value, index);
70677
+ case ARRAY: {
70678
+ const arr = as([], index);
70679
+ for (const index2 of value)
70680
+ arr.push(unpair(index2));
70681
+ return arr;
70682
+ }
70683
+ case OBJECT: {
70684
+ const object = as({}, index);
70685
+ for (const [key, index2] of value)
70686
+ object[unpair(key)] = unpair(index2);
70687
+ return object;
70688
+ }
70689
+ case DATE:
70690
+ return as(new Date(value), index);
70691
+ case REGEXP: {
70692
+ const { source, flags } = value;
70693
+ return as(new RegExp(source, flags), index);
70694
+ }
70695
+ case MAP: {
70696
+ const map = as(/* @__PURE__ */ new Map(), index);
70697
+ for (const [key, index2] of value)
70698
+ map.set(unpair(key), unpair(index2));
70699
+ return map;
70700
+ }
70701
+ case SET: {
70702
+ const set = as(/* @__PURE__ */ new Set(), index);
70703
+ for (const index2 of value)
70704
+ set.add(unpair(index2));
70705
+ return set;
70706
+ }
70707
+ case ERROR: {
70708
+ const { name, message } = value;
70709
+ return as(new env[name](message), index);
70710
+ }
70711
+ case BIGINT:
70712
+ return as(BigInt(value), index);
70713
+ case "BigInt":
70714
+ return as(Object(BigInt(value)), index);
70715
+ }
70716
+ return as(new env[type](value), index);
70717
+ };
70718
+ return unpair;
70719
+ };
70720
+ var deserialize = (serialized) => deserializer(/* @__PURE__ */ new Map(), serialized)(0);
70721
+
70722
+ // ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/serialize.js
70723
+ var EMPTY = "";
70724
+ var { toString } = {};
70725
+ var { keys } = Object;
70726
+ var typeOf = (value) => {
70727
+ const type = typeof value;
70728
+ if (type !== "object" || !value)
70729
+ return [PRIMITIVE, type];
70730
+ const asString = toString.call(value).slice(8, -1);
70731
+ switch (asString) {
70732
+ case "Array":
70733
+ return [ARRAY, EMPTY];
70734
+ case "Object":
70735
+ return [OBJECT, EMPTY];
70736
+ case "Date":
70737
+ return [DATE, EMPTY];
70738
+ case "RegExp":
70739
+ return [REGEXP, EMPTY];
70740
+ case "Map":
70741
+ return [MAP, EMPTY];
70742
+ case "Set":
70743
+ return [SET, EMPTY];
70744
+ }
70745
+ if (asString.includes("Array"))
70746
+ return [ARRAY, asString];
70747
+ if (asString.includes("Error"))
70748
+ return [ERROR, asString];
70749
+ return [OBJECT, asString];
70750
+ };
70751
+ var shouldSkip = ([TYPE, type]) => TYPE === PRIMITIVE && (type === "function" || type === "symbol");
70752
+ var serializer = (strict, json, $, _) => {
70753
+ const as = (out, value) => {
70754
+ const index = _.push(out) - 1;
70755
+ $.set(value, index);
70756
+ return index;
70757
+ };
70758
+ const pair = (value) => {
70759
+ if ($.has(value))
70760
+ return $.get(value);
70761
+ let [TYPE, type] = typeOf(value);
70762
+ switch (TYPE) {
70763
+ case PRIMITIVE: {
70764
+ let entry = value;
70765
+ switch (type) {
70766
+ case "bigint":
70767
+ TYPE = BIGINT;
70768
+ entry = value.toString();
70769
+ break;
70770
+ case "function":
70771
+ case "symbol":
70772
+ if (strict)
70773
+ throw new TypeError("unable to serialize " + type);
70774
+ entry = null;
70775
+ break;
70776
+ case "undefined":
70777
+ return as([VOID], value);
70778
+ }
70779
+ return as([TYPE, entry], value);
70780
+ }
70781
+ case ARRAY: {
70782
+ if (type)
70783
+ return as([type, [...value]], value);
70784
+ const arr = [];
70785
+ const index = as([TYPE, arr], value);
70786
+ for (const entry of value)
70787
+ arr.push(pair(entry));
70788
+ return index;
70789
+ }
70790
+ case OBJECT: {
70791
+ if (type) {
70792
+ switch (type) {
70793
+ case "BigInt":
70794
+ return as([type, value.toString()], value);
70795
+ case "Boolean":
70796
+ case "Number":
70797
+ case "String":
70798
+ return as([type, value.valueOf()], value);
70799
+ }
70800
+ }
70801
+ if (json && "toJSON" in value)
70802
+ return pair(value.toJSON());
70803
+ const entries = [];
70804
+ const index = as([TYPE, entries], value);
70805
+ for (const key of keys(value)) {
70806
+ if (strict || !shouldSkip(typeOf(value[key])))
70807
+ entries.push([pair(key), pair(value[key])]);
70808
+ }
70809
+ return index;
70810
+ }
70811
+ case DATE:
70812
+ return as([TYPE, value.toISOString()], value);
70813
+ case REGEXP: {
70814
+ const { source, flags } = value;
70815
+ return as([TYPE, { source, flags }], value);
70816
+ }
70817
+ case MAP: {
70818
+ const entries = [];
70819
+ const index = as([TYPE, entries], value);
70820
+ for (const [key, entry] of value) {
70821
+ if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry))))
70822
+ entries.push([pair(key), pair(entry)]);
70823
+ }
70824
+ return index;
70825
+ }
70826
+ case SET: {
70827
+ const entries = [];
70828
+ const index = as([TYPE, entries], value);
70829
+ for (const entry of value) {
70830
+ if (strict || !shouldSkip(typeOf(entry)))
70831
+ entries.push(pair(entry));
70832
+ }
70833
+ return index;
70834
+ }
70835
+ }
70836
+ const { message } = value;
70837
+ return as([TYPE, { name: type, message }], value);
70838
+ };
70839
+ return pair;
70840
+ };
70841
+ var serialize = (value, { json, lossy } = {}) => {
70842
+ const _ = [];
70843
+ return serializer(!(json || lossy), !!json, /* @__PURE__ */ new Map(), _)(value), _;
70844
+ };
70845
+
70846
+ // ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/index.js
70847
+ 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));
70848
+
70651
70849
  // src/codegen/transforms/fragmentVariables.ts
70652
70850
  var graphql5 = __toESM(require_graphql2(), 1);
70653
70851
 
@@ -70795,100 +70993,106 @@ function inlineFragmentArgs({
70795
70993
  filepath,
70796
70994
  document
70797
70995
  ).reduce((acc, arg) => ({ ...acc, [arg.name]: arg }), {});
70798
- const result = graphql5.visit(document, {
70799
- FragmentSpread(node) {
70800
- if (!fragmentDefinitions[node.name.value]) {
70801
- throw new Error("Could not find definition for fragment" + node.name.value);
70802
- }
70803
- const { definition } = fragmentDefinitions[node.name.value];
70804
- let { args, hash } = collectWithArguments(config4, filepath, node, scope);
70805
- const newFragmentName = `${node.name.value}${hash}`;
70806
- config4.registerFragmentVariablesHash({
70807
- hash: newFragmentName,
70808
- fragment: node.name.value,
70809
- args
70810
- });
70811
- if (!visitedFragments.has(newFragmentName)) {
70812
- visitedFragments.add(newFragmentName);
70813
- const defaultArguments = collectDefaultArgumentValues(config4, filepath, definition);
70814
- if (args) {
70815
- for (const [field, value] of Object.entries(defaultArguments || {})) {
70816
- if (!args[field]) {
70817
- args[field] = value;
70818
- }
70819
- }
70820
- generatedFragments[newFragmentName] = inlineFragmentArgs({
70821
- config: config4,
70996
+ const result = esm_default(
70997
+ graphql5.visit(document, {
70998
+ FragmentSpread(node) {
70999
+ if (!fragmentDefinitions[node.name.value]) {
71000
+ throw new Error("Could not find definition for fragment" + node.name.value);
71001
+ }
71002
+ const { definition } = fragmentDefinitions[node.name.value];
71003
+ let { args, hash } = collectWithArguments(config4, filepath, node, scope);
71004
+ const newFragmentName = `${node.name.value}${hash}`;
71005
+ config4.registerFragmentVariablesHash({
71006
+ hash: newFragmentName,
71007
+ fragment: node.name.value,
71008
+ args
71009
+ });
71010
+ if (!visitedFragments.has(newFragmentName)) {
71011
+ visitedFragments.add(newFragmentName);
71012
+ const defaultArguments = collectDefaultArgumentValues(
71013
+ config4,
70822
71014
  filepath,
70823
- fragmentDefinitions,
70824
- document: fragmentDefinitions[node.name.value].definition,
70825
- generatedFragments,
70826
- visitedFragments,
70827
- scope: args,
70828
- newName: newFragmentName
70829
- });
70830
- } else {
70831
- const doc = fragmentDefinitions[node.name.value].document;
70832
- const definitionIndex = doc.document.definitions.findIndex(
70833
- (definition2) => definition2.kind === "FragmentDefinition" && definition2.name.value === node.name.value
71015
+ definition
70834
71016
  );
70835
- const localDefinitions = [...doc.document.definitions];
70836
- localDefinitions.splice(definitionIndex, 1);
70837
- localDefinitions.push(
70838
- inlineFragmentArgs({
71017
+ if (args) {
71018
+ for (const [field, value] of Object.entries(defaultArguments || {})) {
71019
+ if (!args[field]) {
71020
+ args[field] = value;
71021
+ }
71022
+ }
71023
+ generatedFragments[newFragmentName] = inlineFragmentArgs({
70839
71024
  config: config4,
70840
71025
  filepath,
70841
71026
  fragmentDefinitions,
70842
71027
  document: fragmentDefinitions[node.name.value].definition,
70843
71028
  generatedFragments,
70844
71029
  visitedFragments,
70845
- scope: defaultArguments,
70846
- newName: ""
70847
- })
70848
- );
70849
- doc.document = {
70850
- ...doc.document,
70851
- definitions: localDefinitions
70852
- };
71030
+ scope: args,
71031
+ newName: newFragmentName
71032
+ });
71033
+ } else {
71034
+ const doc = fragmentDefinitions[node.name.value].document;
71035
+ const definitionIndex = doc.document.definitions.findIndex(
71036
+ (definition2) => definition2.kind === "FragmentDefinition" && definition2.name.value === node.name.value
71037
+ );
71038
+ const localDefinitions = [...doc.document.definitions];
71039
+ localDefinitions.splice(definitionIndex, 1);
71040
+ localDefinitions.push(
71041
+ inlineFragmentArgs({
71042
+ config: config4,
71043
+ filepath,
71044
+ fragmentDefinitions,
71045
+ document: fragmentDefinitions[node.name.value].definition,
71046
+ generatedFragments,
71047
+ visitedFragments,
71048
+ scope: defaultArguments,
71049
+ newName: ""
71050
+ })
71051
+ );
71052
+ doc.document = {
71053
+ ...doc.document,
71054
+ definitions: localDefinitions
71055
+ };
71056
+ }
71057
+ if (node.name.value !== newFragmentName) {
71058
+ return {
71059
+ ...node,
71060
+ name: {
71061
+ kind: "Name",
71062
+ value: newFragmentName
71063
+ }
71064
+ };
71065
+ }
71066
+ }
71067
+ },
71068
+ Argument(node) {
71069
+ const value = node.value;
71070
+ if (value.kind !== "Variable") {
71071
+ return;
70853
71072
  }
70854
- if (node.name.value !== newFragmentName) {
71073
+ if (!scope) {
71074
+ throw new HoudiniError({
71075
+ filepath,
71076
+ message: node.name.value + " is not defined in the current scope: " + JSON.stringify(scope)
71077
+ });
71078
+ }
71079
+ const newValue = scope[value.name.value];
71080
+ if (newValue) {
70855
71081
  return {
70856
71082
  ...node,
70857
- name: {
70858
- kind: "Name",
70859
- value: newFragmentName
70860
- }
71083
+ value: newValue
70861
71084
  };
70862
71085
  }
71086
+ if (definitionArgs[value.name.value] && definitionArgs[value.name.value].required) {
71087
+ throw new HoudiniError({
71088
+ filepath,
71089
+ message: "Missing value for required arg: " + value.name.value
71090
+ });
71091
+ }
71092
+ return null;
70863
71093
  }
70864
- },
70865
- Argument(node) {
70866
- const value = node.value;
70867
- if (value.kind !== "Variable") {
70868
- return;
70869
- }
70870
- if (!scope) {
70871
- throw new HoudiniError({
70872
- filepath,
70873
- message: node.name.value + " is not defined in the current scope: " + JSON.stringify(scope)
70874
- });
70875
- }
70876
- const newValue = scope[value.name.value];
70877
- if (newValue) {
70878
- return {
70879
- ...node,
70880
- value: newValue
70881
- };
70882
- }
70883
- if (definitionArgs[value.name.value] && definitionArgs[value.name.value].required) {
70884
- throw new HoudiniError({
70885
- filepath,
70886
- message: "Missing value for required arg: " + value.name.value
70887
- });
70888
- }
70889
- return null;
70890
- }
70891
- });
71094
+ })
71095
+ );
70892
71096
  if (newName) {
70893
71097
  result.name = {
70894
71098
  kind: graphql5.Kind.NAME,
@@ -71610,7 +71814,7 @@ async function paginate(config4, documents) {
71610
71814
  ]
71611
71815
  }
71612
71816
  ];
71613
- const keys = config4.keyFieldsForType(!nodeQuery ? config4.schema.getQueryType()?.name || "" : fragment2).flatMap((key) => {
71817
+ const keys2 = config4.keyFieldsForType(!nodeQuery ? config4.schema.getQueryType()?.name || "" : fragment2).flatMap((key) => {
71614
71818
  if (fragment2 === config4.schema.getQueryType()?.name) {
71615
71819
  return [];
71616
71820
  }
@@ -71660,7 +71864,7 @@ async function paginate(config4, documents) {
71660
71864
  }
71661
71865
  })
71662
71866
  ).concat(
71663
- !nodeQuery ? [] : keys.map(
71867
+ !nodeQuery ? [] : keys2.map(
71664
71868
  (key) => ({
71665
71869
  kind: graphql10.Kind.VARIABLE_DEFINITION,
71666
71870
  type: key.type,
@@ -71683,7 +71887,7 @@ async function paginate(config4, documents) {
71683
71887
  kind: graphql10.Kind.NAME,
71684
71888
  value: typeConfig?.resolve?.queryField || "node"
71685
71889
  },
71686
- ["arguments"]: keys.map((key) => ({
71890
+ ["arguments"]: keys2.map((key) => ({
71687
71891
  kind: graphql10.Kind.ARGUMENT,
71688
71892
  name: {
71689
71893
  kind: graphql10.Kind.NAME,
@@ -72377,12 +72581,24 @@ function prepareSelection({
72377
72581
  }
72378
72582
  const typeName = fieldType.toString();
72379
72583
  const pathSoFar = path2.concat(attributeName);
72380
- const keys = config4.keyFieldsForType(rootType);
72584
+ const keys2 = config4.keyFieldsForType(rootType);
72381
72585
  let fieldObj = {
72382
72586
  type: typeName,
72383
72587
  keyRaw: fieldKey(config4, field)
72384
72588
  };
72385
- if (keys.includes(field.name.value)) {
72589
+ if (field.directives && field.directives.length > 0) {
72590
+ fieldObj.directives = field.directives?.map((directive) => ({
72591
+ name: directive.name.value,
72592
+ arguments: (directive.arguments ?? []).reduce(
72593
+ (acc, arg) => ({
72594
+ ...acc,
72595
+ [arg.name.value]: config4.serializeValueMap({ field: arg.value })["field"]
72596
+ }),
72597
+ {}
72598
+ )
72599
+ }));
72600
+ }
72601
+ if (keys2.includes(field.name.value)) {
72386
72602
  fieldObj.visible = true;
72387
72603
  }
72388
72604
  if (nullable) {
@@ -72607,12 +72823,7 @@ function artifactGenerator(stats) {
72607
72823
  writeIndexFile(config4, docs)
72608
72824
  ].concat(
72609
72825
  docs.map(async (doc) => {
72610
- const {
72611
- document,
72612
- name,
72613
- generateArtifact,
72614
- originalParsed
72615
- } = doc;
72826
+ const { document, name, generateArtifact, originalParsed, originalString } = doc;
72616
72827
  if (!generateArtifact) {
72617
72828
  return;
72618
72829
  }
@@ -73027,12 +73238,12 @@ ${exportStatement("config")}
73027
73238
  },
73028
73239
  [path_exports.join(config4.runtimeSource, "client", "plugins", "injectedPlugins.js")]: (content) => injectPlugins({ config: config4, content, importStatement, exportStatement })
73029
73240
  }),
73030
- ...config4.plugins.filter((plugin2) => plugin2.includeRuntime).map((plugin2) => generatePluginRuntime(config4, docs, plugin2)),
73241
+ ...config4.plugins.filter((plugin2) => plugin2.includeRuntime).map((plugin2) => generatePluginRuntime(config4, plugin2)),
73031
73242
  generatePluginIndex({ config: config4, exportStatement: exportStar })
73032
73243
  ]);
73033
73244
  await generateGraphqlReturnTypes(config4, docs);
73034
73245
  }
73035
- async function generatePluginRuntime(config4, docs, plugin2) {
73246
+ async function generatePluginRuntime(config4, plugin2) {
73036
73247
  if (houdini_mode.is_testing || !plugin2.includeRuntime) {
73037
73248
  return;
73038
73249
  }
@@ -73049,16 +73260,12 @@ async function generatePluginRuntime(config4, docs, plugin2) {
73049
73260
  });
73050
73261
  }
73051
73262
  const pluginDir = config4.pluginRuntimeDirectory(plugin2.name);
73052
- let transformMap = plugin2.transformRuntime ?? {};
73053
- if (transformMap && typeof transformMap === "function") {
73054
- transformMap = transformMap(docs);
73055
- }
73056
73263
  await fs_exports.mkdirp(pluginDir);
73057
73264
  await fs_exports.recursiveCopy(
73058
73265
  runtime_path,
73059
73266
  pluginDir,
73060
73267
  Object.fromEntries(
73061
- Object.entries(transformMap).map(([key, value]) => [
73268
+ Object.entries(plugin2.transformRuntime ?? {}).map(([key, value]) => [
73062
73269
  path_exports.join(runtime_path, key),
73063
73270
  (content) => value({ config: config4, content })
73064
73271
  ])
@@ -73498,8 +73705,7 @@ async function generateDocumentTypes(config4, docs) {
73498
73705
  originalParsed: originalDocument,
73499
73706
  name,
73500
73707
  filename,
73501
- generateArtifact,
73502
- artifact
73708
+ generateArtifact
73503
73709
  }) => {
73504
73710
  if (!generateArtifact) {
73505
73711
  return;
@@ -73538,14 +73744,6 @@ async function generateDocumentTypes(config4, docs) {
73538
73744
  missingScalars
73539
73745
  );
73540
73746
  }
73541
- program.body.push(
73542
- AST11.exportNamedDeclaration(
73543
- AST11.tsTypeAliasDeclaration(
73544
- AST11.identifier(`${name}$artifact`),
73545
- convertToTs(serializeValue(artifact))
73546
- )
73547
- )
73548
- );
73549
73747
  await fs_exports.writeFile(typeDefPath, recast11.print(program).code);
73550
73748
  typePaths.push(typeDefPath);
73551
73749
  }
@@ -73572,17 +73770,18 @@ export * from "${module2}"
73572
73770
  `;
73573
73771
  let indexContent = recast11.print(typeIndex).code;
73574
73772
  for (const plugin2 of config4.plugins) {
73575
- if (plugin2.indexFile) {
73576
- indexContent = plugin2.indexFile({
73577
- config: config4,
73578
- content: indexContent,
73579
- exportDefaultAs,
73580
- exportStarFrom: exportStarFrom2,
73581
- pluginRoot: config4.pluginDirectory(plugin2.name),
73582
- typedef: true,
73583
- documents: docs
73584
- });
73773
+ if (!plugin2.indexFile) {
73774
+ continue;
73585
73775
  }
73776
+ indexContent = plugin2.indexFile({
73777
+ config: config4,
73778
+ content: indexContent,
73779
+ exportDefaultAs,
73780
+ exportStarFrom: exportStarFrom2,
73781
+ pluginRoot: config4.pluginDirectory(plugin2.name),
73782
+ typedef: true,
73783
+ documents: docs
73784
+ });
73586
73785
  if (plugin2.includeRuntime) {
73587
73786
  indexContent += exportStarFrom2({
73588
73787
  module: "./" + path_exports.relative(config4.rootDir, config4.pluginRuntimeDirectory(plugin2.name))
@@ -73614,42 +73813,6 @@ ${[...missingScalars].map(
73614
73813
  For more information, please visit this link: ${siteURL}/api/config#custom-scalars`);
73615
73814
  }
73616
73815
  }
73617
- function convertToTs(source) {
73618
- if (source.type === "ObjectExpression") {
73619
- return AST11.tsTypeLiteral(
73620
- source.properties.reduce(
73621
- (props, prop) => {
73622
- if (prop.type !== "ObjectProperty" || prop.key.type !== "StringLiteral" && prop.key.type === "Identifier") {
73623
- return props;
73624
- }
73625
- return [
73626
- ...props,
73627
- AST11.tsPropertySignature(
73628
- prop.key,
73629
- AST11.tsTypeAnnotation(convertToTs(prop.value))
73630
- )
73631
- ];
73632
- },
73633
- []
73634
- )
73635
- );
73636
- }
73637
- if (source.type === "ArrayExpression") {
73638
- return AST11.tsTupleType(
73639
- source.elements.map((element) => convertToTs(element))
73640
- );
73641
- }
73642
- if (source.type === "Literal" && typeof source.value === "boolean") {
73643
- return AST11.tsLiteralType(AST11.booleanLiteral(source.value));
73644
- }
73645
- if (source.type === "Literal" && typeof source.value === "number") {
73646
- return AST11.tsLiteralType(AST11.numericLiteral(source.value));
73647
- }
73648
- if (source.type === "Literal" && typeof source.value === "string") {
73649
- return AST11.tsLiteralType(AST11.stringLiteral(source.value));
73650
- }
73651
- return AST11.tsLiteralType(source);
73652
- }
73653
73816
  async function generateOperationTypeDefs(config4, filepath, body, definition, selections, visitedTypes, missingScalars) {
73654
73817
  let parentType = null;
73655
73818
  if (definition.operation === "query") {
@@ -73921,10 +74084,10 @@ function typeDefinitions(config4, body, docs, returnType) {
73921
74084
  typeName = "__ROOT__";
73922
74085
  }
73923
74086
  let idFields = AST12.tsNeverKeyword();
73924
- const keys = keyFieldsForType(config4.configFile, type.name);
73925
- if (graphql19.isObjectType(type) && keys.length > 0 && keys.every((key) => type.getFields()[key])) {
74087
+ const keys2 = keyFieldsForType(config4.configFile, type.name);
74088
+ if (graphql19.isObjectType(type) && keys2.length > 0 && keys2.every((key) => type.getFields()[key])) {
73926
74089
  idFields = AST12.tsTypeLiteral(
73927
- keys.map((key) => {
74090
+ keys2.map((key) => {
73928
74091
  const fieldType = type.getFields()[key];
73929
74092
  const unwrapped = unwrapType(config4, fieldType.type);
73930
74093
  return AST12.tsPropertySignature(
@@ -74357,6 +74520,9 @@ async function writeIndexFile2(config4, docs) {
74357
74520
  module: relative2(config4.pluginRuntimeDirectory(plugin2.name))
74358
74521
  });
74359
74522
  }
74523
+ if (!plugin2.indexFile) {
74524
+ continue;
74525
+ }
74360
74526
  }
74361
74527
  await fs_exports.writeFile(path_exports.join(config4.rootDir, "index.js"), body);
74362
74528
  }
@@ -75622,10 +75788,7 @@ async function collectDocuments(config4) {
75622
75788
  }
75623
75789
  }
75624
75790
  } catch (err) {
75625
- throw {
75626
- message: err.message,
75627
- filepath
75628
- };
75791
+ throw new HoudiniError({ ...err, filepath });
75629
75792
  }
75630
75793
  })
75631
75794
  );