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
|
@@ -230,16 +230,16 @@ var require_GraphQLError = __commonJS({
|
|
|
230
230
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
231
231
|
}
|
|
232
232
|
function ownKeys(object, enumerableOnly) {
|
|
233
|
-
var
|
|
233
|
+
var keys2 = Object.keys(object);
|
|
234
234
|
if (Object.getOwnPropertySymbols) {
|
|
235
235
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
236
236
|
if (enumerableOnly)
|
|
237
237
|
symbols = symbols.filter(function(sym) {
|
|
238
238
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
239
239
|
});
|
|
240
|
-
|
|
240
|
+
keys2.push.apply(keys2, symbols);
|
|
241
241
|
}
|
|
242
|
-
return
|
|
242
|
+
return keys2;
|
|
243
243
|
}
|
|
244
244
|
function _objectSpread(target) {
|
|
245
245
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -476,7 +476,7 @@ var require_GraphQLError = __commonJS({
|
|
|
476
476
|
}
|
|
477
477
|
_createClass(GraphQLError4, [{
|
|
478
478
|
key: "toString",
|
|
479
|
-
value: function
|
|
479
|
+
value: function toString2() {
|
|
480
480
|
return printError(this);
|
|
481
481
|
}
|
|
482
482
|
}, {
|
|
@@ -798,14 +798,14 @@ var require_inspect = __commonJS({
|
|
|
798
798
|
return formatObject(value, seenValues);
|
|
799
799
|
}
|
|
800
800
|
function formatObject(object, seenValues) {
|
|
801
|
-
var
|
|
802
|
-
if (
|
|
801
|
+
var keys2 = Object.keys(object);
|
|
802
|
+
if (keys2.length === 0) {
|
|
803
803
|
return "{}";
|
|
804
804
|
}
|
|
805
805
|
if (seenValues.length > MAX_RECURSIVE_DEPTH) {
|
|
806
806
|
return "[" + getObjectTag(object) + "]";
|
|
807
807
|
}
|
|
808
|
-
var properties =
|
|
808
|
+
var properties = keys2.map(function(key) {
|
|
809
809
|
var value = formatValue(object[key], seenValues);
|
|
810
810
|
return key + ": " + value;
|
|
811
811
|
});
|
|
@@ -2470,7 +2470,7 @@ var require_visitor = __commonJS({
|
|
|
2470
2470
|
var visitorKeys = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : QueryDocumentKeys;
|
|
2471
2471
|
var stack = void 0;
|
|
2472
2472
|
var inArray = Array.isArray(root);
|
|
2473
|
-
var
|
|
2473
|
+
var keys2 = [root];
|
|
2474
2474
|
var index = -1;
|
|
2475
2475
|
var edits = [];
|
|
2476
2476
|
var node = void 0;
|
|
@@ -2481,7 +2481,7 @@ var require_visitor = __commonJS({
|
|
|
2481
2481
|
var newRoot = root;
|
|
2482
2482
|
do {
|
|
2483
2483
|
index++;
|
|
2484
|
-
var isLeaving = index ===
|
|
2484
|
+
var isLeaving = index === keys2.length;
|
|
2485
2485
|
var isEdited = isLeaving && edits.length !== 0;
|
|
2486
2486
|
if (isLeaving) {
|
|
2487
2487
|
key = ancestors.length === 0 ? void 0 : path2[path2.length - 1];
|
|
@@ -2514,12 +2514,12 @@ var require_visitor = __commonJS({
|
|
|
2514
2514
|
}
|
|
2515
2515
|
}
|
|
2516
2516
|
index = stack.index;
|
|
2517
|
-
|
|
2517
|
+
keys2 = stack.keys;
|
|
2518
2518
|
edits = stack.edits;
|
|
2519
2519
|
inArray = stack.inArray;
|
|
2520
2520
|
stack = stack.prev;
|
|
2521
2521
|
} else {
|
|
2522
|
-
key = parent ? inArray ? index :
|
|
2522
|
+
key = parent ? inArray ? index : keys2[index] : void 0;
|
|
2523
2523
|
node = parent ? parent[key] : newRoot;
|
|
2524
2524
|
if (node === null || node === void 0) {
|
|
2525
2525
|
continue;
|
|
@@ -2567,12 +2567,12 @@ var require_visitor = __commonJS({
|
|
|
2567
2567
|
stack = {
|
|
2568
2568
|
inArray,
|
|
2569
2569
|
index,
|
|
2570
|
-
keys,
|
|
2570
|
+
keys: keys2,
|
|
2571
2571
|
edits,
|
|
2572
2572
|
prev: stack
|
|
2573
2573
|
};
|
|
2574
2574
|
inArray = Array.isArray(node);
|
|
2575
|
-
|
|
2575
|
+
keys2 = inArray ? node : (_visitorKeys$node$kin = visitorKeys[node.kind]) !== null && _visitorKeys$node$kin !== void 0 ? _visitorKeys$node$kin : [];
|
|
2576
2576
|
index = -1;
|
|
2577
2577
|
edits = [];
|
|
2578
2578
|
if (parent) {
|
|
@@ -3555,7 +3555,7 @@ var require_definition = __commonJS({
|
|
|
3555
3555
|
return new GraphQLList2(ofType);
|
|
3556
3556
|
}
|
|
3557
3557
|
}
|
|
3558
|
-
GraphQLList2.prototype.toString = function
|
|
3558
|
+
GraphQLList2.prototype.toString = function toString2() {
|
|
3559
3559
|
return "[" + String(this.ofType) + "]";
|
|
3560
3560
|
};
|
|
3561
3561
|
GraphQLList2.prototype.toJSON = function toJSON() {
|
|
@@ -3574,7 +3574,7 @@ var require_definition = __commonJS({
|
|
|
3574
3574
|
return new GraphQLNonNull2(ofType);
|
|
3575
3575
|
}
|
|
3576
3576
|
}
|
|
3577
|
-
GraphQLNonNull2.prototype.toString = function
|
|
3577
|
+
GraphQLNonNull2.prototype.toString = function toString2() {
|
|
3578
3578
|
return String(this.ofType) + "!";
|
|
3579
3579
|
};
|
|
3580
3580
|
GraphQLNonNull2.prototype.toJSON = function toJSON() {
|
|
@@ -3670,7 +3670,7 @@ var require_definition = __commonJS({
|
|
|
3670
3670
|
extensionASTNodes: (_this$extensionASTNod = this.extensionASTNodes) !== null && _this$extensionASTNod !== void 0 ? _this$extensionASTNod : []
|
|
3671
3671
|
};
|
|
3672
3672
|
};
|
|
3673
|
-
_proto.toString = function
|
|
3673
|
+
_proto.toString = function toString2() {
|
|
3674
3674
|
return this.name;
|
|
3675
3675
|
};
|
|
3676
3676
|
_proto.toJSON = function toJSON() {
|
|
@@ -3724,7 +3724,7 @@ var require_definition = __commonJS({
|
|
|
3724
3724
|
extensionASTNodes: this.extensionASTNodes || []
|
|
3725
3725
|
};
|
|
3726
3726
|
};
|
|
3727
|
-
_proto2.toString = function
|
|
3727
|
+
_proto2.toString = function toString2() {
|
|
3728
3728
|
return this.name;
|
|
3729
3729
|
};
|
|
3730
3730
|
_proto2.toJSON = function toJSON() {
|
|
@@ -3855,7 +3855,7 @@ var require_definition = __commonJS({
|
|
|
3855
3855
|
extensionASTNodes: (_this$extensionASTNod2 = this.extensionASTNodes) !== null && _this$extensionASTNod2 !== void 0 ? _this$extensionASTNod2 : []
|
|
3856
3856
|
};
|
|
3857
3857
|
};
|
|
3858
|
-
_proto3.toString = function
|
|
3858
|
+
_proto3.toString = function toString2() {
|
|
3859
3859
|
return this.name;
|
|
3860
3860
|
};
|
|
3861
3861
|
_proto3.toJSON = function toJSON() {
|
|
@@ -3902,7 +3902,7 @@ var require_definition = __commonJS({
|
|
|
3902
3902
|
extensionASTNodes: (_this$extensionASTNod3 = this.extensionASTNodes) !== null && _this$extensionASTNod3 !== void 0 ? _this$extensionASTNod3 : []
|
|
3903
3903
|
};
|
|
3904
3904
|
};
|
|
3905
|
-
_proto4.toString = function
|
|
3905
|
+
_proto4.toString = function toString2() {
|
|
3906
3906
|
return this.name;
|
|
3907
3907
|
};
|
|
3908
3908
|
_proto4.toJSON = function toJSON() {
|
|
@@ -3946,7 +3946,7 @@ var require_definition = __commonJS({
|
|
|
3946
3946
|
_proto5.getValue = function getValue(name) {
|
|
3947
3947
|
return this._nameLookup[name];
|
|
3948
3948
|
};
|
|
3949
|
-
_proto5.serialize = function
|
|
3949
|
+
_proto5.serialize = function serialize2(outputValue) {
|
|
3950
3950
|
var enumValue = this._valueLookup.get(outputValue);
|
|
3951
3951
|
if (enumValue === void 0) {
|
|
3952
3952
|
throw new _GraphQLError.GraphQLError('Enum "'.concat(this.name, '" cannot represent value: ').concat((0, _inspect.default)(outputValue)));
|
|
@@ -3998,7 +3998,7 @@ var require_definition = __commonJS({
|
|
|
3998
3998
|
extensionASTNodes: (_this$extensionASTNod4 = this.extensionASTNodes) !== null && _this$extensionASTNod4 !== void 0 ? _this$extensionASTNod4 : []
|
|
3999
3999
|
};
|
|
4000
4000
|
};
|
|
4001
|
-
_proto5.toString = function
|
|
4001
|
+
_proto5.toString = function toString2() {
|
|
4002
4002
|
return this.name;
|
|
4003
4003
|
};
|
|
4004
4004
|
_proto5.toJSON = function toJSON() {
|
|
@@ -4076,7 +4076,7 @@ var require_definition = __commonJS({
|
|
|
4076
4076
|
extensionASTNodes: (_this$extensionASTNod5 = this.extensionASTNodes) !== null && _this$extensionASTNod5 !== void 0 ? _this$extensionASTNod5 : []
|
|
4077
4077
|
};
|
|
4078
4078
|
};
|
|
4079
|
-
_proto6.toString = function
|
|
4079
|
+
_proto6.toString = function toString2() {
|
|
4080
4080
|
return this.name;
|
|
4081
4081
|
};
|
|
4082
4082
|
_proto6.toJSON = function toJSON() {
|
|
@@ -5330,7 +5330,7 @@ var require_directives = __commonJS({
|
|
|
5330
5330
|
astNode: this.astNode
|
|
5331
5331
|
};
|
|
5332
5332
|
};
|
|
5333
|
-
_proto.toString = function
|
|
5333
|
+
_proto.toString = function toString2() {
|
|
5334
5334
|
return "@" + this.name;
|
|
5335
5335
|
};
|
|
5336
5336
|
_proto.toJSON = function toJSON() {
|
|
@@ -7267,16 +7267,16 @@ var require_KnownArgumentNamesRule = __commonJS({
|
|
|
7267
7267
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
7268
7268
|
}
|
|
7269
7269
|
function ownKeys(object, enumerableOnly) {
|
|
7270
|
-
var
|
|
7270
|
+
var keys2 = Object.keys(object);
|
|
7271
7271
|
if (Object.getOwnPropertySymbols) {
|
|
7272
7272
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
7273
7273
|
if (enumerableOnly)
|
|
7274
7274
|
symbols = symbols.filter(function(sym) {
|
|
7275
7275
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
7276
7276
|
});
|
|
7277
|
-
|
|
7277
|
+
keys2.push.apply(keys2, symbols);
|
|
7278
7278
|
}
|
|
7279
|
-
return
|
|
7279
|
+
return keys2;
|
|
7280
7280
|
}
|
|
7281
7281
|
function _objectSpread(target) {
|
|
7282
7282
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -7523,16 +7523,16 @@ var require_ProvidedRequiredArgumentsRule = __commonJS({
|
|
|
7523
7523
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
7524
7524
|
}
|
|
7525
7525
|
function ownKeys(object, enumerableOnly) {
|
|
7526
|
-
var
|
|
7526
|
+
var keys2 = Object.keys(object);
|
|
7527
7527
|
if (Object.getOwnPropertySymbols) {
|
|
7528
7528
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
7529
7529
|
if (enumerableOnly)
|
|
7530
7530
|
symbols = symbols.filter(function(sym) {
|
|
7531
7531
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
7532
7532
|
});
|
|
7533
|
-
|
|
7533
|
+
keys2.push.apply(keys2, symbols);
|
|
7534
7534
|
}
|
|
7535
|
-
return
|
|
7535
|
+
return keys2;
|
|
7536
7536
|
}
|
|
7537
7537
|
function _objectSpread(target) {
|
|
7538
7538
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -8790,13 +8790,13 @@ var require_promiseForObject = __commonJS({
|
|
|
8790
8790
|
});
|
|
8791
8791
|
exports.default = promiseForObject;
|
|
8792
8792
|
function promiseForObject(object) {
|
|
8793
|
-
var
|
|
8794
|
-
var valuesAndPromises =
|
|
8793
|
+
var keys2 = Object.keys(object);
|
|
8794
|
+
var valuesAndPromises = keys2.map(function(name) {
|
|
8795
8795
|
return object[name];
|
|
8796
8796
|
});
|
|
8797
8797
|
return Promise.all(valuesAndPromises).then(function(values) {
|
|
8798
8798
|
return values.reduce(function(resolvedObject, value, i) {
|
|
8799
|
-
resolvedObject[
|
|
8799
|
+
resolvedObject[keys2[i]] = value;
|
|
8800
8800
|
return resolvedObject;
|
|
8801
8801
|
}, /* @__PURE__ */ Object.create(null));
|
|
8802
8802
|
});
|
|
@@ -11248,16 +11248,16 @@ var require_getIntrospectionQuery = __commonJS({
|
|
|
11248
11248
|
});
|
|
11249
11249
|
exports.getIntrospectionQuery = getIntrospectionQuery;
|
|
11250
11250
|
function ownKeys(object, enumerableOnly) {
|
|
11251
|
-
var
|
|
11251
|
+
var keys2 = Object.keys(object);
|
|
11252
11252
|
if (Object.getOwnPropertySymbols) {
|
|
11253
11253
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
11254
11254
|
if (enumerableOnly)
|
|
11255
11255
|
symbols = symbols.filter(function(sym) {
|
|
11256
11256
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
11257
11257
|
});
|
|
11258
|
-
|
|
11258
|
+
keys2.push.apply(keys2, symbols);
|
|
11259
11259
|
}
|
|
11260
|
-
return
|
|
11260
|
+
return keys2;
|
|
11261
11261
|
}
|
|
11262
11262
|
function _objectSpread(target) {
|
|
11263
11263
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -11350,16 +11350,16 @@ var require_introspectionFromSchema = __commonJS({
|
|
|
11350
11350
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
11351
11351
|
}
|
|
11352
11352
|
function ownKeys(object, enumerableOnly) {
|
|
11353
|
-
var
|
|
11353
|
+
var keys2 = Object.keys(object);
|
|
11354
11354
|
if (Object.getOwnPropertySymbols) {
|
|
11355
11355
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
11356
11356
|
if (enumerableOnly)
|
|
11357
11357
|
symbols = symbols.filter(function(sym) {
|
|
11358
11358
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
11359
11359
|
});
|
|
11360
|
-
|
|
11360
|
+
keys2.push.apply(keys2, symbols);
|
|
11361
11361
|
}
|
|
11362
|
-
return
|
|
11362
|
+
return keys2;
|
|
11363
11363
|
}
|
|
11364
11364
|
function _objectSpread(target) {
|
|
11365
11365
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -11691,16 +11691,16 @@ var require_extendSchema = __commonJS({
|
|
|
11691
11691
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
11692
11692
|
}
|
|
11693
11693
|
function ownKeys(object, enumerableOnly) {
|
|
11694
|
-
var
|
|
11694
|
+
var keys2 = Object.keys(object);
|
|
11695
11695
|
if (Object.getOwnPropertySymbols) {
|
|
11696
11696
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
11697
11697
|
if (enumerableOnly)
|
|
11698
11698
|
symbols = symbols.filter(function(sym) {
|
|
11699
11699
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
11700
11700
|
});
|
|
11701
|
-
|
|
11701
|
+
keys2.push.apply(keys2, symbols);
|
|
11702
11702
|
}
|
|
11703
|
-
return
|
|
11703
|
+
return keys2;
|
|
11704
11704
|
}
|
|
11705
11705
|
function _objectSpread(target) {
|
|
11706
11706
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -12291,16 +12291,16 @@ var require_lexicographicSortSchema = __commonJS({
|
|
|
12291
12291
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
12292
12292
|
}
|
|
12293
12293
|
function ownKeys(object, enumerableOnly) {
|
|
12294
|
-
var
|
|
12294
|
+
var keys2 = Object.keys(object);
|
|
12295
12295
|
if (Object.getOwnPropertySymbols) {
|
|
12296
12296
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
12297
12297
|
if (enumerableOnly)
|
|
12298
12298
|
symbols = symbols.filter(function(sym) {
|
|
12299
12299
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
12300
12300
|
});
|
|
12301
|
-
|
|
12301
|
+
keys2.push.apply(keys2, symbols);
|
|
12302
12302
|
}
|
|
12303
|
-
return
|
|
12303
|
+
return keys2;
|
|
12304
12304
|
}
|
|
12305
12305
|
function _objectSpread(target) {
|
|
12306
12306
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -12841,16 +12841,16 @@ var require_findBreakingChanges = __commonJS({
|
|
|
12841
12841
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
12842
12842
|
}
|
|
12843
12843
|
function ownKeys(object, enumerableOnly) {
|
|
12844
|
-
var
|
|
12844
|
+
var keys2 = Object.keys(object);
|
|
12845
12845
|
if (Object.getOwnPropertySymbols) {
|
|
12846
12846
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
12847
12847
|
if (enumerableOnly)
|
|
12848
12848
|
symbols = symbols.filter(function(sym) {
|
|
12849
12849
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
12850
12850
|
});
|
|
12851
|
-
|
|
12851
|
+
keys2.push.apply(keys2, symbols);
|
|
12852
12852
|
}
|
|
12853
|
-
return
|
|
12853
|
+
return keys2;
|
|
12854
12854
|
}
|
|
12855
12855
|
function _objectSpread(target) {
|
|
12856
12856
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -15847,9 +15847,9 @@ var require_legacy_streams = __commonJS({
|
|
|
15847
15847
|
this.mode = 438;
|
|
15848
15848
|
this.bufferSize = 64 * 1024;
|
|
15849
15849
|
options = options || {};
|
|
15850
|
-
var
|
|
15851
|
-
for (var index = 0, length =
|
|
15852
|
-
var key =
|
|
15850
|
+
var keys2 = Object.keys(options);
|
|
15851
|
+
for (var index = 0, length = keys2.length; index < length; index++) {
|
|
15852
|
+
var key = keys2[index];
|
|
15853
15853
|
this[key] = options[key];
|
|
15854
15854
|
}
|
|
15855
15855
|
if (this.encoding)
|
|
@@ -15897,9 +15897,9 @@ var require_legacy_streams = __commonJS({
|
|
|
15897
15897
|
this.mode = 438;
|
|
15898
15898
|
this.bytesWritten = 0;
|
|
15899
15899
|
options = options || {};
|
|
15900
|
-
var
|
|
15901
|
-
for (var index = 0, length =
|
|
15902
|
-
var key =
|
|
15900
|
+
var keys2 = Object.keys(options);
|
|
15901
|
+
for (var index = 0, length = keys2.length; index < length; index++) {
|
|
15902
|
+
var key = keys2[index];
|
|
15903
15903
|
this[key] = options[key];
|
|
15904
15904
|
}
|
|
15905
15905
|
if (this.start !== void 0) {
|
|
@@ -19116,10 +19116,10 @@ var require_glob = __commonJS({
|
|
|
19116
19116
|
if (add === null || typeof add !== "object") {
|
|
19117
19117
|
return origin;
|
|
19118
19118
|
}
|
|
19119
|
-
var
|
|
19120
|
-
var i =
|
|
19119
|
+
var keys2 = Object.keys(add);
|
|
19120
|
+
var i = keys2.length;
|
|
19121
19121
|
while (i--) {
|
|
19122
|
-
origin[
|
|
19122
|
+
origin[keys2[i]] = add[keys2[i]];
|
|
19123
19123
|
}
|
|
19124
19124
|
return origin;
|
|
19125
19125
|
}
|
|
@@ -23185,12 +23185,12 @@ var require_lib3 = __commonJS({
|
|
|
23185
23185
|
SyntaxError: "BABEL_PARSER_SYNTAX_ERROR",
|
|
23186
23186
|
SourceTypeModuleError: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"
|
|
23187
23187
|
};
|
|
23188
|
-
var reflect = (
|
|
23188
|
+
var reflect = (keys2, last = keys2.length - 1) => ({
|
|
23189
23189
|
get() {
|
|
23190
|
-
return
|
|
23190
|
+
return keys2.reduce((object, key) => object[key], this);
|
|
23191
23191
|
},
|
|
23192
23192
|
set(value) {
|
|
23193
|
-
|
|
23193
|
+
keys2.reduce(
|
|
23194
23194
|
(item, key, i) => i === last ? item[key] = value : item[key],
|
|
23195
23195
|
this
|
|
23196
23196
|
);
|
|
@@ -25123,9 +25123,9 @@ var require_lib3 = __commonJS({
|
|
|
25123
25123
|
}
|
|
25124
25124
|
clone(skipArrays) {
|
|
25125
25125
|
const state = new State();
|
|
25126
|
-
const
|
|
25127
|
-
for (let i = 0, length =
|
|
25128
|
-
const key =
|
|
25126
|
+
const keys2 = Object.keys(this);
|
|
25127
|
+
for (let i = 0, length = keys2.length; i < length; i++) {
|
|
25128
|
+
const key = keys2[i];
|
|
25129
25129
|
let val = this[key];
|
|
25130
25130
|
if (!skipArrays && Array.isArray(val)) {
|
|
25131
25131
|
val = val.slice();
|
|
@@ -27030,9 +27030,9 @@ var require_lib3 = __commonJS({
|
|
|
27030
27030
|
{
|
|
27031
27031
|
NodePrototype.__clone = function() {
|
|
27032
27032
|
const newNode = new Node(void 0, this.start, this.loc.start);
|
|
27033
|
-
const
|
|
27034
|
-
for (let i = 0, length =
|
|
27035
|
-
const key =
|
|
27033
|
+
const keys2 = Object.keys(this);
|
|
27034
|
+
for (let i = 0, length = keys2.length; i < length; i++) {
|
|
27035
|
+
const key = keys2[i];
|
|
27036
27036
|
if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") {
|
|
27037
27037
|
newNode[key] = this[key];
|
|
27038
27038
|
}
|
|
@@ -43330,10 +43330,10 @@ var require_util2 = __commonJS({
|
|
|
43330
43330
|
var result = {};
|
|
43331
43331
|
var argc = args.length;
|
|
43332
43332
|
for (var i = 0; i < argc; ++i) {
|
|
43333
|
-
var
|
|
43334
|
-
var keyCount =
|
|
43333
|
+
var keys2 = Object.keys(args[i]);
|
|
43334
|
+
var keyCount = keys2.length;
|
|
43335
43335
|
for (var j = 0; j < keyCount; ++j) {
|
|
43336
|
-
result[
|
|
43336
|
+
result[keys2[j]] = true;
|
|
43337
43337
|
}
|
|
43338
43338
|
}
|
|
43339
43339
|
return result;
|
|
@@ -50993,10 +50993,10 @@ var require_parser2 = __commonJS({
|
|
|
50993
50993
|
loc.indent = newIndent;
|
|
50994
50994
|
this.findTokenRange(loc);
|
|
50995
50995
|
}
|
|
50996
|
-
var
|
|
50997
|
-
var keyCount =
|
|
50996
|
+
var keys2 = Object.keys(node);
|
|
50997
|
+
var keyCount = keys2.length;
|
|
50998
50998
|
for (var i = 0; i < keyCount; ++i) {
|
|
50999
|
-
var key =
|
|
50999
|
+
var key = keys2[i];
|
|
51000
51000
|
if (key === "loc") {
|
|
51001
51001
|
copy[key] = node[key];
|
|
51002
51002
|
} else if (key === "tokens" && node.type === "File") {
|
|
@@ -51755,13 +51755,13 @@ var require_patcher = __commonJS({
|
|
|
51755
51755
|
if (newPath.needsParens() && !oldPath.hasParens()) {
|
|
51756
51756
|
return false;
|
|
51757
51757
|
}
|
|
51758
|
-
var
|
|
51758
|
+
var keys2 = (0, util_1.getUnionOfKeys)(oldNode, newNode);
|
|
51759
51759
|
if (oldNode.type === "File" || newNode.type === "File") {
|
|
51760
|
-
delete
|
|
51760
|
+
delete keys2.tokens;
|
|
51761
51761
|
}
|
|
51762
|
-
delete
|
|
51762
|
+
delete keys2.loc;
|
|
51763
51763
|
var originalReprintCount = reprints.length;
|
|
51764
|
-
for (var k in
|
|
51764
|
+
for (var k in keys2) {
|
|
51765
51765
|
if (k.charAt(0) === "_") {
|
|
51766
51766
|
continue;
|
|
51767
51767
|
}
|
|
@@ -54297,9 +54297,9 @@ var fragmentKey = " $fragments";
|
|
|
54297
54297
|
|
|
54298
54298
|
// src/runtime/lib/key.ts
|
|
54299
54299
|
var computeKey = ({ field, args }) => {
|
|
54300
|
-
const
|
|
54301
|
-
|
|
54302
|
-
return args &&
|
|
54300
|
+
const keys2 = Object.keys(args ?? {});
|
|
54301
|
+
keys2.sort();
|
|
54302
|
+
return args && keys2.length > 0 ? `${field}(${keys2.map((key) => `${key}: ${stringifyObjectWithNoQuotesOnKeys(args[key])}`).join(", ")})` : field;
|
|
54303
54303
|
};
|
|
54304
54304
|
var stringifyObjectWithNoQuotesOnKeys = (obj_from_json) => {
|
|
54305
54305
|
if (Array.isArray(obj_from_json)) {
|
|
@@ -56251,7 +56251,8 @@ var CacheInternal = class {
|
|
|
56251
56251
|
parent = rootID,
|
|
56252
56252
|
variables,
|
|
56253
56253
|
stepsFromConnection = null,
|
|
56254
|
-
ignoreMasking
|
|
56254
|
+
ignoreMasking,
|
|
56255
|
+
fullCheck = false
|
|
56255
56256
|
}) {
|
|
56256
56257
|
if (parent === null) {
|
|
56257
56258
|
return { data: null, partial: false, stale: false, hasData: true };
|
|
@@ -56276,11 +56277,28 @@ var CacheInternal = class {
|
|
|
56276
56277
|
let targetSelection = getFieldsForType(selection, typename);
|
|
56277
56278
|
for (const [
|
|
56278
56279
|
attributeName,
|
|
56279
|
-
{ type, keyRaw, selection: fieldSelection, nullable, list, visible }
|
|
56280
|
+
{ type, keyRaw, selection: fieldSelection, nullable, list, visible, directives }
|
|
56280
56281
|
] of Object.entries(targetSelection)) {
|
|
56281
|
-
if (!visible && !ignoreMasking) {
|
|
56282
|
+
if (!visible && !ignoreMasking && !fullCheck) {
|
|
56282
56283
|
continue;
|
|
56283
56284
|
}
|
|
56285
|
+
const includeDirective = directives?.find((d) => {
|
|
56286
|
+
return d.name === "include";
|
|
56287
|
+
});
|
|
56288
|
+
if (includeDirective) {
|
|
56289
|
+
if (!evaluateFragmentVariables(includeDirective.arguments, variables ?? {})["if"]) {
|
|
56290
|
+
continue;
|
|
56291
|
+
}
|
|
56292
|
+
}
|
|
56293
|
+
const skipDirective = directives?.find((d) => {
|
|
56294
|
+
return d.name === "skip";
|
|
56295
|
+
});
|
|
56296
|
+
if (skipDirective) {
|
|
56297
|
+
if (evaluateFragmentVariables(skipDirective.arguments, variables ?? {})["if"]) {
|
|
56298
|
+
continue;
|
|
56299
|
+
}
|
|
56300
|
+
}
|
|
56301
|
+
const fieldTarget = visible || ignoreMasking ? target : {};
|
|
56284
56302
|
const key = evaluateKey(keyRaw, variables);
|
|
56285
56303
|
const { value } = this.storage.get(parent, key);
|
|
56286
56304
|
const dt_field = this.staleManager.getFieldTime(parent, key);
|
|
@@ -56303,16 +56321,16 @@ var CacheInternal = class {
|
|
|
56303
56321
|
partial = true;
|
|
56304
56322
|
}
|
|
56305
56323
|
if (typeof value === "undefined" || value === null) {
|
|
56306
|
-
|
|
56324
|
+
fieldTarget[attributeName] = null;
|
|
56307
56325
|
if (typeof value !== "undefined") {
|
|
56308
56326
|
hasData = true;
|
|
56309
56327
|
}
|
|
56310
56328
|
} else if (!fieldSelection) {
|
|
56311
56329
|
const fnUnmarshal = this.config?.scalars?.[type]?.unmarshal;
|
|
56312
56330
|
if (fnUnmarshal) {
|
|
56313
|
-
|
|
56331
|
+
fieldTarget[attributeName] = fnUnmarshal(value);
|
|
56314
56332
|
} else {
|
|
56315
|
-
|
|
56333
|
+
fieldTarget[attributeName] = value;
|
|
56316
56334
|
}
|
|
56317
56335
|
hasData = true;
|
|
56318
56336
|
} else if (Array.isArray(value)) {
|
|
@@ -56321,9 +56339,10 @@ var CacheInternal = class {
|
|
|
56321
56339
|
variables,
|
|
56322
56340
|
linkedList: value,
|
|
56323
56341
|
stepsFromConnection: nextStep,
|
|
56324
|
-
ignoreMasking: !!ignoreMasking
|
|
56342
|
+
ignoreMasking: !!ignoreMasking,
|
|
56343
|
+
fullCheck
|
|
56325
56344
|
});
|
|
56326
|
-
|
|
56345
|
+
fieldTarget[attributeName] = listValue.data;
|
|
56327
56346
|
if (listValue.partial) {
|
|
56328
56347
|
partial = true;
|
|
56329
56348
|
}
|
|
@@ -56339,9 +56358,10 @@ var CacheInternal = class {
|
|
|
56339
56358
|
selection: fieldSelection,
|
|
56340
56359
|
variables,
|
|
56341
56360
|
stepsFromConnection: nextStep,
|
|
56342
|
-
ignoreMasking
|
|
56361
|
+
ignoreMasking,
|
|
56362
|
+
fullCheck
|
|
56343
56363
|
});
|
|
56344
|
-
|
|
56364
|
+
fieldTarget[attributeName] = objectFields.data;
|
|
56345
56365
|
if (objectFields.partial) {
|
|
56346
56366
|
partial = true;
|
|
56347
56367
|
}
|
|
@@ -56352,7 +56372,7 @@ var CacheInternal = class {
|
|
|
56352
56372
|
hasData = true;
|
|
56353
56373
|
}
|
|
56354
56374
|
}
|
|
56355
|
-
if (
|
|
56375
|
+
if (fieldTarget[attributeName] === null && !nullable && !embeddedCursor) {
|
|
56356
56376
|
cascadeNull = true;
|
|
56357
56377
|
}
|
|
56358
56378
|
}
|
|
@@ -56384,7 +56404,8 @@ var CacheInternal = class {
|
|
|
56384
56404
|
variables,
|
|
56385
56405
|
linkedList,
|
|
56386
56406
|
stepsFromConnection,
|
|
56387
|
-
ignoreMasking
|
|
56407
|
+
ignoreMasking,
|
|
56408
|
+
fullCheck
|
|
56388
56409
|
}) {
|
|
56389
56410
|
const result = [];
|
|
56390
56411
|
let partialData = false;
|
|
@@ -56397,7 +56418,8 @@ var CacheInternal = class {
|
|
|
56397
56418
|
variables,
|
|
56398
56419
|
linkedList: entry,
|
|
56399
56420
|
stepsFromConnection,
|
|
56400
|
-
ignoreMasking
|
|
56421
|
+
ignoreMasking,
|
|
56422
|
+
fullCheck
|
|
56401
56423
|
});
|
|
56402
56424
|
result.push(nestedValue.data);
|
|
56403
56425
|
if (nestedValue.partial) {
|
|
@@ -56419,7 +56441,8 @@ var CacheInternal = class {
|
|
|
56419
56441
|
selection: fields,
|
|
56420
56442
|
variables,
|
|
56421
56443
|
stepsFromConnection,
|
|
56422
|
-
ignoreMasking
|
|
56444
|
+
ignoreMasking,
|
|
56445
|
+
fullCheck
|
|
56423
56446
|
});
|
|
56424
56447
|
result.push(data);
|
|
56425
56448
|
if (partial) {
|
|
@@ -57463,6 +57486,205 @@ function murmurHash(str) {
|
|
|
57463
57486
|
return s;
|
|
57464
57487
|
}
|
|
57465
57488
|
|
|
57489
|
+
// ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/types.js
|
|
57490
|
+
var VOID = -1;
|
|
57491
|
+
var PRIMITIVE = 0;
|
|
57492
|
+
var ARRAY = 1;
|
|
57493
|
+
var OBJECT = 2;
|
|
57494
|
+
var DATE = 3;
|
|
57495
|
+
var REGEXP = 4;
|
|
57496
|
+
var MAP = 5;
|
|
57497
|
+
var SET = 6;
|
|
57498
|
+
var ERROR = 7;
|
|
57499
|
+
var BIGINT = 8;
|
|
57500
|
+
|
|
57501
|
+
// ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/deserialize.js
|
|
57502
|
+
var env = typeof self === "object" ? self : globalThis;
|
|
57503
|
+
var deserializer = ($, _) => {
|
|
57504
|
+
const as = (out, index) => {
|
|
57505
|
+
$.set(index, out);
|
|
57506
|
+
return out;
|
|
57507
|
+
};
|
|
57508
|
+
const unpair = (index) => {
|
|
57509
|
+
if ($.has(index))
|
|
57510
|
+
return $.get(index);
|
|
57511
|
+
const [type, value] = _[index];
|
|
57512
|
+
switch (type) {
|
|
57513
|
+
case PRIMITIVE:
|
|
57514
|
+
case VOID:
|
|
57515
|
+
return as(value, index);
|
|
57516
|
+
case ARRAY: {
|
|
57517
|
+
const arr = as([], index);
|
|
57518
|
+
for (const index2 of value)
|
|
57519
|
+
arr.push(unpair(index2));
|
|
57520
|
+
return arr;
|
|
57521
|
+
}
|
|
57522
|
+
case OBJECT: {
|
|
57523
|
+
const object = as({}, index);
|
|
57524
|
+
for (const [key, index2] of value)
|
|
57525
|
+
object[unpair(key)] = unpair(index2);
|
|
57526
|
+
return object;
|
|
57527
|
+
}
|
|
57528
|
+
case DATE:
|
|
57529
|
+
return as(new Date(value), index);
|
|
57530
|
+
case REGEXP: {
|
|
57531
|
+
const { source, flags } = value;
|
|
57532
|
+
return as(new RegExp(source, flags), index);
|
|
57533
|
+
}
|
|
57534
|
+
case MAP: {
|
|
57535
|
+
const map = as(/* @__PURE__ */ new Map(), index);
|
|
57536
|
+
for (const [key, index2] of value)
|
|
57537
|
+
map.set(unpair(key), unpair(index2));
|
|
57538
|
+
return map;
|
|
57539
|
+
}
|
|
57540
|
+
case SET: {
|
|
57541
|
+
const set = as(/* @__PURE__ */ new Set(), index);
|
|
57542
|
+
for (const index2 of value)
|
|
57543
|
+
set.add(unpair(index2));
|
|
57544
|
+
return set;
|
|
57545
|
+
}
|
|
57546
|
+
case ERROR: {
|
|
57547
|
+
const { name, message } = value;
|
|
57548
|
+
return as(new env[name](message), index);
|
|
57549
|
+
}
|
|
57550
|
+
case BIGINT:
|
|
57551
|
+
return as(BigInt(value), index);
|
|
57552
|
+
case "BigInt":
|
|
57553
|
+
return as(Object(BigInt(value)), index);
|
|
57554
|
+
}
|
|
57555
|
+
return as(new env[type](value), index);
|
|
57556
|
+
};
|
|
57557
|
+
return unpair;
|
|
57558
|
+
};
|
|
57559
|
+
var deserialize = (serialized) => deserializer(/* @__PURE__ */ new Map(), serialized)(0);
|
|
57560
|
+
|
|
57561
|
+
// ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/serialize.js
|
|
57562
|
+
var EMPTY = "";
|
|
57563
|
+
var { toString } = {};
|
|
57564
|
+
var { keys } = Object;
|
|
57565
|
+
var typeOf = (value) => {
|
|
57566
|
+
const type = typeof value;
|
|
57567
|
+
if (type !== "object" || !value)
|
|
57568
|
+
return [PRIMITIVE, type];
|
|
57569
|
+
const asString = toString.call(value).slice(8, -1);
|
|
57570
|
+
switch (asString) {
|
|
57571
|
+
case "Array":
|
|
57572
|
+
return [ARRAY, EMPTY];
|
|
57573
|
+
case "Object":
|
|
57574
|
+
return [OBJECT, EMPTY];
|
|
57575
|
+
case "Date":
|
|
57576
|
+
return [DATE, EMPTY];
|
|
57577
|
+
case "RegExp":
|
|
57578
|
+
return [REGEXP, EMPTY];
|
|
57579
|
+
case "Map":
|
|
57580
|
+
return [MAP, EMPTY];
|
|
57581
|
+
case "Set":
|
|
57582
|
+
return [SET, EMPTY];
|
|
57583
|
+
}
|
|
57584
|
+
if (asString.includes("Array"))
|
|
57585
|
+
return [ARRAY, asString];
|
|
57586
|
+
if (asString.includes("Error"))
|
|
57587
|
+
return [ERROR, asString];
|
|
57588
|
+
return [OBJECT, asString];
|
|
57589
|
+
};
|
|
57590
|
+
var shouldSkip = ([TYPE, type]) => TYPE === PRIMITIVE && (type === "function" || type === "symbol");
|
|
57591
|
+
var serializer = (strict, json, $, _) => {
|
|
57592
|
+
const as = (out, value) => {
|
|
57593
|
+
const index = _.push(out) - 1;
|
|
57594
|
+
$.set(value, index);
|
|
57595
|
+
return index;
|
|
57596
|
+
};
|
|
57597
|
+
const pair = (value) => {
|
|
57598
|
+
if ($.has(value))
|
|
57599
|
+
return $.get(value);
|
|
57600
|
+
let [TYPE, type] = typeOf(value);
|
|
57601
|
+
switch (TYPE) {
|
|
57602
|
+
case PRIMITIVE: {
|
|
57603
|
+
let entry = value;
|
|
57604
|
+
switch (type) {
|
|
57605
|
+
case "bigint":
|
|
57606
|
+
TYPE = BIGINT;
|
|
57607
|
+
entry = value.toString();
|
|
57608
|
+
break;
|
|
57609
|
+
case "function":
|
|
57610
|
+
case "symbol":
|
|
57611
|
+
if (strict)
|
|
57612
|
+
throw new TypeError("unable to serialize " + type);
|
|
57613
|
+
entry = null;
|
|
57614
|
+
break;
|
|
57615
|
+
case "undefined":
|
|
57616
|
+
return as([VOID], value);
|
|
57617
|
+
}
|
|
57618
|
+
return as([TYPE, entry], value);
|
|
57619
|
+
}
|
|
57620
|
+
case ARRAY: {
|
|
57621
|
+
if (type)
|
|
57622
|
+
return as([type, [...value]], value);
|
|
57623
|
+
const arr = [];
|
|
57624
|
+
const index = as([TYPE, arr], value);
|
|
57625
|
+
for (const entry of value)
|
|
57626
|
+
arr.push(pair(entry));
|
|
57627
|
+
return index;
|
|
57628
|
+
}
|
|
57629
|
+
case OBJECT: {
|
|
57630
|
+
if (type) {
|
|
57631
|
+
switch (type) {
|
|
57632
|
+
case "BigInt":
|
|
57633
|
+
return as([type, value.toString()], value);
|
|
57634
|
+
case "Boolean":
|
|
57635
|
+
case "Number":
|
|
57636
|
+
case "String":
|
|
57637
|
+
return as([type, value.valueOf()], value);
|
|
57638
|
+
}
|
|
57639
|
+
}
|
|
57640
|
+
if (json && "toJSON" in value)
|
|
57641
|
+
return pair(value.toJSON());
|
|
57642
|
+
const entries = [];
|
|
57643
|
+
const index = as([TYPE, entries], value);
|
|
57644
|
+
for (const key of keys(value)) {
|
|
57645
|
+
if (strict || !shouldSkip(typeOf(value[key])))
|
|
57646
|
+
entries.push([pair(key), pair(value[key])]);
|
|
57647
|
+
}
|
|
57648
|
+
return index;
|
|
57649
|
+
}
|
|
57650
|
+
case DATE:
|
|
57651
|
+
return as([TYPE, value.toISOString()], value);
|
|
57652
|
+
case REGEXP: {
|
|
57653
|
+
const { source, flags } = value;
|
|
57654
|
+
return as([TYPE, { source, flags }], value);
|
|
57655
|
+
}
|
|
57656
|
+
case MAP: {
|
|
57657
|
+
const entries = [];
|
|
57658
|
+
const index = as([TYPE, entries], value);
|
|
57659
|
+
for (const [key, entry] of value) {
|
|
57660
|
+
if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry))))
|
|
57661
|
+
entries.push([pair(key), pair(entry)]);
|
|
57662
|
+
}
|
|
57663
|
+
return index;
|
|
57664
|
+
}
|
|
57665
|
+
case SET: {
|
|
57666
|
+
const entries = [];
|
|
57667
|
+
const index = as([TYPE, entries], value);
|
|
57668
|
+
for (const entry of value) {
|
|
57669
|
+
if (strict || !shouldSkip(typeOf(entry)))
|
|
57670
|
+
entries.push(pair(entry));
|
|
57671
|
+
}
|
|
57672
|
+
return index;
|
|
57673
|
+
}
|
|
57674
|
+
}
|
|
57675
|
+
const { message } = value;
|
|
57676
|
+
return as([TYPE, { name: type, message }], value);
|
|
57677
|
+
};
|
|
57678
|
+
return pair;
|
|
57679
|
+
};
|
|
57680
|
+
var serialize = (value, { json, lossy } = {}) => {
|
|
57681
|
+
const _ = [];
|
|
57682
|
+
return serializer(!(json || lossy), !!json, /* @__PURE__ */ new Map(), _)(value), _;
|
|
57683
|
+
};
|
|
57684
|
+
|
|
57685
|
+
// ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/index.js
|
|
57686
|
+
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));
|
|
57687
|
+
|
|
57466
57688
|
// src/codegen/transforms/fragmentVariables.ts
|
|
57467
57689
|
var graphql4 = __toESM(require_graphql2(), 1);
|
|
57468
57690
|
|
|
@@ -57610,100 +57832,106 @@ function inlineFragmentArgs({
|
|
|
57610
57832
|
filepath,
|
|
57611
57833
|
document
|
|
57612
57834
|
).reduce((acc, arg) => ({ ...acc, [arg.name]: arg }), {});
|
|
57613
|
-
const result =
|
|
57614
|
-
|
|
57615
|
-
|
|
57616
|
-
|
|
57617
|
-
|
|
57618
|
-
|
|
57619
|
-
|
|
57620
|
-
|
|
57621
|
-
|
|
57622
|
-
|
|
57623
|
-
|
|
57624
|
-
|
|
57625
|
-
|
|
57626
|
-
|
|
57627
|
-
visitedFragments.
|
|
57628
|
-
|
|
57629
|
-
|
|
57630
|
-
|
|
57631
|
-
if (!args[field]) {
|
|
57632
|
-
args[field] = value;
|
|
57633
|
-
}
|
|
57634
|
-
}
|
|
57635
|
-
generatedFragments[newFragmentName] = inlineFragmentArgs({
|
|
57636
|
-
config: config2,
|
|
57835
|
+
const result = esm_default(
|
|
57836
|
+
graphql4.visit(document, {
|
|
57837
|
+
FragmentSpread(node) {
|
|
57838
|
+
if (!fragmentDefinitions[node.name.value]) {
|
|
57839
|
+
throw new Error("Could not find definition for fragment" + node.name.value);
|
|
57840
|
+
}
|
|
57841
|
+
const { definition } = fragmentDefinitions[node.name.value];
|
|
57842
|
+
let { args, hash } = collectWithArguments(config2, filepath, node, scope);
|
|
57843
|
+
const newFragmentName = `${node.name.value}${hash}`;
|
|
57844
|
+
config2.registerFragmentVariablesHash({
|
|
57845
|
+
hash: newFragmentName,
|
|
57846
|
+
fragment: node.name.value,
|
|
57847
|
+
args
|
|
57848
|
+
});
|
|
57849
|
+
if (!visitedFragments.has(newFragmentName)) {
|
|
57850
|
+
visitedFragments.add(newFragmentName);
|
|
57851
|
+
const defaultArguments = collectDefaultArgumentValues(
|
|
57852
|
+
config2,
|
|
57637
57853
|
filepath,
|
|
57638
|
-
|
|
57639
|
-
document: fragmentDefinitions[node.name.value].definition,
|
|
57640
|
-
generatedFragments,
|
|
57641
|
-
visitedFragments,
|
|
57642
|
-
scope: args,
|
|
57643
|
-
newName: newFragmentName
|
|
57644
|
-
});
|
|
57645
|
-
} else {
|
|
57646
|
-
const doc = fragmentDefinitions[node.name.value].document;
|
|
57647
|
-
const definitionIndex = doc.document.definitions.findIndex(
|
|
57648
|
-
(definition2) => definition2.kind === "FragmentDefinition" && definition2.name.value === node.name.value
|
|
57854
|
+
definition
|
|
57649
57855
|
);
|
|
57650
|
-
|
|
57651
|
-
|
|
57652
|
-
|
|
57653
|
-
|
|
57856
|
+
if (args) {
|
|
57857
|
+
for (const [field, value] of Object.entries(defaultArguments || {})) {
|
|
57858
|
+
if (!args[field]) {
|
|
57859
|
+
args[field] = value;
|
|
57860
|
+
}
|
|
57861
|
+
}
|
|
57862
|
+
generatedFragments[newFragmentName] = inlineFragmentArgs({
|
|
57654
57863
|
config: config2,
|
|
57655
57864
|
filepath,
|
|
57656
57865
|
fragmentDefinitions,
|
|
57657
57866
|
document: fragmentDefinitions[node.name.value].definition,
|
|
57658
57867
|
generatedFragments,
|
|
57659
57868
|
visitedFragments,
|
|
57660
|
-
scope:
|
|
57661
|
-
newName:
|
|
57662
|
-
})
|
|
57663
|
-
|
|
57664
|
-
|
|
57665
|
-
|
|
57666
|
-
|
|
57667
|
-
|
|
57869
|
+
scope: args,
|
|
57870
|
+
newName: newFragmentName
|
|
57871
|
+
});
|
|
57872
|
+
} else {
|
|
57873
|
+
const doc = fragmentDefinitions[node.name.value].document;
|
|
57874
|
+
const definitionIndex = doc.document.definitions.findIndex(
|
|
57875
|
+
(definition2) => definition2.kind === "FragmentDefinition" && definition2.name.value === node.name.value
|
|
57876
|
+
);
|
|
57877
|
+
const localDefinitions = [...doc.document.definitions];
|
|
57878
|
+
localDefinitions.splice(definitionIndex, 1);
|
|
57879
|
+
localDefinitions.push(
|
|
57880
|
+
inlineFragmentArgs({
|
|
57881
|
+
config: config2,
|
|
57882
|
+
filepath,
|
|
57883
|
+
fragmentDefinitions,
|
|
57884
|
+
document: fragmentDefinitions[node.name.value].definition,
|
|
57885
|
+
generatedFragments,
|
|
57886
|
+
visitedFragments,
|
|
57887
|
+
scope: defaultArguments,
|
|
57888
|
+
newName: ""
|
|
57889
|
+
})
|
|
57890
|
+
);
|
|
57891
|
+
doc.document = {
|
|
57892
|
+
...doc.document,
|
|
57893
|
+
definitions: localDefinitions
|
|
57894
|
+
};
|
|
57895
|
+
}
|
|
57896
|
+
if (node.name.value !== newFragmentName) {
|
|
57897
|
+
return {
|
|
57898
|
+
...node,
|
|
57899
|
+
name: {
|
|
57900
|
+
kind: "Name",
|
|
57901
|
+
value: newFragmentName
|
|
57902
|
+
}
|
|
57903
|
+
};
|
|
57904
|
+
}
|
|
57905
|
+
}
|
|
57906
|
+
},
|
|
57907
|
+
Argument(node) {
|
|
57908
|
+
const value = node.value;
|
|
57909
|
+
if (value.kind !== "Variable") {
|
|
57910
|
+
return;
|
|
57911
|
+
}
|
|
57912
|
+
if (!scope) {
|
|
57913
|
+
throw new HoudiniError({
|
|
57914
|
+
filepath,
|
|
57915
|
+
message: node.name.value + " is not defined in the current scope: " + JSON.stringify(scope)
|
|
57916
|
+
});
|
|
57668
57917
|
}
|
|
57669
|
-
|
|
57918
|
+
const newValue = scope[value.name.value];
|
|
57919
|
+
if (newValue) {
|
|
57670
57920
|
return {
|
|
57671
57921
|
...node,
|
|
57672
|
-
|
|
57673
|
-
kind: "Name",
|
|
57674
|
-
value: newFragmentName
|
|
57675
|
-
}
|
|
57922
|
+
value: newValue
|
|
57676
57923
|
};
|
|
57677
57924
|
}
|
|
57925
|
+
if (definitionArgs[value.name.value] && definitionArgs[value.name.value].required) {
|
|
57926
|
+
throw new HoudiniError({
|
|
57927
|
+
filepath,
|
|
57928
|
+
message: "Missing value for required arg: " + value.name.value
|
|
57929
|
+
});
|
|
57930
|
+
}
|
|
57931
|
+
return null;
|
|
57678
57932
|
}
|
|
57679
|
-
}
|
|
57680
|
-
|
|
57681
|
-
const value = node.value;
|
|
57682
|
-
if (value.kind !== "Variable") {
|
|
57683
|
-
return;
|
|
57684
|
-
}
|
|
57685
|
-
if (!scope) {
|
|
57686
|
-
throw new HoudiniError({
|
|
57687
|
-
filepath,
|
|
57688
|
-
message: node.name.value + " is not defined in the current scope: " + JSON.stringify(scope)
|
|
57689
|
-
});
|
|
57690
|
-
}
|
|
57691
|
-
const newValue = scope[value.name.value];
|
|
57692
|
-
if (newValue) {
|
|
57693
|
-
return {
|
|
57694
|
-
...node,
|
|
57695
|
-
value: newValue
|
|
57696
|
-
};
|
|
57697
|
-
}
|
|
57698
|
-
if (definitionArgs[value.name.value] && definitionArgs[value.name.value].required) {
|
|
57699
|
-
throw new HoudiniError({
|
|
57700
|
-
filepath,
|
|
57701
|
-
message: "Missing value for required arg: " + value.name.value
|
|
57702
|
-
});
|
|
57703
|
-
}
|
|
57704
|
-
return null;
|
|
57705
|
-
}
|
|
57706
|
-
});
|
|
57933
|
+
})
|
|
57934
|
+
);
|
|
57707
57935
|
if (newName) {
|
|
57708
57936
|
result.name = {
|
|
57709
57937
|
kind: graphql4.Kind.NAME,
|
|
@@ -58419,7 +58647,7 @@ async function paginate(config2, documents) {
|
|
|
58419
58647
|
]
|
|
58420
58648
|
}
|
|
58421
58649
|
];
|
|
58422
|
-
const
|
|
58650
|
+
const keys2 = config2.keyFieldsForType(!nodeQuery ? config2.schema.getQueryType()?.name || "" : fragment2).flatMap((key) => {
|
|
58423
58651
|
if (fragment2 === config2.schema.getQueryType()?.name) {
|
|
58424
58652
|
return [];
|
|
58425
58653
|
}
|
|
@@ -58469,7 +58697,7 @@ async function paginate(config2, documents) {
|
|
|
58469
58697
|
}
|
|
58470
58698
|
})
|
|
58471
58699
|
).concat(
|
|
58472
|
-
!nodeQuery ? [] :
|
|
58700
|
+
!nodeQuery ? [] : keys2.map(
|
|
58473
58701
|
(key) => ({
|
|
58474
58702
|
kind: graphql9.Kind.VARIABLE_DEFINITION,
|
|
58475
58703
|
type: key.type,
|
|
@@ -58492,7 +58720,7 @@ async function paginate(config2, documents) {
|
|
|
58492
58720
|
kind: graphql9.Kind.NAME,
|
|
58493
58721
|
value: typeConfig?.resolve?.queryField || "node"
|
|
58494
58722
|
},
|
|
58495
|
-
["arguments"]:
|
|
58723
|
+
["arguments"]: keys2.map((key) => ({
|
|
58496
58724
|
kind: graphql9.Kind.ARGUMENT,
|
|
58497
58725
|
name: {
|
|
58498
58726
|
kind: graphql9.Kind.NAME,
|
|
@@ -59186,12 +59414,24 @@ function prepareSelection({
|
|
|
59186
59414
|
}
|
|
59187
59415
|
const typeName = fieldType.toString();
|
|
59188
59416
|
const pathSoFar = path2.concat(attributeName);
|
|
59189
|
-
const
|
|
59417
|
+
const keys2 = config2.keyFieldsForType(rootType);
|
|
59190
59418
|
let fieldObj = {
|
|
59191
59419
|
type: typeName,
|
|
59192
59420
|
keyRaw: fieldKey(config2, field)
|
|
59193
59421
|
};
|
|
59194
|
-
if (
|
|
59422
|
+
if (field.directives && field.directives.length > 0) {
|
|
59423
|
+
fieldObj.directives = field.directives?.map((directive) => ({
|
|
59424
|
+
name: directive.name.value,
|
|
59425
|
+
arguments: (directive.arguments ?? []).reduce(
|
|
59426
|
+
(acc, arg) => ({
|
|
59427
|
+
...acc,
|
|
59428
|
+
[arg.name.value]: config2.serializeValueMap({ field: arg.value })["field"]
|
|
59429
|
+
}),
|
|
59430
|
+
{}
|
|
59431
|
+
)
|
|
59432
|
+
}));
|
|
59433
|
+
}
|
|
59434
|
+
if (keys2.includes(field.name.value)) {
|
|
59195
59435
|
fieldObj.visible = true;
|
|
59196
59436
|
}
|
|
59197
59437
|
if (nullable) {
|
|
@@ -59416,12 +59656,7 @@ function artifactGenerator(stats) {
|
|
|
59416
59656
|
writeIndexFile(config2, docs)
|
|
59417
59657
|
].concat(
|
|
59418
59658
|
docs.map(async (doc) => {
|
|
59419
|
-
const {
|
|
59420
|
-
document,
|
|
59421
|
-
name,
|
|
59422
|
-
generateArtifact,
|
|
59423
|
-
originalParsed
|
|
59424
|
-
} = doc;
|
|
59659
|
+
const { document, name, generateArtifact, originalParsed, originalString } = doc;
|
|
59425
59660
|
if (!generateArtifact) {
|
|
59426
59661
|
return;
|
|
59427
59662
|
}
|
|
@@ -60682,10 +60917,10 @@ function typeDefinitions(config2, body, docs, returnType) {
|
|
|
60682
60917
|
typeName = "__ROOT__";
|
|
60683
60918
|
}
|
|
60684
60919
|
let idFields = AST12.tsNeverKeyword();
|
|
60685
|
-
const
|
|
60686
|
-
if (graphql18.isObjectType(type) &&
|
|
60920
|
+
const keys2 = keyFieldsForType(config2.configFile, type.name);
|
|
60921
|
+
if (graphql18.isObjectType(type) && keys2.length > 0 && keys2.every((key) => type.getFields()[key])) {
|
|
60687
60922
|
idFields = AST12.tsTypeLiteral(
|
|
60688
|
-
|
|
60923
|
+
keys2.map((key) => {
|
|
60689
60924
|
const fieldType = type.getFields()[key];
|
|
60690
60925
|
const unwrapped = unwrapType(config2, fieldType.type);
|
|
60691
60926
|
return AST12.tsPropertySignature(
|