houdini 1.1.3 → 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.
@@ -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
  });
@@ -6618,7 +6618,7 @@ var require_visitor = __commonJS({
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
  }
@@ -51064,10 +51064,10 @@ var require_util2 = __commonJS({
51064
51064
  var result = {};
51065
51065
  var argc = args.length;
51066
51066
  for (var i2 = 0; i2 < argc; ++i2) {
51067
- var keys = Object.keys(args[i2]);
51068
- var keyCount = keys.length;
51067
+ var keys2 = Object.keys(args[i2]);
51068
+ var keyCount = keys2.length;
51069
51069
  for (var j = 0; j < keyCount; ++j) {
51070
- result[keys[j]] = true;
51070
+ result[keys2[j]] = true;
51071
51071
  }
51072
51072
  }
51073
51073
  return result;
@@ -58727,10 +58727,10 @@ var require_parser2 = __commonJS({
58727
58727
  loc.indent = newIndent;
58728
58728
  this.findTokenRange(loc);
58729
58729
  }
58730
- var keys = Object.keys(node);
58731
- var keyCount = keys.length;
58730
+ var keys2 = Object.keys(node);
58731
+ var keyCount = keys2.length;
58732
58732
  for (var i2 = 0; i2 < keyCount; ++i2) {
58733
- var key = keys[i2];
58733
+ var key = keys2[i2];
58734
58734
  if (key === "loc") {
58735
58735
  copy[key] = node[key];
58736
58736
  } else if (key === "tokens" && node.type === "File") {
@@ -59489,13 +59489,13 @@ var require_patcher = __commonJS({
59489
59489
  if (newPath.needsParens() && !oldPath.hasParens()) {
59490
59490
  return false;
59491
59491
  }
59492
- var keys = (0, util_1.getUnionOfKeys)(oldNode, newNode);
59492
+ var keys2 = (0, util_1.getUnionOfKeys)(oldNode, newNode);
59493
59493
  if (oldNode.type === "File" || newNode.type === "File") {
59494
- delete keys.tokens;
59494
+ delete keys2.tokens;
59495
59495
  }
59496
- delete keys.loc;
59496
+ delete keys2.loc;
59497
59497
  var originalReprintCount = reprints.length;
59498
- for (var k in keys) {
59498
+ for (var k in keys2) {
59499
59499
  if (k.charAt(0) === "_") {
59500
59500
  continue;
59501
59501
  }
@@ -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) {
@@ -69243,8 +69266,8 @@ var Config = class {
69243
69266
  if (!apiURL) {
69244
69267
  return "";
69245
69268
  }
69246
- const env = await this.getEnv();
69247
- return this.processEnvValues(env, apiURL);
69269
+ const env2 = await this.getEnv();
69270
+ return this.processEnvValues(env2, apiURL);
69248
69271
  }
69249
69272
  get include() {
69250
69273
  if (this.configFile.include) {
@@ -69259,35 +69282,35 @@ var Config = class {
69259
69282
  return this.configFile.plugins?.[name] ?? {};
69260
69283
  }
69261
69284
  async getEnv() {
69262
- let env = process.env;
69285
+ let env2 = process.env;
69263
69286
  for (const plugin2 of this.plugins) {
69264
69287
  if (plugin2.env) {
69265
- env = {
69266
- ...await plugin2.env({ config: this, env })
69288
+ env2 = {
69289
+ ...await plugin2.env({ config: this, env: env2 })
69267
69290
  };
69268
69291
  }
69269
69292
  }
69270
- return env;
69293
+ return env2;
69271
69294
  }
69272
- processEnvValues(env, value) {
69295
+ processEnvValues(env2, value) {
69273
69296
  let headerValue;
69274
69297
  if (typeof value === "function") {
69275
- headerValue = value(env);
69298
+ headerValue = value(env2);
69276
69299
  } else if (value.startsWith("env:")) {
69277
- headerValue = env[value.slice("env:".length)];
69300
+ headerValue = env2[value.slice("env:".length)];
69278
69301
  } else {
69279
69302
  headerValue = value;
69280
69303
  }
69281
69304
  return headerValue;
69282
69305
  }
69283
69306
  async pullHeaders() {
69284
- const env = await this.getEnv();
69307
+ const env2 = await this.getEnv();
69285
69308
  if (typeof this.schemaPollHeaders === "function") {
69286
- return this.schemaPollHeaders(env);
69309
+ return this.schemaPollHeaders(env2);
69287
69310
  }
69288
69311
  const headers = Object.fromEntries(
69289
69312
  Object.entries(this.schemaPollHeaders || {}).map(([key, value]) => {
69290
- const headerValue = this.processEnvValues(env, value);
69313
+ const headerValue = this.processEnvValues(env2, value);
69291
69314
  if (!headerValue) {
69292
69315
  return [];
69293
69316
  }
@@ -69575,7 +69598,7 @@ var Config = class {
69575
69598
  fragment: fragment2
69576
69599
  }) {
69577
69600
  this.#fragmentVariableMaps[hash] = {
69578
- args: this.#serializeValueMap(args),
69601
+ args: this.serializeValueMap(args),
69579
69602
  fragment: fragment2
69580
69603
  };
69581
69604
  }
@@ -69586,7 +69609,7 @@ var Config = class {
69586
69609
  hash
69587
69610
  };
69588
69611
  }
69589
- #serializeValueMap(map) {
69612
+ serializeValueMap(map) {
69590
69613
  if (!map) {
69591
69614
  return null;
69592
69615
  }
@@ -69601,7 +69624,7 @@ var Config = class {
69601
69624
  }
69602
69625
  if ("values" in input) {
69603
69626
  result.values = input.values.map(
69604
- (value) => this.#serializeValueMap({ foo: value }).foo
69627
+ (value) => this.serializeValueMap({ foo: value }).foo
69605
69628
  );
69606
69629
  }
69607
69630
  if ("name" in input) {
@@ -69610,7 +69633,7 @@ var Config = class {
69610
69633
  if ("fields" in input) {
69611
69634
  result.fields = input.fields.map((field) => ({
69612
69635
  name: field.name,
69613
- value: this.#serializeValueMap({ foo: field.value }).foo
69636
+ value: this.serializeValueMap({ foo: field.value }).foo
69614
69637
  }));
69615
69638
  }
69616
69639
  }
@@ -70618,6 +70641,205 @@ function murmurHash(str) {
70618
70641
  return s2;
70619
70642
  }
70620
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
+
70621
70843
  // src/codegen/transforms/fragmentVariables.ts
70622
70844
  var graphql5 = __toESM(require_graphql2(), 1);
70623
70845
 
@@ -70765,100 +70987,106 @@ function inlineFragmentArgs({
70765
70987
  filepath,
70766
70988
  document
70767
70989
  ).reduce((acc, arg) => ({ ...acc, [arg.name]: arg }), {});
70768
- const result = graphql5.visit(document, {
70769
- FragmentSpread(node) {
70770
- if (!fragmentDefinitions[node.name.value]) {
70771
- throw new Error("Could not find definition for fragment" + node.name.value);
70772
- }
70773
- const { definition } = fragmentDefinitions[node.name.value];
70774
- let { args, hash } = collectWithArguments(config4, filepath, node, scope);
70775
- const newFragmentName = `${node.name.value}${hash}`;
70776
- config4.registerFragmentVariablesHash({
70777
- hash: newFragmentName,
70778
- fragment: node.name.value,
70779
- args
70780
- });
70781
- if (!visitedFragments.has(newFragmentName)) {
70782
- visitedFragments.add(newFragmentName);
70783
- const defaultArguments = collectDefaultArgumentValues(config4, filepath, definition);
70784
- if (args) {
70785
- for (const [field, value] of Object.entries(defaultArguments || {})) {
70786
- if (!args[field]) {
70787
- args[field] = value;
70788
- }
70789
- }
70790
- generatedFragments[newFragmentName] = inlineFragmentArgs({
70791
- 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,
70792
71008
  filepath,
70793
- fragmentDefinitions,
70794
- document: fragmentDefinitions[node.name.value].definition,
70795
- generatedFragments,
70796
- visitedFragments,
70797
- scope: args,
70798
- newName: newFragmentName
70799
- });
70800
- } else {
70801
- const doc = fragmentDefinitions[node.name.value].document;
70802
- const definitionIndex = doc.document.definitions.findIndex(
70803
- (definition2) => definition2.kind === "FragmentDefinition" && definition2.name.value === node.name.value
71009
+ definition
70804
71010
  );
70805
- const localDefinitions = [...doc.document.definitions];
70806
- localDefinitions.splice(definitionIndex, 1);
70807
- localDefinitions.push(
70808
- 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({
70809
71018
  config: config4,
70810
71019
  filepath,
70811
71020
  fragmentDefinitions,
70812
71021
  document: fragmentDefinitions[node.name.value].definition,
70813
71022
  generatedFragments,
70814
71023
  visitedFragments,
70815
- scope: defaultArguments,
70816
- newName: ""
70817
- })
70818
- );
70819
- doc.document = {
70820
- ...doc.document,
70821
- definitions: localDefinitions
70822
- };
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
+ }
70823
71060
  }
70824
- if (node.name.value !== newFragmentName) {
71061
+ },
71062
+ Argument(node) {
71063
+ const value = node.value;
71064
+ if (value.kind !== "Variable") {
71065
+ return;
71066
+ }
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) {
70825
71075
  return {
70826
71076
  ...node,
70827
- name: {
70828
- kind: "Name",
70829
- value: newFragmentName
70830
- }
71077
+ value: newValue
70831
71078
  };
70832
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;
70833
71087
  }
70834
- },
70835
- Argument(node) {
70836
- const value = node.value;
70837
- if (value.kind !== "Variable") {
70838
- return;
70839
- }
70840
- if (!scope) {
70841
- throw new HoudiniError({
70842
- filepath,
70843
- message: node.name.value + " is not defined in the current scope: " + JSON.stringify(scope)
70844
- });
70845
- }
70846
- const newValue = scope[value.name.value];
70847
- if (newValue) {
70848
- return {
70849
- ...node,
70850
- value: newValue
70851
- };
70852
- }
70853
- if (definitionArgs[value.name.value] && definitionArgs[value.name.value].required) {
70854
- throw new HoudiniError({
70855
- filepath,
70856
- message: "Missing value for required arg: " + value.name.value
70857
- });
70858
- }
70859
- return null;
70860
- }
70861
- });
71088
+ })
71089
+ );
70862
71090
  if (newName) {
70863
71091
  result.name = {
70864
71092
  kind: graphql5.Kind.NAME,
@@ -71580,7 +71808,7 @@ async function paginate(config4, documents) {
71580
71808
  ]
71581
71809
  }
71582
71810
  ];
71583
- 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) => {
71584
71812
  if (fragment2 === config4.schema.getQueryType()?.name) {
71585
71813
  return [];
71586
71814
  }
@@ -71630,7 +71858,7 @@ async function paginate(config4, documents) {
71630
71858
  }
71631
71859
  })
71632
71860
  ).concat(
71633
- !nodeQuery ? [] : keys.map(
71861
+ !nodeQuery ? [] : keys2.map(
71634
71862
  (key) => ({
71635
71863
  kind: graphql10.Kind.VARIABLE_DEFINITION,
71636
71864
  type: key.type,
@@ -71653,7 +71881,7 @@ async function paginate(config4, documents) {
71653
71881
  kind: graphql10.Kind.NAME,
71654
71882
  value: typeConfig?.resolve?.queryField || "node"
71655
71883
  },
71656
- ["arguments"]: keys.map((key) => ({
71884
+ ["arguments"]: keys2.map((key) => ({
71657
71885
  kind: graphql10.Kind.ARGUMENT,
71658
71886
  name: {
71659
71887
  kind: graphql10.Kind.NAME,
@@ -72347,12 +72575,24 @@ function prepareSelection({
72347
72575
  }
72348
72576
  const typeName = fieldType.toString();
72349
72577
  const pathSoFar = path2.concat(attributeName);
72350
- const keys = config4.keyFieldsForType(rootType);
72578
+ const keys2 = config4.keyFieldsForType(rootType);
72351
72579
  let fieldObj = {
72352
72580
  type: typeName,
72353
72581
  keyRaw: fieldKey(config4, field)
72354
72582
  };
72355
- 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)) {
72356
72596
  fieldObj.visible = true;
72357
72597
  }
72358
72598
  if (nullable) {
@@ -72577,12 +72817,7 @@ function artifactGenerator(stats) {
72577
72817
  writeIndexFile(config4, docs)
72578
72818
  ].concat(
72579
72819
  docs.map(async (doc) => {
72580
- const {
72581
- document,
72582
- name,
72583
- generateArtifact,
72584
- originalParsed
72585
- } = doc;
72820
+ const { document, name, generateArtifact, originalParsed, originalString } = doc;
72586
72821
  if (!generateArtifact) {
72587
72822
  return;
72588
72823
  }
@@ -73843,10 +74078,10 @@ function typeDefinitions(config4, body, docs, returnType) {
73843
74078
  typeName = "__ROOT__";
73844
74079
  }
73845
74080
  let idFields = AST12.tsNeverKeyword();
73846
- const keys = keyFieldsForType(config4.configFile, type.name);
73847
- 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])) {
73848
74083
  idFields = AST12.tsTypeLiteral(
73849
- keys.map((key) => {
74084
+ keys2.map((key) => {
73850
74085
  const fieldType = type.getFields()[key];
73851
74086
  const unwrapped = unwrapType(config4, fieldType.type);
73852
74087
  return AST12.tsPropertySignature(