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.
- package/build/cmd-cjs/index.js +451 -216
- package/build/cmd-esm/index.js +451 -216
- package/build/codegen/transforms/fragmentVariables.d.ts +0 -11
- package/build/codegen-cjs/index.js +421 -186
- package/build/codegen-esm/index.js +421 -186
- package/build/lib/config.d.ts +1 -0
- package/build/lib-cjs/index.js +43 -19
- package/build/lib-esm/index.js +43 -19
- package/build/runtime/cache/cache.d.ts +4 -2
- package/build/runtime/lib/types.d.ts +4 -0
- package/build/runtime-cjs/cache/cache.d.ts +4 -2
- package/build/runtime-cjs/cache/cache.js +37 -14
- package/build/runtime-cjs/client/plugins/cache.js +2 -1
- package/build/runtime-cjs/lib/types.d.ts +4 -0
- package/build/runtime-esm/cache/cache.d.ts +4 -2
- package/build/runtime-esm/cache/cache.js +37 -14
- package/build/runtime-esm/client/plugins/cache.js +2 -1
- package/build/runtime-esm/lib/types.d.ts +4 -0
- package/build/test-cjs/index.js +443 -204
- package/build/test-esm/index.js +443 -204
- package/build/vite-cjs/index.js +461 -226
- package/build/vite-esm/index.js +461 -226
- package/package.json +3 -1
package/build/vite-cjs/index.js
CHANGED
|
@@ -1123,8 +1123,8 @@ ${originalIndentation}`;
|
|
|
1123
1123
|
stack.pop();
|
|
1124
1124
|
return `[${res}]`;
|
|
1125
1125
|
}
|
|
1126
|
-
let
|
|
1127
|
-
const keyLength =
|
|
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
|
-
|
|
1145
|
+
keys2 = keys2.slice(value.length);
|
|
1146
1146
|
maximumPropertiesToStringify -= value.length;
|
|
1147
1147
|
separator = join3;
|
|
1148
1148
|
}
|
|
1149
1149
|
if (deterministic) {
|
|
1150
|
-
|
|
1150
|
+
keys2 = insertSort(keys2);
|
|
1151
1151
|
}
|
|
1152
1152
|
stack.push(value);
|
|
1153
1153
|
for (let i2 = 0; i2 < maximumPropertiesToStringify; i2++) {
|
|
1154
|
-
const key2 =
|
|
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
|
|
1334
|
-
const keyLength =
|
|
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
|
-
|
|
1349
|
+
keys2 = keys2.slice(value.length);
|
|
1350
1350
|
maximumPropertiesToStringify -= value.length;
|
|
1351
1351
|
separator = join3;
|
|
1352
1352
|
}
|
|
1353
1353
|
if (deterministic) {
|
|
1354
|
-
|
|
1354
|
+
keys2 = insertSort(keys2);
|
|
1355
1355
|
}
|
|
1356
1356
|
stack.push(value);
|
|
1357
1357
|
for (let i2 = 0; i2 < maximumPropertiesToStringify; i2++) {
|
|
1358
|
-
const key2 =
|
|
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
|
|
1438
|
-
const keyLength =
|
|
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
|
-
|
|
1449
|
+
keys2 = keys2.slice(value.length);
|
|
1450
1450
|
maximumPropertiesToStringify -= value.length;
|
|
1451
1451
|
separator = ",";
|
|
1452
1452
|
}
|
|
1453
1453
|
if (deterministic) {
|
|
1454
|
-
|
|
1454
|
+
keys2 = insertSort(keys2);
|
|
1455
1455
|
}
|
|
1456
1456
|
stack.push(value);
|
|
1457
1457
|
for (let i2 = 0; i2 < maximumPropertiesToStringify; i2++) {
|
|
1458
|
-
const key2 =
|
|
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
|
|
4110
|
+
let keys2 = micromatch2(Object.keys(obj), patterns, options);
|
|
4111
4111
|
let res = {};
|
|
4112
|
-
for (let key of
|
|
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
|
|
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
|
-
|
|
4383
|
+
keys2.push.apply(keys2, symbols);
|
|
4384
4384
|
}
|
|
4385
|
-
return
|
|
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
|
|
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
|
|
4945
|
-
if (
|
|
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 =
|
|
4951
|
+
var properties = keys2.map(function(key) {
|
|
4952
4952
|
var value = formatValue2(object[key], seenValues);
|
|
4953
4953
|
return key + ": " + value;
|
|
4954
4954
|
});
|
|
@@ -6613,7 +6613,7 @@ var require_visitor = __commonJS({
|
|
|
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
|
|
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 ===
|
|
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
|
-
|
|
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 :
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
11420
|
+
keys2.push.apply(keys2, symbols);
|
|
11421
11421
|
}
|
|
11422
|
-
return
|
|
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
|
|
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
|
-
|
|
11676
|
+
keys2.push.apply(keys2, symbols);
|
|
11677
11677
|
}
|
|
11678
|
-
return
|
|
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
|
|
12937
|
-
var valuesAndPromises =
|
|
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[
|
|
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
|
|
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
|
-
|
|
15401
|
+
keys2.push.apply(keys2, symbols);
|
|
15402
15402
|
}
|
|
15403
|
-
return
|
|
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
|
|
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
|
-
|
|
15503
|
+
keys2.push.apply(keys2, symbols);
|
|
15504
15504
|
}
|
|
15505
|
-
return
|
|
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
|
|
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
|
-
|
|
15844
|
+
keys2.push.apply(keys2, symbols);
|
|
15845
15845
|
}
|
|
15846
|
-
return
|
|
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
|
|
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
|
-
|
|
16444
|
+
keys2.push.apply(keys2, symbols);
|
|
16445
16445
|
}
|
|
16446
|
-
return
|
|
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
|
|
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
|
-
|
|
16994
|
+
keys2.push.apply(keys2, symbols);
|
|
16995
16995
|
}
|
|
16996
|
-
return
|
|
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
|
|
19231
|
-
for (var index = 0, length =
|
|
19232
|
-
var key =
|
|
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
|
|
19281
|
-
for (var index = 0, length =
|
|
19282
|
-
var key =
|
|
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
|
|
22500
|
-
var i2 =
|
|
22499
|
+
var keys2 = Object.keys(add);
|
|
22500
|
+
var i2 = keys2.length;
|
|
22501
22501
|
while (i2--) {
|
|
22502
|
-
origin[
|
|
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 = (
|
|
30917
|
+
var reflect = (keys2, last = keys2.length - 1) => ({
|
|
30918
30918
|
get() {
|
|
30919
|
-
return
|
|
30919
|
+
return keys2.reduce((object, key) => object[key], this);
|
|
30920
30920
|
},
|
|
30921
30921
|
set(value) {
|
|
30922
|
-
|
|
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
|
|
32856
|
-
for (let i2 = 0, length =
|
|
32857
|
-
const key =
|
|
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
|
|
34763
|
-
for (let i2 = 0, length =
|
|
34764
|
-
const key =
|
|
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
|
}
|
|
@@ -51059,10 +51059,10 @@ var require_util2 = __commonJS({
|
|
|
51059
51059
|
var result = {};
|
|
51060
51060
|
var argc = args.length;
|
|
51061
51061
|
for (var i2 = 0; i2 < argc; ++i2) {
|
|
51062
|
-
var
|
|
51063
|
-
var keyCount =
|
|
51062
|
+
var keys2 = Object.keys(args[i2]);
|
|
51063
|
+
var keyCount = keys2.length;
|
|
51064
51064
|
for (var j = 0; j < keyCount; ++j) {
|
|
51065
|
-
result[
|
|
51065
|
+
result[keys2[j]] = true;
|
|
51066
51066
|
}
|
|
51067
51067
|
}
|
|
51068
51068
|
return result;
|
|
@@ -58722,10 +58722,10 @@ var require_parser2 = __commonJS({
|
|
|
58722
58722
|
loc.indent = newIndent;
|
|
58723
58723
|
this.findTokenRange(loc);
|
|
58724
58724
|
}
|
|
58725
|
-
var
|
|
58726
|
-
var keyCount =
|
|
58725
|
+
var keys2 = Object.keys(node);
|
|
58726
|
+
var keyCount = keys2.length;
|
|
58727
58727
|
for (var i2 = 0; i2 < keyCount; ++i2) {
|
|
58728
|
-
var key =
|
|
58728
|
+
var key = keys2[i2];
|
|
58729
58729
|
if (key === "loc") {
|
|
58730
58730
|
copy[key] = node[key];
|
|
58731
58731
|
} else if (key === "tokens" && node.type === "File") {
|
|
@@ -59484,13 +59484,13 @@ var require_patcher = __commonJS({
|
|
|
59484
59484
|
if (newPath.needsParens() && !oldPath.hasParens()) {
|
|
59485
59485
|
return false;
|
|
59486
59486
|
}
|
|
59487
|
-
var
|
|
59487
|
+
var keys2 = (0, util_1.getUnionOfKeys)(oldNode, newNode);
|
|
59488
59488
|
if (oldNode.type === "File" || newNode.type === "File") {
|
|
59489
|
-
delete
|
|
59489
|
+
delete keys2.tokens;
|
|
59490
59490
|
}
|
|
59491
|
-
delete
|
|
59491
|
+
delete keys2.loc;
|
|
59492
59492
|
var originalReprintCount = reprints.length;
|
|
59493
|
-
for (var k in
|
|
59493
|
+
for (var k in keys2) {
|
|
59494
59494
|
if (k.charAt(0) === "_") {
|
|
59495
59495
|
continue;
|
|
59496
59496
|
}
|
|
@@ -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
|
|
62863
|
+
const keys2 = [entity];
|
|
62864
62864
|
if (field) {
|
|
62865
|
-
|
|
62865
|
+
keys2.push(field);
|
|
62866
62866
|
if (argument) {
|
|
62867
|
-
|
|
62867
|
+
keys2.push(argument);
|
|
62868
62868
|
}
|
|
62869
62869
|
}
|
|
62870
|
-
const path2 =
|
|
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
|
|
62889
|
+
const keys2 = [];
|
|
62890
62890
|
const parent = path2.reduce((prev, key2) => {
|
|
62891
62891
|
if (["fields", "arguments", "values"].includes(key2) && prev.name) {
|
|
62892
|
-
|
|
62892
|
+
keys2.push(prev.name.value);
|
|
62893
62893
|
}
|
|
62894
62894
|
return prev[key2];
|
|
62895
62895
|
}, ancestors[0]);
|
|
62896
|
-
const key = [...
|
|
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
|
|
65433
|
-
|
|
65434
|
-
return args &&
|
|
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
|
-
|
|
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
|
-
|
|
68719
|
+
fieldTarget[attributeName] = fnUnmarshal(value);
|
|
68702
68720
|
} else {
|
|
68703
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 (
|
|
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) {
|
|
@@ -69249,8 +69272,8 @@ var Config = class {
|
|
|
69249
69272
|
if (!apiURL) {
|
|
69250
69273
|
return "";
|
|
69251
69274
|
}
|
|
69252
|
-
const
|
|
69253
|
-
return this.processEnvValues(
|
|
69275
|
+
const env2 = await this.getEnv();
|
|
69276
|
+
return this.processEnvValues(env2, apiURL);
|
|
69254
69277
|
}
|
|
69255
69278
|
get include() {
|
|
69256
69279
|
if (this.configFile.include) {
|
|
@@ -69265,35 +69288,35 @@ var Config = class {
|
|
|
69265
69288
|
return this.configFile.plugins?.[name] ?? {};
|
|
69266
69289
|
}
|
|
69267
69290
|
async getEnv() {
|
|
69268
|
-
let
|
|
69291
|
+
let env2 = process.env;
|
|
69269
69292
|
for (const plugin2 of this.plugins) {
|
|
69270
69293
|
if (plugin2.env) {
|
|
69271
|
-
|
|
69272
|
-
...await plugin2.env({ config: this, env })
|
|
69294
|
+
env2 = {
|
|
69295
|
+
...await plugin2.env({ config: this, env: env2 })
|
|
69273
69296
|
};
|
|
69274
69297
|
}
|
|
69275
69298
|
}
|
|
69276
|
-
return
|
|
69299
|
+
return env2;
|
|
69277
69300
|
}
|
|
69278
|
-
processEnvValues(
|
|
69301
|
+
processEnvValues(env2, value) {
|
|
69279
69302
|
let headerValue;
|
|
69280
69303
|
if (typeof value === "function") {
|
|
69281
|
-
headerValue = value(
|
|
69304
|
+
headerValue = value(env2);
|
|
69282
69305
|
} else if (value.startsWith("env:")) {
|
|
69283
|
-
headerValue =
|
|
69306
|
+
headerValue = env2[value.slice("env:".length)];
|
|
69284
69307
|
} else {
|
|
69285
69308
|
headerValue = value;
|
|
69286
69309
|
}
|
|
69287
69310
|
return headerValue;
|
|
69288
69311
|
}
|
|
69289
69312
|
async pullHeaders() {
|
|
69290
|
-
const
|
|
69313
|
+
const env2 = await this.getEnv();
|
|
69291
69314
|
if (typeof this.schemaPollHeaders === "function") {
|
|
69292
|
-
return this.schemaPollHeaders(
|
|
69315
|
+
return this.schemaPollHeaders(env2);
|
|
69293
69316
|
}
|
|
69294
69317
|
const headers = Object.fromEntries(
|
|
69295
69318
|
Object.entries(this.schemaPollHeaders || {}).map(([key, value]) => {
|
|
69296
|
-
const headerValue = this.processEnvValues(
|
|
69319
|
+
const headerValue = this.processEnvValues(env2, value);
|
|
69297
69320
|
if (!headerValue) {
|
|
69298
69321
|
return [];
|
|
69299
69322
|
}
|
|
@@ -69581,7 +69604,7 @@ var Config = class {
|
|
|
69581
69604
|
fragment: fragment2
|
|
69582
69605
|
}) {
|
|
69583
69606
|
this.#fragmentVariableMaps[hash] = {
|
|
69584
|
-
args: this
|
|
69607
|
+
args: this.serializeValueMap(args),
|
|
69585
69608
|
fragment: fragment2
|
|
69586
69609
|
};
|
|
69587
69610
|
}
|
|
@@ -69592,7 +69615,7 @@ var Config = class {
|
|
|
69592
69615
|
hash
|
|
69593
69616
|
};
|
|
69594
69617
|
}
|
|
69595
|
-
|
|
69618
|
+
serializeValueMap(map) {
|
|
69596
69619
|
if (!map) {
|
|
69597
69620
|
return null;
|
|
69598
69621
|
}
|
|
@@ -69607,7 +69630,7 @@ var Config = class {
|
|
|
69607
69630
|
}
|
|
69608
69631
|
if ("values" in input) {
|
|
69609
69632
|
result.values = input.values.map(
|
|
69610
|
-
(value) => this
|
|
69633
|
+
(value) => this.serializeValueMap({ foo: value }).foo
|
|
69611
69634
|
);
|
|
69612
69635
|
}
|
|
69613
69636
|
if ("name" in input) {
|
|
@@ -69616,7 +69639,7 @@ var Config = class {
|
|
|
69616
69639
|
if ("fields" in input) {
|
|
69617
69640
|
result.fields = input.fields.map((field) => ({
|
|
69618
69641
|
name: field.name,
|
|
69619
|
-
value: this
|
|
69642
|
+
value: this.serializeValueMap({ foo: field.value }).foo
|
|
69620
69643
|
}));
|
|
69621
69644
|
}
|
|
69622
69645
|
}
|
|
@@ -70624,6 +70647,205 @@ function murmurHash(str) {
|
|
|
70624
70647
|
return s2;
|
|
70625
70648
|
}
|
|
70626
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
|
+
|
|
70627
70849
|
// src/codegen/transforms/fragmentVariables.ts
|
|
70628
70850
|
var graphql5 = __toESM(require_graphql2(), 1);
|
|
70629
70851
|
|
|
@@ -70771,100 +70993,106 @@ function inlineFragmentArgs({
|
|
|
70771
70993
|
filepath,
|
|
70772
70994
|
document
|
|
70773
70995
|
).reduce((acc, arg) => ({ ...acc, [arg.name]: arg }), {});
|
|
70774
|
-
const result =
|
|
70775
|
-
|
|
70776
|
-
|
|
70777
|
-
|
|
70778
|
-
|
|
70779
|
-
|
|
70780
|
-
|
|
70781
|
-
|
|
70782
|
-
|
|
70783
|
-
|
|
70784
|
-
|
|
70785
|
-
|
|
70786
|
-
|
|
70787
|
-
|
|
70788
|
-
visitedFragments.
|
|
70789
|
-
|
|
70790
|
-
|
|
70791
|
-
|
|
70792
|
-
if (!args[field]) {
|
|
70793
|
-
args[field] = value;
|
|
70794
|
-
}
|
|
70795
|
-
}
|
|
70796
|
-
generatedFragments[newFragmentName] = inlineFragmentArgs({
|
|
70797
|
-
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,
|
|
70798
71014
|
filepath,
|
|
70799
|
-
|
|
70800
|
-
document: fragmentDefinitions[node.name.value].definition,
|
|
70801
|
-
generatedFragments,
|
|
70802
|
-
visitedFragments,
|
|
70803
|
-
scope: args,
|
|
70804
|
-
newName: newFragmentName
|
|
70805
|
-
});
|
|
70806
|
-
} else {
|
|
70807
|
-
const doc = fragmentDefinitions[node.name.value].document;
|
|
70808
|
-
const definitionIndex = doc.document.definitions.findIndex(
|
|
70809
|
-
(definition2) => definition2.kind === "FragmentDefinition" && definition2.name.value === node.name.value
|
|
71015
|
+
definition
|
|
70810
71016
|
);
|
|
70811
|
-
|
|
70812
|
-
|
|
70813
|
-
|
|
70814
|
-
|
|
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({
|
|
70815
71024
|
config: config4,
|
|
70816
71025
|
filepath,
|
|
70817
71026
|
fragmentDefinitions,
|
|
70818
71027
|
document: fragmentDefinitions[node.name.value].definition,
|
|
70819
71028
|
generatedFragments,
|
|
70820
71029
|
visitedFragments,
|
|
70821
|
-
scope:
|
|
70822
|
-
newName:
|
|
70823
|
-
})
|
|
70824
|
-
|
|
70825
|
-
|
|
70826
|
-
|
|
70827
|
-
|
|
70828
|
-
|
|
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
|
+
}
|
|
70829
71066
|
}
|
|
70830
|
-
|
|
71067
|
+
},
|
|
71068
|
+
Argument(node) {
|
|
71069
|
+
const value = node.value;
|
|
71070
|
+
if (value.kind !== "Variable") {
|
|
71071
|
+
return;
|
|
71072
|
+
}
|
|
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) {
|
|
70831
71081
|
return {
|
|
70832
71082
|
...node,
|
|
70833
|
-
|
|
70834
|
-
kind: "Name",
|
|
70835
|
-
value: newFragmentName
|
|
70836
|
-
}
|
|
71083
|
+
value: newValue
|
|
70837
71084
|
};
|
|
70838
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;
|
|
70839
71093
|
}
|
|
70840
|
-
}
|
|
70841
|
-
|
|
70842
|
-
const value = node.value;
|
|
70843
|
-
if (value.kind !== "Variable") {
|
|
70844
|
-
return;
|
|
70845
|
-
}
|
|
70846
|
-
if (!scope) {
|
|
70847
|
-
throw new HoudiniError({
|
|
70848
|
-
filepath,
|
|
70849
|
-
message: node.name.value + " is not defined in the current scope: " + JSON.stringify(scope)
|
|
70850
|
-
});
|
|
70851
|
-
}
|
|
70852
|
-
const newValue = scope[value.name.value];
|
|
70853
|
-
if (newValue) {
|
|
70854
|
-
return {
|
|
70855
|
-
...node,
|
|
70856
|
-
value: newValue
|
|
70857
|
-
};
|
|
70858
|
-
}
|
|
70859
|
-
if (definitionArgs[value.name.value] && definitionArgs[value.name.value].required) {
|
|
70860
|
-
throw new HoudiniError({
|
|
70861
|
-
filepath,
|
|
70862
|
-
message: "Missing value for required arg: " + value.name.value
|
|
70863
|
-
});
|
|
70864
|
-
}
|
|
70865
|
-
return null;
|
|
70866
|
-
}
|
|
70867
|
-
});
|
|
71094
|
+
})
|
|
71095
|
+
);
|
|
70868
71096
|
if (newName) {
|
|
70869
71097
|
result.name = {
|
|
70870
71098
|
kind: graphql5.Kind.NAME,
|
|
@@ -71586,7 +71814,7 @@ async function paginate(config4, documents) {
|
|
|
71586
71814
|
]
|
|
71587
71815
|
}
|
|
71588
71816
|
];
|
|
71589
|
-
const
|
|
71817
|
+
const keys2 = config4.keyFieldsForType(!nodeQuery ? config4.schema.getQueryType()?.name || "" : fragment2).flatMap((key) => {
|
|
71590
71818
|
if (fragment2 === config4.schema.getQueryType()?.name) {
|
|
71591
71819
|
return [];
|
|
71592
71820
|
}
|
|
@@ -71636,7 +71864,7 @@ async function paginate(config4, documents) {
|
|
|
71636
71864
|
}
|
|
71637
71865
|
})
|
|
71638
71866
|
).concat(
|
|
71639
|
-
!nodeQuery ? [] :
|
|
71867
|
+
!nodeQuery ? [] : keys2.map(
|
|
71640
71868
|
(key) => ({
|
|
71641
71869
|
kind: graphql10.Kind.VARIABLE_DEFINITION,
|
|
71642
71870
|
type: key.type,
|
|
@@ -71659,7 +71887,7 @@ async function paginate(config4, documents) {
|
|
|
71659
71887
|
kind: graphql10.Kind.NAME,
|
|
71660
71888
|
value: typeConfig?.resolve?.queryField || "node"
|
|
71661
71889
|
},
|
|
71662
|
-
["arguments"]:
|
|
71890
|
+
["arguments"]: keys2.map((key) => ({
|
|
71663
71891
|
kind: graphql10.Kind.ARGUMENT,
|
|
71664
71892
|
name: {
|
|
71665
71893
|
kind: graphql10.Kind.NAME,
|
|
@@ -72353,12 +72581,24 @@ function prepareSelection({
|
|
|
72353
72581
|
}
|
|
72354
72582
|
const typeName = fieldType.toString();
|
|
72355
72583
|
const pathSoFar = path2.concat(attributeName);
|
|
72356
|
-
const
|
|
72584
|
+
const keys2 = config4.keyFieldsForType(rootType);
|
|
72357
72585
|
let fieldObj = {
|
|
72358
72586
|
type: typeName,
|
|
72359
72587
|
keyRaw: fieldKey(config4, field)
|
|
72360
72588
|
};
|
|
72361
|
-
if (
|
|
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)) {
|
|
72362
72602
|
fieldObj.visible = true;
|
|
72363
72603
|
}
|
|
72364
72604
|
if (nullable) {
|
|
@@ -72583,12 +72823,7 @@ function artifactGenerator(stats) {
|
|
|
72583
72823
|
writeIndexFile(config4, docs)
|
|
72584
72824
|
].concat(
|
|
72585
72825
|
docs.map(async (doc) => {
|
|
72586
|
-
const {
|
|
72587
|
-
document,
|
|
72588
|
-
name,
|
|
72589
|
-
generateArtifact,
|
|
72590
|
-
originalParsed
|
|
72591
|
-
} = doc;
|
|
72826
|
+
const { document, name, generateArtifact, originalParsed, originalString } = doc;
|
|
72592
72827
|
if (!generateArtifact) {
|
|
72593
72828
|
return;
|
|
72594
72829
|
}
|
|
@@ -73849,10 +74084,10 @@ function typeDefinitions(config4, body, docs, returnType) {
|
|
|
73849
74084
|
typeName = "__ROOT__";
|
|
73850
74085
|
}
|
|
73851
74086
|
let idFields = AST12.tsNeverKeyword();
|
|
73852
|
-
const
|
|
73853
|
-
if (graphql19.isObjectType(type) &&
|
|
74087
|
+
const keys2 = keyFieldsForType(config4.configFile, type.name);
|
|
74088
|
+
if (graphql19.isObjectType(type) && keys2.length > 0 && keys2.every((key) => type.getFields()[key])) {
|
|
73854
74089
|
idFields = AST12.tsTypeLiteral(
|
|
73855
|
-
|
|
74090
|
+
keys2.map((key) => {
|
|
73856
74091
|
const fieldType = type.getFields()[key];
|
|
73857
74092
|
const unwrapped = unwrapType(config4, fieldType.type);
|
|
73858
74093
|
return AST12.tsPropertySignature(
|