houdini 1.1.4-react.0 → 1.1.5
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 +603 -442
- package/build/cmd-esm/index.js +603 -442
- package/build/codegen/transforms/fragmentVariables.d.ts +0 -11
- package/build/codegen-cjs/index.js +572 -398
- package/build/codegen-esm/index.js +572 -398
- package/build/lib/config.d.ts +1 -1
- package/build/lib/parse.d.ts +1 -2
- package/build/lib/types.d.ts +1 -4
- package/build/lib-cjs/index.js +188 -196
- package/build/lib-esm/index.js +188 -196
- package/build/runtime/cache/cache.d.ts +4 -2
- package/build/runtime/client/documentStore.d.ts +0 -3
- package/build/runtime/client/index.d.ts +1 -1
- package/build/runtime/lib/types.d.ts +4 -46
- package/build/runtime-cjs/cache/cache.d.ts +4 -2
- package/build/runtime-cjs/cache/cache.js +37 -14
- package/build/runtime-cjs/client/documentStore.d.ts +0 -3
- package/build/runtime-cjs/client/documentStore.js +6 -11
- package/build/runtime-cjs/client/index.d.ts +1 -1
- package/build/runtime-cjs/client/plugins/cache.js +3 -5
- package/build/runtime-cjs/client/plugins/fragment.js +1 -8
- package/build/runtime-cjs/client/plugins/query.js +1 -2
- package/build/runtime-cjs/lib/types.d.ts +4 -46
- package/build/runtime-esm/cache/cache.d.ts +4 -2
- package/build/runtime-esm/cache/cache.js +37 -14
- package/build/runtime-esm/client/documentStore.d.ts +0 -3
- package/build/runtime-esm/client/documentStore.js +6 -11
- package/build/runtime-esm/client/index.d.ts +1 -1
- package/build/runtime-esm/client/plugins/cache.js +3 -5
- package/build/runtime-esm/client/plugins/fragment.js +1 -8
- package/build/runtime-esm/client/plugins/query.js +1 -2
- package/build/runtime-esm/lib/types.d.ts +4 -46
- package/build/test-cjs/index.js +594 -424
- package/build/test-esm/index.js +594 -424
- package/build/vite-cjs/index.js +613 -450
- package/build/vite-esm/index.js +613 -450
- package/package.json +3 -1
- package/build/runtime/lib/pageInfo.d.ts +0 -7
- package/build/runtime/lib/pagination.d.ts +0 -29
- package/build/runtime-cjs/lib/pageInfo.d.ts +0 -7
- package/build/runtime-cjs/lib/pageInfo.js +0 -79
- package/build/runtime-cjs/lib/pagination.d.ts +0 -29
- package/build/runtime-cjs/lib/pagination.js +0 -231
- package/build/runtime-esm/lib/pageInfo.d.ts +0 -7
- package/build/runtime-esm/lib/pageInfo.js +0 -52
- package/build/runtime-esm/lib/pagination.d.ts +0 -29
- package/build/runtime-esm/lib/pagination.js +0 -206
package/build/test-esm/index.js
CHANGED
|
@@ -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
|
});
|
|
@@ -2403,7 +2403,7 @@ var require_visitor = __commonJS({
|
|
|
2403
2403
|
Object.defineProperty(exports, "__esModule", {
|
|
2404
2404
|
value: true
|
|
2405
2405
|
});
|
|
2406
|
-
exports.visit =
|
|
2406
|
+
exports.visit = visit12;
|
|
2407
2407
|
exports.visitInParallel = visitInParallel;
|
|
2408
2408
|
exports.getVisitFn = getVisitFn;
|
|
2409
2409
|
exports.BREAK = exports.QueryDocumentKeys = void 0;
|
|
@@ -2466,11 +2466,11 @@ var require_visitor = __commonJS({
|
|
|
2466
2466
|
exports.QueryDocumentKeys = QueryDocumentKeys;
|
|
2467
2467
|
var BREAK = Object.freeze({});
|
|
2468
2468
|
exports.BREAK = BREAK;
|
|
2469
|
-
function
|
|
2469
|
+
function visit12(root, visitor) {
|
|
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++) {
|
|
@@ -19350,9 +19350,9 @@ var require_legacy_streams = __commonJS({
|
|
|
19350
19350
|
this.mode = 438;
|
|
19351
19351
|
this.bufferSize = 64 * 1024;
|
|
19352
19352
|
options = options || {};
|
|
19353
|
-
var
|
|
19354
|
-
for (var index = 0, length =
|
|
19355
|
-
var key =
|
|
19353
|
+
var keys2 = Object.keys(options);
|
|
19354
|
+
for (var index = 0, length = keys2.length; index < length; index++) {
|
|
19355
|
+
var key = keys2[index];
|
|
19356
19356
|
this[key] = options[key];
|
|
19357
19357
|
}
|
|
19358
19358
|
if (this.encoding)
|
|
@@ -19400,9 +19400,9 @@ var require_legacy_streams = __commonJS({
|
|
|
19400
19400
|
this.mode = 438;
|
|
19401
19401
|
this.bytesWritten = 0;
|
|
19402
19402
|
options = options || {};
|
|
19403
|
-
var
|
|
19404
|
-
for (var index = 0, length =
|
|
19405
|
-
var key =
|
|
19403
|
+
var keys2 = Object.keys(options);
|
|
19404
|
+
for (var index = 0, length = keys2.length; index < length; index++) {
|
|
19405
|
+
var key = keys2[index];
|
|
19406
19406
|
this[key] = options[key];
|
|
19407
19407
|
}
|
|
19408
19408
|
if (this.start !== void 0) {
|
|
@@ -22619,10 +22619,10 @@ var require_glob = __commonJS({
|
|
|
22619
22619
|
if (add === null || typeof add !== "object") {
|
|
22620
22620
|
return origin;
|
|
22621
22621
|
}
|
|
22622
|
-
var
|
|
22623
|
-
var i =
|
|
22622
|
+
var keys2 = Object.keys(add);
|
|
22623
|
+
var i = keys2.length;
|
|
22624
22624
|
while (i--) {
|
|
22625
|
-
origin[
|
|
22625
|
+
origin[keys2[i]] = add[keys2[i]];
|
|
22626
22626
|
}
|
|
22627
22627
|
return origin;
|
|
22628
22628
|
}
|
|
@@ -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
|
}
|
|
@@ -37672,109 +37672,6 @@ var require_lib3 = __commonJS({
|
|
|
37672
37672
|
}
|
|
37673
37673
|
});
|
|
37674
37674
|
|
|
37675
|
-
// ../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js
|
|
37676
|
-
var require_cjs = __commonJS({
|
|
37677
|
-
"../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module) {
|
|
37678
|
-
"use strict";
|
|
37679
|
-
var isMergeableObject = function isMergeableObject2(value) {
|
|
37680
|
-
return isNonNullObject(value) && !isSpecial(value);
|
|
37681
|
-
};
|
|
37682
|
-
function isNonNullObject(value) {
|
|
37683
|
-
return !!value && typeof value === "object";
|
|
37684
|
-
}
|
|
37685
|
-
function isSpecial(value) {
|
|
37686
|
-
var stringValue = Object.prototype.toString.call(value);
|
|
37687
|
-
return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
|
|
37688
|
-
}
|
|
37689
|
-
var canUseSymbol = typeof Symbol === "function" && Symbol.for;
|
|
37690
|
-
var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
|
|
37691
|
-
function isReactElement(value) {
|
|
37692
|
-
return value.$$typeof === REACT_ELEMENT_TYPE;
|
|
37693
|
-
}
|
|
37694
|
-
function emptyTarget(val) {
|
|
37695
|
-
return Array.isArray(val) ? [] : {};
|
|
37696
|
-
}
|
|
37697
|
-
function cloneUnlessOtherwiseSpecified(value, options) {
|
|
37698
|
-
return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
|
|
37699
|
-
}
|
|
37700
|
-
function defaultArrayMerge(target, source, options) {
|
|
37701
|
-
return target.concat(source).map(function(element) {
|
|
37702
|
-
return cloneUnlessOtherwiseSpecified(element, options);
|
|
37703
|
-
});
|
|
37704
|
-
}
|
|
37705
|
-
function getMergeFunction(key, options) {
|
|
37706
|
-
if (!options.customMerge) {
|
|
37707
|
-
return deepmerge;
|
|
37708
|
-
}
|
|
37709
|
-
var customMerge = options.customMerge(key);
|
|
37710
|
-
return typeof customMerge === "function" ? customMerge : deepmerge;
|
|
37711
|
-
}
|
|
37712
|
-
function getEnumerableOwnPropertySymbols(target) {
|
|
37713
|
-
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
|
|
37714
|
-
return target.propertyIsEnumerable(symbol);
|
|
37715
|
-
}) : [];
|
|
37716
|
-
}
|
|
37717
|
-
function getKeys(target) {
|
|
37718
|
-
return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
|
|
37719
|
-
}
|
|
37720
|
-
function propertyIsOnObject(object, property) {
|
|
37721
|
-
try {
|
|
37722
|
-
return property in object;
|
|
37723
|
-
} catch (_) {
|
|
37724
|
-
return false;
|
|
37725
|
-
}
|
|
37726
|
-
}
|
|
37727
|
-
function propertyIsUnsafe(target, key) {
|
|
37728
|
-
return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
|
|
37729
|
-
}
|
|
37730
|
-
function mergeObject(target, source, options) {
|
|
37731
|
-
var destination = {};
|
|
37732
|
-
if (options.isMergeableObject(target)) {
|
|
37733
|
-
getKeys(target).forEach(function(key) {
|
|
37734
|
-
destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
|
|
37735
|
-
});
|
|
37736
|
-
}
|
|
37737
|
-
getKeys(source).forEach(function(key) {
|
|
37738
|
-
if (propertyIsUnsafe(target, key)) {
|
|
37739
|
-
return;
|
|
37740
|
-
}
|
|
37741
|
-
if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
|
|
37742
|
-
destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
|
|
37743
|
-
} else {
|
|
37744
|
-
destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
|
|
37745
|
-
}
|
|
37746
|
-
});
|
|
37747
|
-
return destination;
|
|
37748
|
-
}
|
|
37749
|
-
function deepmerge(target, source, options) {
|
|
37750
|
-
options = options || {};
|
|
37751
|
-
options.arrayMerge = options.arrayMerge || defaultArrayMerge;
|
|
37752
|
-
options.isMergeableObject = options.isMergeableObject || isMergeableObject;
|
|
37753
|
-
options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
|
|
37754
|
-
var sourceIsArray = Array.isArray(source);
|
|
37755
|
-
var targetIsArray = Array.isArray(target);
|
|
37756
|
-
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
|
|
37757
|
-
if (!sourceAndTargetTypesMatch) {
|
|
37758
|
-
return cloneUnlessOtherwiseSpecified(source, options);
|
|
37759
|
-
} else if (sourceIsArray) {
|
|
37760
|
-
return options.arrayMerge(target, source, options);
|
|
37761
|
-
} else {
|
|
37762
|
-
return mergeObject(target, source, options);
|
|
37763
|
-
}
|
|
37764
|
-
}
|
|
37765
|
-
deepmerge.all = function deepmergeAll(array, options) {
|
|
37766
|
-
if (!Array.isArray(array)) {
|
|
37767
|
-
throw new Error("first argument should be an array");
|
|
37768
|
-
}
|
|
37769
|
-
return array.reduce(function(prev, next) {
|
|
37770
|
-
return deepmerge(prev, next, options);
|
|
37771
|
-
}, {});
|
|
37772
|
-
};
|
|
37773
|
-
var deepmerge_1 = deepmerge;
|
|
37774
|
-
module.exports = deepmerge_1;
|
|
37775
|
-
}
|
|
37776
|
-
});
|
|
37777
|
-
|
|
37778
37675
|
// ../../node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.js
|
|
37779
37676
|
var require_tslib = __commonJS({
|
|
37780
37677
|
"../../node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.js"(exports, module) {
|
|
@@ -40044,7 +39941,7 @@ var require_path_visitor = __commonJS({
|
|
|
40044
39941
|
}
|
|
40045
39942
|
return target;
|
|
40046
39943
|
}
|
|
40047
|
-
PathVisitor.visit = function
|
|
39944
|
+
PathVisitor.visit = function visit12(node, methods) {
|
|
40048
39945
|
return PathVisitor.fromMethodsObject(methods).visit(node);
|
|
40049
39946
|
};
|
|
40050
39947
|
var PVp = PathVisitor.prototype;
|
|
@@ -40235,7 +40132,7 @@ var require_path_visitor = __commonJS({
|
|
|
40235
40132
|
this.needToCallTraverse = false;
|
|
40236
40133
|
return visitChildren(path2, PathVisitor.fromMethodsObject(newVisitor || this.visitor));
|
|
40237
40134
|
};
|
|
40238
|
-
sharedContextProtoMethods.visit = function
|
|
40135
|
+
sharedContextProtoMethods.visit = function visit12(path2, newVisitor) {
|
|
40239
40136
|
if (!(this instanceof this.Context)) {
|
|
40240
40137
|
throw new Error("");
|
|
40241
40138
|
}
|
|
@@ -41628,7 +41525,7 @@ var require_main = __commonJS({
|
|
|
41628
41525
|
var someField = _a.someField;
|
|
41629
41526
|
var Type = _a.Type;
|
|
41630
41527
|
var use = _a.use;
|
|
41631
|
-
var
|
|
41528
|
+
var visit12 = _a.visit;
|
|
41632
41529
|
exports.astNodesAreEquivalent = astNodesAreEquivalent;
|
|
41633
41530
|
exports.builders = builders;
|
|
41634
41531
|
exports.builtInTypes = builtInTypes;
|
|
@@ -41645,7 +41542,7 @@ var require_main = __commonJS({
|
|
|
41645
41542
|
exports.someField = someField;
|
|
41646
41543
|
exports.Type = Type;
|
|
41647
41544
|
exports.use = use;
|
|
41648
|
-
exports.visit =
|
|
41545
|
+
exports.visit = visit12;
|
|
41649
41546
|
Object.assign(namedTypes_1.namedTypes, n);
|
|
41650
41547
|
}
|
|
41651
41548
|
});
|
|
@@ -43433,10 +43330,10 @@ var require_util2 = __commonJS({
|
|
|
43433
43330
|
var result = {};
|
|
43434
43331
|
var argc = args.length;
|
|
43435
43332
|
for (var i = 0; i < argc; ++i) {
|
|
43436
|
-
var
|
|
43437
|
-
var keyCount =
|
|
43333
|
+
var keys2 = Object.keys(args[i]);
|
|
43334
|
+
var keyCount = keys2.length;
|
|
43438
43335
|
for (var j = 0; j < keyCount; ++j) {
|
|
43439
|
-
result[
|
|
43336
|
+
result[keys2[j]] = true;
|
|
43440
43337
|
}
|
|
43441
43338
|
}
|
|
43442
43339
|
return result;
|
|
@@ -51096,10 +50993,10 @@ var require_parser2 = __commonJS({
|
|
|
51096
50993
|
loc.indent = newIndent;
|
|
51097
50994
|
this.findTokenRange(loc);
|
|
51098
50995
|
}
|
|
51099
|
-
var
|
|
51100
|
-
var keyCount =
|
|
50996
|
+
var keys2 = Object.keys(node);
|
|
50997
|
+
var keyCount = keys2.length;
|
|
51101
50998
|
for (var i = 0; i < keyCount; ++i) {
|
|
51102
|
-
var key =
|
|
50999
|
+
var key = keys2[i];
|
|
51103
51000
|
if (key === "loc") {
|
|
51104
51001
|
copy[key] = node[key];
|
|
51105
51002
|
} else if (key === "tokens" && node.type === "File") {
|
|
@@ -51858,13 +51755,13 @@ var require_patcher = __commonJS({
|
|
|
51858
51755
|
if (newPath.needsParens() && !oldPath.hasParens()) {
|
|
51859
51756
|
return false;
|
|
51860
51757
|
}
|
|
51861
|
-
var
|
|
51758
|
+
var keys2 = (0, util_1.getUnionOfKeys)(oldNode, newNode);
|
|
51862
51759
|
if (oldNode.type === "File" || newNode.type === "File") {
|
|
51863
|
-
delete
|
|
51760
|
+
delete keys2.tokens;
|
|
51864
51761
|
}
|
|
51865
|
-
delete
|
|
51762
|
+
delete keys2.loc;
|
|
51866
51763
|
var originalReprintCount = reprints.length;
|
|
51867
|
-
for (var k in
|
|
51764
|
+
for (var k in keys2) {
|
|
51868
51765
|
if (k.charAt(0) === "_") {
|
|
51869
51766
|
continue;
|
|
51870
51767
|
}
|
|
@@ -54107,6 +54004,109 @@ var require_main2 = __commonJS({
|
|
|
54107
54004
|
}
|
|
54108
54005
|
});
|
|
54109
54006
|
|
|
54007
|
+
// ../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js
|
|
54008
|
+
var require_cjs = __commonJS({
|
|
54009
|
+
"../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module) {
|
|
54010
|
+
"use strict";
|
|
54011
|
+
var isMergeableObject = function isMergeableObject2(value) {
|
|
54012
|
+
return isNonNullObject(value) && !isSpecial(value);
|
|
54013
|
+
};
|
|
54014
|
+
function isNonNullObject(value) {
|
|
54015
|
+
return !!value && typeof value === "object";
|
|
54016
|
+
}
|
|
54017
|
+
function isSpecial(value) {
|
|
54018
|
+
var stringValue = Object.prototype.toString.call(value);
|
|
54019
|
+
return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
|
|
54020
|
+
}
|
|
54021
|
+
var canUseSymbol = typeof Symbol === "function" && Symbol.for;
|
|
54022
|
+
var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
|
|
54023
|
+
function isReactElement(value) {
|
|
54024
|
+
return value.$$typeof === REACT_ELEMENT_TYPE;
|
|
54025
|
+
}
|
|
54026
|
+
function emptyTarget(val) {
|
|
54027
|
+
return Array.isArray(val) ? [] : {};
|
|
54028
|
+
}
|
|
54029
|
+
function cloneUnlessOtherwiseSpecified(value, options) {
|
|
54030
|
+
return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
|
|
54031
|
+
}
|
|
54032
|
+
function defaultArrayMerge(target, source, options) {
|
|
54033
|
+
return target.concat(source).map(function(element) {
|
|
54034
|
+
return cloneUnlessOtherwiseSpecified(element, options);
|
|
54035
|
+
});
|
|
54036
|
+
}
|
|
54037
|
+
function getMergeFunction(key, options) {
|
|
54038
|
+
if (!options.customMerge) {
|
|
54039
|
+
return deepmerge;
|
|
54040
|
+
}
|
|
54041
|
+
var customMerge = options.customMerge(key);
|
|
54042
|
+
return typeof customMerge === "function" ? customMerge : deepmerge;
|
|
54043
|
+
}
|
|
54044
|
+
function getEnumerableOwnPropertySymbols(target) {
|
|
54045
|
+
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
|
|
54046
|
+
return target.propertyIsEnumerable(symbol);
|
|
54047
|
+
}) : [];
|
|
54048
|
+
}
|
|
54049
|
+
function getKeys(target) {
|
|
54050
|
+
return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
|
|
54051
|
+
}
|
|
54052
|
+
function propertyIsOnObject(object, property) {
|
|
54053
|
+
try {
|
|
54054
|
+
return property in object;
|
|
54055
|
+
} catch (_) {
|
|
54056
|
+
return false;
|
|
54057
|
+
}
|
|
54058
|
+
}
|
|
54059
|
+
function propertyIsUnsafe(target, key) {
|
|
54060
|
+
return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
|
|
54061
|
+
}
|
|
54062
|
+
function mergeObject(target, source, options) {
|
|
54063
|
+
var destination = {};
|
|
54064
|
+
if (options.isMergeableObject(target)) {
|
|
54065
|
+
getKeys(target).forEach(function(key) {
|
|
54066
|
+
destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
|
|
54067
|
+
});
|
|
54068
|
+
}
|
|
54069
|
+
getKeys(source).forEach(function(key) {
|
|
54070
|
+
if (propertyIsUnsafe(target, key)) {
|
|
54071
|
+
return;
|
|
54072
|
+
}
|
|
54073
|
+
if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
|
|
54074
|
+
destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
|
|
54075
|
+
} else {
|
|
54076
|
+
destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
|
|
54077
|
+
}
|
|
54078
|
+
});
|
|
54079
|
+
return destination;
|
|
54080
|
+
}
|
|
54081
|
+
function deepmerge(target, source, options) {
|
|
54082
|
+
options = options || {};
|
|
54083
|
+
options.arrayMerge = options.arrayMerge || defaultArrayMerge;
|
|
54084
|
+
options.isMergeableObject = options.isMergeableObject || isMergeableObject;
|
|
54085
|
+
options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
|
|
54086
|
+
var sourceIsArray = Array.isArray(source);
|
|
54087
|
+
var targetIsArray = Array.isArray(target);
|
|
54088
|
+
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
|
|
54089
|
+
if (!sourceAndTargetTypesMatch) {
|
|
54090
|
+
return cloneUnlessOtherwiseSpecified(source, options);
|
|
54091
|
+
} else if (sourceIsArray) {
|
|
54092
|
+
return options.arrayMerge(target, source, options);
|
|
54093
|
+
} else {
|
|
54094
|
+
return mergeObject(target, source, options);
|
|
54095
|
+
}
|
|
54096
|
+
}
|
|
54097
|
+
deepmerge.all = function deepmergeAll(array, options) {
|
|
54098
|
+
if (!Array.isArray(array)) {
|
|
54099
|
+
throw new Error("first argument should be an array");
|
|
54100
|
+
}
|
|
54101
|
+
return array.reduce(function(prev, next) {
|
|
54102
|
+
return deepmerge(prev, next, options);
|
|
54103
|
+
}, {});
|
|
54104
|
+
};
|
|
54105
|
+
var deepmerge_1 = deepmerge;
|
|
54106
|
+
module.exports = deepmerge_1;
|
|
54107
|
+
}
|
|
54108
|
+
});
|
|
54109
|
+
|
|
54110
54110
|
// src/test/index.ts
|
|
54111
54111
|
var graphql25 = __toESM(require_graphql2(), 1);
|
|
54112
54112
|
var import_memfs2 = __toESM(require_lib(), 1);
|
|
@@ -54298,9 +54298,9 @@ var fragmentKey = " $fragments";
|
|
|
54298
54298
|
|
|
54299
54299
|
// src/runtime/lib/key.ts
|
|
54300
54300
|
var computeKey = ({ field, args }) => {
|
|
54301
|
-
const
|
|
54302
|
-
|
|
54303
|
-
return args &&
|
|
54301
|
+
const keys2 = Object.keys(args ?? {});
|
|
54302
|
+
keys2.sort();
|
|
54303
|
+
return args && keys2.length > 0 ? `${field}(${keys2.map((key) => `${key}: ${stringifyObjectWithNoQuotesOnKeys(args[key])}`).join(", ")})` : field;
|
|
54304
54304
|
};
|
|
54305
54305
|
var stringifyObjectWithNoQuotesOnKeys = (obj_from_json) => {
|
|
54306
54306
|
if (Array.isArray(obj_from_json)) {
|
|
@@ -56252,7 +56252,8 @@ var CacheInternal = class {
|
|
|
56252
56252
|
parent = rootID,
|
|
56253
56253
|
variables,
|
|
56254
56254
|
stepsFromConnection = null,
|
|
56255
|
-
ignoreMasking
|
|
56255
|
+
ignoreMasking,
|
|
56256
|
+
fullCheck = false
|
|
56256
56257
|
}) {
|
|
56257
56258
|
if (parent === null) {
|
|
56258
56259
|
return { data: null, partial: false, stale: false, hasData: true };
|
|
@@ -56277,11 +56278,28 @@ var CacheInternal = class {
|
|
|
56277
56278
|
let targetSelection = getFieldsForType(selection, typename);
|
|
56278
56279
|
for (const [
|
|
56279
56280
|
attributeName,
|
|
56280
|
-
{ type, keyRaw, selection: fieldSelection, nullable, list, visible }
|
|
56281
|
+
{ type, keyRaw, selection: fieldSelection, nullable, list, visible, directives }
|
|
56281
56282
|
] of Object.entries(targetSelection)) {
|
|
56282
|
-
if (!visible && !ignoreMasking) {
|
|
56283
|
+
if (!visible && !ignoreMasking && !fullCheck) {
|
|
56283
56284
|
continue;
|
|
56284
56285
|
}
|
|
56286
|
+
const includeDirective = directives?.find((d) => {
|
|
56287
|
+
return d.name === "include";
|
|
56288
|
+
});
|
|
56289
|
+
if (includeDirective) {
|
|
56290
|
+
if (!evaluateFragmentVariables(includeDirective.arguments, variables ?? {})["if"]) {
|
|
56291
|
+
continue;
|
|
56292
|
+
}
|
|
56293
|
+
}
|
|
56294
|
+
const skipDirective = directives?.find((d) => {
|
|
56295
|
+
return d.name === "skip";
|
|
56296
|
+
});
|
|
56297
|
+
if (skipDirective) {
|
|
56298
|
+
if (evaluateFragmentVariables(skipDirective.arguments, variables ?? {})["if"]) {
|
|
56299
|
+
continue;
|
|
56300
|
+
}
|
|
56301
|
+
}
|
|
56302
|
+
const fieldTarget = visible || ignoreMasking ? target : {};
|
|
56285
56303
|
const key = evaluateKey(keyRaw, variables);
|
|
56286
56304
|
const { value } = this.storage.get(parent, key);
|
|
56287
56305
|
const dt_field = this.staleManager.getFieldTime(parent, key);
|
|
@@ -56304,16 +56322,16 @@ var CacheInternal = class {
|
|
|
56304
56322
|
partial = true;
|
|
56305
56323
|
}
|
|
56306
56324
|
if (typeof value === "undefined" || value === null) {
|
|
56307
|
-
|
|
56325
|
+
fieldTarget[attributeName] = null;
|
|
56308
56326
|
if (typeof value !== "undefined") {
|
|
56309
56327
|
hasData = true;
|
|
56310
56328
|
}
|
|
56311
56329
|
} else if (!fieldSelection) {
|
|
56312
56330
|
const fnUnmarshal = this.config?.scalars?.[type]?.unmarshal;
|
|
56313
56331
|
if (fnUnmarshal) {
|
|
56314
|
-
|
|
56332
|
+
fieldTarget[attributeName] = fnUnmarshal(value);
|
|
56315
56333
|
} else {
|
|
56316
|
-
|
|
56334
|
+
fieldTarget[attributeName] = value;
|
|
56317
56335
|
}
|
|
56318
56336
|
hasData = true;
|
|
56319
56337
|
} else if (Array.isArray(value)) {
|
|
@@ -56322,9 +56340,10 @@ var CacheInternal = class {
|
|
|
56322
56340
|
variables,
|
|
56323
56341
|
linkedList: value,
|
|
56324
56342
|
stepsFromConnection: nextStep,
|
|
56325
|
-
ignoreMasking: !!ignoreMasking
|
|
56343
|
+
ignoreMasking: !!ignoreMasking,
|
|
56344
|
+
fullCheck
|
|
56326
56345
|
});
|
|
56327
|
-
|
|
56346
|
+
fieldTarget[attributeName] = listValue.data;
|
|
56328
56347
|
if (listValue.partial) {
|
|
56329
56348
|
partial = true;
|
|
56330
56349
|
}
|
|
@@ -56340,9 +56359,10 @@ var CacheInternal = class {
|
|
|
56340
56359
|
selection: fieldSelection,
|
|
56341
56360
|
variables,
|
|
56342
56361
|
stepsFromConnection: nextStep,
|
|
56343
|
-
ignoreMasking
|
|
56362
|
+
ignoreMasking,
|
|
56363
|
+
fullCheck
|
|
56344
56364
|
});
|
|
56345
|
-
|
|
56365
|
+
fieldTarget[attributeName] = objectFields.data;
|
|
56346
56366
|
if (objectFields.partial) {
|
|
56347
56367
|
partial = true;
|
|
56348
56368
|
}
|
|
@@ -56353,7 +56373,7 @@ var CacheInternal = class {
|
|
|
56353
56373
|
hasData = true;
|
|
56354
56374
|
}
|
|
56355
56375
|
}
|
|
56356
|
-
if (
|
|
56376
|
+
if (fieldTarget[attributeName] === null && !nullable && !embeddedCursor) {
|
|
56357
56377
|
cascadeNull = true;
|
|
56358
56378
|
}
|
|
56359
56379
|
}
|
|
@@ -56385,7 +56405,8 @@ var CacheInternal = class {
|
|
|
56385
56405
|
variables,
|
|
56386
56406
|
linkedList,
|
|
56387
56407
|
stepsFromConnection,
|
|
56388
|
-
ignoreMasking
|
|
56408
|
+
ignoreMasking,
|
|
56409
|
+
fullCheck
|
|
56389
56410
|
}) {
|
|
56390
56411
|
const result = [];
|
|
56391
56412
|
let partialData = false;
|
|
@@ -56398,7 +56419,8 @@ var CacheInternal = class {
|
|
|
56398
56419
|
variables,
|
|
56399
56420
|
linkedList: entry,
|
|
56400
56421
|
stepsFromConnection,
|
|
56401
|
-
ignoreMasking
|
|
56422
|
+
ignoreMasking,
|
|
56423
|
+
fullCheck
|
|
56402
56424
|
});
|
|
56403
56425
|
result.push(nestedValue.data);
|
|
56404
56426
|
if (nestedValue.partial) {
|
|
@@ -56420,7 +56442,8 @@ var CacheInternal = class {
|
|
|
56420
56442
|
selection: fields,
|
|
56421
56443
|
variables,
|
|
56422
56444
|
stepsFromConnection,
|
|
56423
|
-
ignoreMasking
|
|
56445
|
+
ignoreMasking,
|
|
56446
|
+
fullCheck
|
|
56424
56447
|
});
|
|
56425
56448
|
result.push(data);
|
|
56426
56449
|
if (partial) {
|
|
@@ -56619,11 +56642,10 @@ var query = documentPlugin(ArtifactKind.Query, function() {
|
|
|
56619
56642
|
cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
|
|
56620
56643
|
}
|
|
56621
56644
|
lastVariables = { ...marshalVariables(ctx) };
|
|
56622
|
-
const variables = lastVariables;
|
|
56623
56645
|
subscriptionSpec = {
|
|
56624
56646
|
rootType: ctx.artifact.rootType,
|
|
56625
56647
|
selection: ctx.artifact.selection,
|
|
56626
|
-
variables: () =>
|
|
56648
|
+
variables: () => lastVariables,
|
|
56627
56649
|
set: (newValue) => {
|
|
56628
56650
|
resolve2(ctx, {
|
|
56629
56651
|
data: newValue,
|
|
@@ -56652,17 +56674,12 @@ var query = documentPlugin(ArtifactKind.Query, function() {
|
|
|
56652
56674
|
// src/runtime/client/plugins/fragment.ts
|
|
56653
56675
|
var fragment = documentPlugin(ArtifactKind.Fragment, function() {
|
|
56654
56676
|
let subscriptionSpec = null;
|
|
56655
|
-
let lastReference = null;
|
|
56656
56677
|
return {
|
|
56657
56678
|
start(ctx, { next, resolve: resolve2, variablesChanged, marshalVariables }) {
|
|
56658
56679
|
if (!ctx.stuff.parentID) {
|
|
56659
56680
|
return next(ctx);
|
|
56660
56681
|
}
|
|
56661
|
-
|
|
56662
|
-
parent: ctx.stuff.parentID,
|
|
56663
|
-
variables: marshalVariables(ctx)
|
|
56664
|
-
};
|
|
56665
|
-
if (!ctx.cacheParams?.disableSubscriptions && (!deepEquals(lastReference, currentReference) || variablesChanged(ctx))) {
|
|
56682
|
+
if (variablesChanged(ctx) && !ctx.cacheParams?.disableSubscriptions) {
|
|
56666
56683
|
if (subscriptionSpec) {
|
|
56667
56684
|
cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
|
|
56668
56685
|
}
|
|
@@ -56685,7 +56702,6 @@ var fragment = documentPlugin(ArtifactKind.Fragment, function() {
|
|
|
56685
56702
|
}
|
|
56686
56703
|
};
|
|
56687
56704
|
cache_default.subscribe(subscriptionSpec, variables);
|
|
56688
|
-
lastReference = currentReference;
|
|
56689
56705
|
}
|
|
56690
56706
|
next(ctx);
|
|
56691
56707
|
},
|
|
@@ -56849,7 +56865,7 @@ var Config = class {
|
|
|
56849
56865
|
this.logLevel = (logLevel || LogLevel.Summary).toLowerCase();
|
|
56850
56866
|
this.defaultFragmentMasking = defaultFragmentMasking;
|
|
56851
56867
|
this.routesDir = join(this.projectRoot, "src", "routes");
|
|
56852
|
-
this.schemaPollInterval = watchSchema?.interval
|
|
56868
|
+
this.schemaPollInterval = watchSchema?.interval === void 0 ? 2e3 : watchSchema.interval;
|
|
56853
56869
|
this.schemaPollHeaders = watchSchema?.headers ?? {};
|
|
56854
56870
|
this.rootDir = join(this.projectRoot, "$houdini");
|
|
56855
56871
|
this.#fragmentVariableMaps = {};
|
|
@@ -56868,8 +56884,8 @@ var Config = class {
|
|
|
56868
56884
|
if (!apiURL) {
|
|
56869
56885
|
return "";
|
|
56870
56886
|
}
|
|
56871
|
-
const
|
|
56872
|
-
return this.processEnvValues(
|
|
56887
|
+
const env2 = await this.getEnv();
|
|
56888
|
+
return this.processEnvValues(env2, apiURL);
|
|
56873
56889
|
}
|
|
56874
56890
|
get include() {
|
|
56875
56891
|
if (this.configFile.include) {
|
|
@@ -56884,35 +56900,35 @@ var Config = class {
|
|
|
56884
56900
|
return this.configFile.plugins?.[name] ?? {};
|
|
56885
56901
|
}
|
|
56886
56902
|
async getEnv() {
|
|
56887
|
-
let
|
|
56903
|
+
let env2 = process.env;
|
|
56888
56904
|
for (const plugin2 of this.plugins) {
|
|
56889
56905
|
if (plugin2.env) {
|
|
56890
|
-
|
|
56891
|
-
...await plugin2.env({ config: this, env })
|
|
56906
|
+
env2 = {
|
|
56907
|
+
...await plugin2.env({ config: this, env: env2 })
|
|
56892
56908
|
};
|
|
56893
56909
|
}
|
|
56894
56910
|
}
|
|
56895
|
-
return
|
|
56911
|
+
return env2;
|
|
56896
56912
|
}
|
|
56897
|
-
processEnvValues(
|
|
56913
|
+
processEnvValues(env2, value) {
|
|
56898
56914
|
let headerValue;
|
|
56899
56915
|
if (typeof value === "function") {
|
|
56900
|
-
headerValue = value(
|
|
56916
|
+
headerValue = value(env2);
|
|
56901
56917
|
} else if (value.startsWith("env:")) {
|
|
56902
|
-
headerValue =
|
|
56918
|
+
headerValue = env2[value.slice("env:".length)];
|
|
56903
56919
|
} else {
|
|
56904
56920
|
headerValue = value;
|
|
56905
56921
|
}
|
|
56906
56922
|
return headerValue;
|
|
56907
56923
|
}
|
|
56908
56924
|
async pullHeaders() {
|
|
56909
|
-
const
|
|
56925
|
+
const env2 = await this.getEnv();
|
|
56910
56926
|
if (typeof this.schemaPollHeaders === "function") {
|
|
56911
|
-
return this.schemaPollHeaders(
|
|
56927
|
+
return this.schemaPollHeaders(env2);
|
|
56912
56928
|
}
|
|
56913
56929
|
const headers = Object.fromEntries(
|
|
56914
56930
|
Object.entries(this.schemaPollHeaders || {}).map(([key, value]) => {
|
|
56915
|
-
const headerValue = this.processEnvValues(
|
|
56931
|
+
const headerValue = this.processEnvValues(env2, value);
|
|
56916
56932
|
if (!headerValue) {
|
|
56917
56933
|
return [];
|
|
56918
56934
|
}
|
|
@@ -57193,17 +57209,6 @@ var Config = class {
|
|
|
57193
57209
|
}, []) ?? [];
|
|
57194
57210
|
return !defaultDirectives.includes(name) && (internalDirectives.includes(name) || this.isDeleteDirective(name));
|
|
57195
57211
|
}
|
|
57196
|
-
needsRefetchArtifact(document) {
|
|
57197
|
-
let needsArtifact = false;
|
|
57198
|
-
graphql.visit(document, {
|
|
57199
|
-
Directive: (node) => {
|
|
57200
|
-
if ([this.paginateDirective].includes(node.name.value)) {
|
|
57201
|
-
needsArtifact = true;
|
|
57202
|
-
}
|
|
57203
|
-
}
|
|
57204
|
-
});
|
|
57205
|
-
return needsArtifact;
|
|
57206
|
-
}
|
|
57207
57212
|
#fragmentVariableMaps;
|
|
57208
57213
|
registerFragmentVariablesHash({
|
|
57209
57214
|
hash,
|
|
@@ -57211,7 +57216,7 @@ var Config = class {
|
|
|
57211
57216
|
fragment: fragment2
|
|
57212
57217
|
}) {
|
|
57213
57218
|
this.#fragmentVariableMaps[hash] = {
|
|
57214
|
-
args: this
|
|
57219
|
+
args: this.serializeValueMap(args),
|
|
57215
57220
|
fragment: fragment2
|
|
57216
57221
|
};
|
|
57217
57222
|
}
|
|
@@ -57222,7 +57227,7 @@ var Config = class {
|
|
|
57222
57227
|
hash
|
|
57223
57228
|
};
|
|
57224
57229
|
}
|
|
57225
|
-
|
|
57230
|
+
serializeValueMap(map) {
|
|
57226
57231
|
if (!map) {
|
|
57227
57232
|
return null;
|
|
57228
57233
|
}
|
|
@@ -57237,7 +57242,7 @@ var Config = class {
|
|
|
57237
57242
|
}
|
|
57238
57243
|
if ("values" in input) {
|
|
57239
57244
|
result.values = input.values.map(
|
|
57240
|
-
(value) => this
|
|
57245
|
+
(value) => this.serializeValueMap({ foo: value }).foo
|
|
57241
57246
|
);
|
|
57242
57247
|
}
|
|
57243
57248
|
if ("name" in input) {
|
|
@@ -57246,7 +57251,7 @@ var Config = class {
|
|
|
57246
57251
|
if ("fields" in input) {
|
|
57247
57252
|
result.fields = input.fields.map((field) => ({
|
|
57248
57253
|
name: field.name,
|
|
57249
|
-
value: this
|
|
57254
|
+
value: this.serializeValueMap({ foo: field.value }).foo
|
|
57250
57255
|
}));
|
|
57251
57256
|
}
|
|
57252
57257
|
}
|
|
@@ -57475,40 +57480,13 @@ var TypeWrapper = /* @__PURE__ */ ((TypeWrapper2) => {
|
|
|
57475
57480
|
|
|
57476
57481
|
// src/lib/parse.ts
|
|
57477
57482
|
var import_parser = __toESM(require_lib3(), 1);
|
|
57478
|
-
|
|
57479
|
-
// src/lib/deepMerge.ts
|
|
57480
|
-
var import_deepmerge = __toESM(require_cjs(), 1);
|
|
57481
|
-
function deepMerge(filepath, ...targets) {
|
|
57482
|
-
try {
|
|
57483
|
-
if (targets.length === 1) {
|
|
57484
|
-
return targets[0];
|
|
57485
|
-
} else if (targets.length === 2) {
|
|
57486
|
-
return (0, import_deepmerge.default)(targets[0], targets[1], {
|
|
57487
|
-
arrayMerge: (source, update) => [...new Set(source.concat(update))]
|
|
57488
|
-
});
|
|
57489
|
-
}
|
|
57490
|
-
return deepMerge(filepath, targets[0], deepMerge(filepath, ...targets.slice(1)));
|
|
57491
|
-
} catch (e) {
|
|
57492
|
-
throw new HoudiniError({
|
|
57493
|
-
filepath,
|
|
57494
|
-
message: "could not merge: " + JSON.stringify(targets, null, 4),
|
|
57495
|
-
description: e.message
|
|
57496
|
-
});
|
|
57497
|
-
}
|
|
57498
|
-
}
|
|
57499
|
-
|
|
57500
|
-
// src/lib/parse.ts
|
|
57501
|
-
async function parseJS(str, config2) {
|
|
57502
|
-
const defaultConfig = {
|
|
57503
|
-
plugins: ["typescript"],
|
|
57504
|
-
sourceType: "module"
|
|
57505
|
-
};
|
|
57483
|
+
async function parseJS(str) {
|
|
57506
57484
|
return {
|
|
57507
57485
|
start: 0,
|
|
57508
|
-
script: (0, import_parser.parse)(
|
|
57509
|
-
|
|
57510
|
-
|
|
57511
|
-
).program,
|
|
57486
|
+
script: (0, import_parser.parse)(str || "", {
|
|
57487
|
+
plugins: ["typescript"],
|
|
57488
|
+
sourceType: "module"
|
|
57489
|
+
}).program,
|
|
57512
57490
|
end: str.length
|
|
57513
57491
|
};
|
|
57514
57492
|
}
|
|
@@ -57558,6 +57536,27 @@ async function cleanupFiles(pathFolder, listOfObj) {
|
|
|
57558
57536
|
return allFilesNotInList;
|
|
57559
57537
|
}
|
|
57560
57538
|
|
|
57539
|
+
// src/lib/deepMerge.ts
|
|
57540
|
+
var import_deepmerge = __toESM(require_cjs(), 1);
|
|
57541
|
+
function deepMerge(filepath, ...targets) {
|
|
57542
|
+
try {
|
|
57543
|
+
if (targets.length === 1) {
|
|
57544
|
+
return targets[0];
|
|
57545
|
+
} else if (targets.length === 2) {
|
|
57546
|
+
return (0, import_deepmerge.default)(targets[0], targets[1], {
|
|
57547
|
+
arrayMerge: (source, update) => [...new Set(source.concat(update))]
|
|
57548
|
+
});
|
|
57549
|
+
}
|
|
57550
|
+
return deepMerge(filepath, targets[0], deepMerge(filepath, ...targets.slice(1)));
|
|
57551
|
+
} catch (e) {
|
|
57552
|
+
throw new HoudiniError({
|
|
57553
|
+
filepath,
|
|
57554
|
+
message: "could not merge: " + targets,
|
|
57555
|
+
description: e.message
|
|
57556
|
+
});
|
|
57557
|
+
}
|
|
57558
|
+
}
|
|
57559
|
+
|
|
57561
57560
|
// src/codegen/generators/artifacts/index.ts
|
|
57562
57561
|
var graphql12 = __toESM(require_graphql2(), 1);
|
|
57563
57562
|
var recast5 = __toESM(require_main2(), 1);
|
|
@@ -57859,6 +57858,205 @@ function murmurHash(str) {
|
|
|
57859
57858
|
return s;
|
|
57860
57859
|
}
|
|
57861
57860
|
|
|
57861
|
+
// ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/types.js
|
|
57862
|
+
var VOID = -1;
|
|
57863
|
+
var PRIMITIVE = 0;
|
|
57864
|
+
var ARRAY = 1;
|
|
57865
|
+
var OBJECT = 2;
|
|
57866
|
+
var DATE = 3;
|
|
57867
|
+
var REGEXP = 4;
|
|
57868
|
+
var MAP = 5;
|
|
57869
|
+
var SET = 6;
|
|
57870
|
+
var ERROR = 7;
|
|
57871
|
+
var BIGINT = 8;
|
|
57872
|
+
|
|
57873
|
+
// ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/deserialize.js
|
|
57874
|
+
var env = typeof self === "object" ? self : globalThis;
|
|
57875
|
+
var deserializer = ($, _) => {
|
|
57876
|
+
const as = (out, index) => {
|
|
57877
|
+
$.set(index, out);
|
|
57878
|
+
return out;
|
|
57879
|
+
};
|
|
57880
|
+
const unpair = (index) => {
|
|
57881
|
+
if ($.has(index))
|
|
57882
|
+
return $.get(index);
|
|
57883
|
+
const [type, value] = _[index];
|
|
57884
|
+
switch (type) {
|
|
57885
|
+
case PRIMITIVE:
|
|
57886
|
+
case VOID:
|
|
57887
|
+
return as(value, index);
|
|
57888
|
+
case ARRAY: {
|
|
57889
|
+
const arr = as([], index);
|
|
57890
|
+
for (const index2 of value)
|
|
57891
|
+
arr.push(unpair(index2));
|
|
57892
|
+
return arr;
|
|
57893
|
+
}
|
|
57894
|
+
case OBJECT: {
|
|
57895
|
+
const object = as({}, index);
|
|
57896
|
+
for (const [key, index2] of value)
|
|
57897
|
+
object[unpair(key)] = unpair(index2);
|
|
57898
|
+
return object;
|
|
57899
|
+
}
|
|
57900
|
+
case DATE:
|
|
57901
|
+
return as(new Date(value), index);
|
|
57902
|
+
case REGEXP: {
|
|
57903
|
+
const { source, flags } = value;
|
|
57904
|
+
return as(new RegExp(source, flags), index);
|
|
57905
|
+
}
|
|
57906
|
+
case MAP: {
|
|
57907
|
+
const map = as(/* @__PURE__ */ new Map(), index);
|
|
57908
|
+
for (const [key, index2] of value)
|
|
57909
|
+
map.set(unpair(key), unpair(index2));
|
|
57910
|
+
return map;
|
|
57911
|
+
}
|
|
57912
|
+
case SET: {
|
|
57913
|
+
const set = as(/* @__PURE__ */ new Set(), index);
|
|
57914
|
+
for (const index2 of value)
|
|
57915
|
+
set.add(unpair(index2));
|
|
57916
|
+
return set;
|
|
57917
|
+
}
|
|
57918
|
+
case ERROR: {
|
|
57919
|
+
const { name, message } = value;
|
|
57920
|
+
return as(new env[name](message), index);
|
|
57921
|
+
}
|
|
57922
|
+
case BIGINT:
|
|
57923
|
+
return as(BigInt(value), index);
|
|
57924
|
+
case "BigInt":
|
|
57925
|
+
return as(Object(BigInt(value)), index);
|
|
57926
|
+
}
|
|
57927
|
+
return as(new env[type](value), index);
|
|
57928
|
+
};
|
|
57929
|
+
return unpair;
|
|
57930
|
+
};
|
|
57931
|
+
var deserialize = (serialized) => deserializer(/* @__PURE__ */ new Map(), serialized)(0);
|
|
57932
|
+
|
|
57933
|
+
// ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/serialize.js
|
|
57934
|
+
var EMPTY = "";
|
|
57935
|
+
var { toString } = {};
|
|
57936
|
+
var { keys } = Object;
|
|
57937
|
+
var typeOf = (value) => {
|
|
57938
|
+
const type = typeof value;
|
|
57939
|
+
if (type !== "object" || !value)
|
|
57940
|
+
return [PRIMITIVE, type];
|
|
57941
|
+
const asString = toString.call(value).slice(8, -1);
|
|
57942
|
+
switch (asString) {
|
|
57943
|
+
case "Array":
|
|
57944
|
+
return [ARRAY, EMPTY];
|
|
57945
|
+
case "Object":
|
|
57946
|
+
return [OBJECT, EMPTY];
|
|
57947
|
+
case "Date":
|
|
57948
|
+
return [DATE, EMPTY];
|
|
57949
|
+
case "RegExp":
|
|
57950
|
+
return [REGEXP, EMPTY];
|
|
57951
|
+
case "Map":
|
|
57952
|
+
return [MAP, EMPTY];
|
|
57953
|
+
case "Set":
|
|
57954
|
+
return [SET, EMPTY];
|
|
57955
|
+
}
|
|
57956
|
+
if (asString.includes("Array"))
|
|
57957
|
+
return [ARRAY, asString];
|
|
57958
|
+
if (asString.includes("Error"))
|
|
57959
|
+
return [ERROR, asString];
|
|
57960
|
+
return [OBJECT, asString];
|
|
57961
|
+
};
|
|
57962
|
+
var shouldSkip = ([TYPE, type]) => TYPE === PRIMITIVE && (type === "function" || type === "symbol");
|
|
57963
|
+
var serializer = (strict, json, $, _) => {
|
|
57964
|
+
const as = (out, value) => {
|
|
57965
|
+
const index = _.push(out) - 1;
|
|
57966
|
+
$.set(value, index);
|
|
57967
|
+
return index;
|
|
57968
|
+
};
|
|
57969
|
+
const pair = (value) => {
|
|
57970
|
+
if ($.has(value))
|
|
57971
|
+
return $.get(value);
|
|
57972
|
+
let [TYPE, type] = typeOf(value);
|
|
57973
|
+
switch (TYPE) {
|
|
57974
|
+
case PRIMITIVE: {
|
|
57975
|
+
let entry = value;
|
|
57976
|
+
switch (type) {
|
|
57977
|
+
case "bigint":
|
|
57978
|
+
TYPE = BIGINT;
|
|
57979
|
+
entry = value.toString();
|
|
57980
|
+
break;
|
|
57981
|
+
case "function":
|
|
57982
|
+
case "symbol":
|
|
57983
|
+
if (strict)
|
|
57984
|
+
throw new TypeError("unable to serialize " + type);
|
|
57985
|
+
entry = null;
|
|
57986
|
+
break;
|
|
57987
|
+
case "undefined":
|
|
57988
|
+
return as([VOID], value);
|
|
57989
|
+
}
|
|
57990
|
+
return as([TYPE, entry], value);
|
|
57991
|
+
}
|
|
57992
|
+
case ARRAY: {
|
|
57993
|
+
if (type)
|
|
57994
|
+
return as([type, [...value]], value);
|
|
57995
|
+
const arr = [];
|
|
57996
|
+
const index = as([TYPE, arr], value);
|
|
57997
|
+
for (const entry of value)
|
|
57998
|
+
arr.push(pair(entry));
|
|
57999
|
+
return index;
|
|
58000
|
+
}
|
|
58001
|
+
case OBJECT: {
|
|
58002
|
+
if (type) {
|
|
58003
|
+
switch (type) {
|
|
58004
|
+
case "BigInt":
|
|
58005
|
+
return as([type, value.toString()], value);
|
|
58006
|
+
case "Boolean":
|
|
58007
|
+
case "Number":
|
|
58008
|
+
case "String":
|
|
58009
|
+
return as([type, value.valueOf()], value);
|
|
58010
|
+
}
|
|
58011
|
+
}
|
|
58012
|
+
if (json && "toJSON" in value)
|
|
58013
|
+
return pair(value.toJSON());
|
|
58014
|
+
const entries = [];
|
|
58015
|
+
const index = as([TYPE, entries], value);
|
|
58016
|
+
for (const key of keys(value)) {
|
|
58017
|
+
if (strict || !shouldSkip(typeOf(value[key])))
|
|
58018
|
+
entries.push([pair(key), pair(value[key])]);
|
|
58019
|
+
}
|
|
58020
|
+
return index;
|
|
58021
|
+
}
|
|
58022
|
+
case DATE:
|
|
58023
|
+
return as([TYPE, value.toISOString()], value);
|
|
58024
|
+
case REGEXP: {
|
|
58025
|
+
const { source, flags } = value;
|
|
58026
|
+
return as([TYPE, { source, flags }], value);
|
|
58027
|
+
}
|
|
58028
|
+
case MAP: {
|
|
58029
|
+
const entries = [];
|
|
58030
|
+
const index = as([TYPE, entries], value);
|
|
58031
|
+
for (const [key, entry] of value) {
|
|
58032
|
+
if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry))))
|
|
58033
|
+
entries.push([pair(key), pair(entry)]);
|
|
58034
|
+
}
|
|
58035
|
+
return index;
|
|
58036
|
+
}
|
|
58037
|
+
case SET: {
|
|
58038
|
+
const entries = [];
|
|
58039
|
+
const index = as([TYPE, entries], value);
|
|
58040
|
+
for (const entry of value) {
|
|
58041
|
+
if (strict || !shouldSkip(typeOf(entry)))
|
|
58042
|
+
entries.push(pair(entry));
|
|
58043
|
+
}
|
|
58044
|
+
return index;
|
|
58045
|
+
}
|
|
58046
|
+
}
|
|
58047
|
+
const { message } = value;
|
|
58048
|
+
return as([TYPE, { name: type, message }], value);
|
|
58049
|
+
};
|
|
58050
|
+
return pair;
|
|
58051
|
+
};
|
|
58052
|
+
var serialize = (value, { json, lossy } = {}) => {
|
|
58053
|
+
const _ = [];
|
|
58054
|
+
return serializer(!(json || lossy), !!json, /* @__PURE__ */ new Map(), _)(value), _;
|
|
58055
|
+
};
|
|
58056
|
+
|
|
58057
|
+
// ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/index.js
|
|
58058
|
+
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));
|
|
58059
|
+
|
|
57862
58060
|
// src/codegen/transforms/fragmentVariables.ts
|
|
57863
58061
|
var graphql3 = __toESM(require_graphql2(), 1);
|
|
57864
58062
|
|
|
@@ -58006,61 +58204,67 @@ function inlineFragmentArgs({
|
|
|
58006
58204
|
filepath,
|
|
58007
58205
|
document
|
|
58008
58206
|
).reduce((acc, arg) => ({ ...acc, [arg.name]: arg }), {});
|
|
58009
|
-
const result =
|
|
58010
|
-
|
|
58011
|
-
|
|
58012
|
-
|
|
58013
|
-
|
|
58014
|
-
|
|
58015
|
-
|
|
58016
|
-
|
|
58017
|
-
|
|
58018
|
-
|
|
58019
|
-
|
|
58020
|
-
|
|
58021
|
-
|
|
58022
|
-
|
|
58023
|
-
visitedFragments.
|
|
58024
|
-
|
|
58025
|
-
|
|
58026
|
-
|
|
58027
|
-
if (!args[field]) {
|
|
58028
|
-
args[field] = value;
|
|
58029
|
-
}
|
|
58030
|
-
}
|
|
58031
|
-
generatedFragments[newFragmentName] = inlineFragmentArgs({
|
|
58032
|
-
config: config2,
|
|
58207
|
+
const result = esm_default(
|
|
58208
|
+
graphql3.visit(document, {
|
|
58209
|
+
FragmentSpread(node) {
|
|
58210
|
+
if (!fragmentDefinitions[node.name.value]) {
|
|
58211
|
+
throw new Error("Could not find definition for fragment" + node.name.value);
|
|
58212
|
+
}
|
|
58213
|
+
const { definition } = fragmentDefinitions[node.name.value];
|
|
58214
|
+
let { args, hash } = collectWithArguments(config2, filepath, node, scope);
|
|
58215
|
+
const newFragmentName = `${node.name.value}${hash}`;
|
|
58216
|
+
config2.registerFragmentVariablesHash({
|
|
58217
|
+
hash: newFragmentName,
|
|
58218
|
+
fragment: node.name.value,
|
|
58219
|
+
args
|
|
58220
|
+
});
|
|
58221
|
+
if (!visitedFragments.has(newFragmentName)) {
|
|
58222
|
+
visitedFragments.add(newFragmentName);
|
|
58223
|
+
const defaultArguments = collectDefaultArgumentValues(
|
|
58224
|
+
config2,
|
|
58033
58225
|
filepath,
|
|
58034
|
-
|
|
58035
|
-
document: fragmentDefinitions[node.name.value].definition,
|
|
58036
|
-
generatedFragments,
|
|
58037
|
-
visitedFragments,
|
|
58038
|
-
scope: args,
|
|
58039
|
-
newName: newFragmentName
|
|
58040
|
-
});
|
|
58041
|
-
} else {
|
|
58042
|
-
const doc = fragmentDefinitions[node.name.value].document;
|
|
58043
|
-
const definitionIndex = doc.document.definitions.findIndex(
|
|
58044
|
-
(definition2) => definition2.kind === "FragmentDefinition" && definition2.name.value === node.name.value
|
|
58226
|
+
definition
|
|
58045
58227
|
);
|
|
58046
|
-
|
|
58047
|
-
|
|
58048
|
-
|
|
58049
|
-
|
|
58228
|
+
if (args) {
|
|
58229
|
+
for (const [field, value] of Object.entries(defaultArguments || {})) {
|
|
58230
|
+
if (!args[field]) {
|
|
58231
|
+
args[field] = value;
|
|
58232
|
+
}
|
|
58233
|
+
}
|
|
58234
|
+
generatedFragments[newFragmentName] = inlineFragmentArgs({
|
|
58050
58235
|
config: config2,
|
|
58051
58236
|
filepath,
|
|
58052
58237
|
fragmentDefinitions,
|
|
58053
58238
|
document: fragmentDefinitions[node.name.value].definition,
|
|
58054
58239
|
generatedFragments,
|
|
58055
58240
|
visitedFragments,
|
|
58056
|
-
scope:
|
|
58057
|
-
newName:
|
|
58058
|
-
})
|
|
58059
|
-
|
|
58060
|
-
|
|
58061
|
-
|
|
58062
|
-
|
|
58063
|
-
|
|
58241
|
+
scope: args,
|
|
58242
|
+
newName: newFragmentName
|
|
58243
|
+
});
|
|
58244
|
+
} else {
|
|
58245
|
+
const doc = fragmentDefinitions[node.name.value].document;
|
|
58246
|
+
const definitionIndex = doc.document.definitions.findIndex(
|
|
58247
|
+
(definition2) => definition2.kind === "FragmentDefinition" && definition2.name.value === node.name.value
|
|
58248
|
+
);
|
|
58249
|
+
const localDefinitions = [...doc.document.definitions];
|
|
58250
|
+
localDefinitions.splice(definitionIndex, 1);
|
|
58251
|
+
localDefinitions.push(
|
|
58252
|
+
inlineFragmentArgs({
|
|
58253
|
+
config: config2,
|
|
58254
|
+
filepath,
|
|
58255
|
+
fragmentDefinitions,
|
|
58256
|
+
document: fragmentDefinitions[node.name.value].definition,
|
|
58257
|
+
generatedFragments,
|
|
58258
|
+
visitedFragments,
|
|
58259
|
+
scope: defaultArguments,
|
|
58260
|
+
newName: ""
|
|
58261
|
+
})
|
|
58262
|
+
);
|
|
58263
|
+
doc.document = {
|
|
58264
|
+
...doc.document,
|
|
58265
|
+
definitions: localDefinitions
|
|
58266
|
+
};
|
|
58267
|
+
}
|
|
58064
58268
|
}
|
|
58065
58269
|
if (node.name.value !== newFragmentName) {
|
|
58066
58270
|
return {
|
|
@@ -58071,35 +58275,35 @@ function inlineFragmentArgs({
|
|
|
58071
58275
|
}
|
|
58072
58276
|
};
|
|
58073
58277
|
}
|
|
58278
|
+
},
|
|
58279
|
+
Argument(node) {
|
|
58280
|
+
const value = node.value;
|
|
58281
|
+
if (value.kind !== "Variable") {
|
|
58282
|
+
return;
|
|
58283
|
+
}
|
|
58284
|
+
if (!scope) {
|
|
58285
|
+
throw new HoudiniError({
|
|
58286
|
+
filepath,
|
|
58287
|
+
message: node.name.value + " is not defined in the current scope: " + JSON.stringify(scope)
|
|
58288
|
+
});
|
|
58289
|
+
}
|
|
58290
|
+
const newValue = scope[value.name.value];
|
|
58291
|
+
if (newValue) {
|
|
58292
|
+
return {
|
|
58293
|
+
...node,
|
|
58294
|
+
value: newValue
|
|
58295
|
+
};
|
|
58296
|
+
}
|
|
58297
|
+
if (definitionArgs[value.name.value] && definitionArgs[value.name.value].required) {
|
|
58298
|
+
throw new HoudiniError({
|
|
58299
|
+
filepath,
|
|
58300
|
+
message: "Missing value for required arg: " + value.name.value
|
|
58301
|
+
});
|
|
58302
|
+
}
|
|
58303
|
+
return null;
|
|
58074
58304
|
}
|
|
58075
|
-
}
|
|
58076
|
-
|
|
58077
|
-
const value = node.value;
|
|
58078
|
-
if (value.kind !== "Variable") {
|
|
58079
|
-
return;
|
|
58080
|
-
}
|
|
58081
|
-
if (!scope) {
|
|
58082
|
-
throw new HoudiniError({
|
|
58083
|
-
filepath,
|
|
58084
|
-
message: node.name.value + " is not defined in the current scope: " + JSON.stringify(scope)
|
|
58085
|
-
});
|
|
58086
|
-
}
|
|
58087
|
-
const newValue = scope[value.name.value];
|
|
58088
|
-
if (newValue) {
|
|
58089
|
-
return {
|
|
58090
|
-
...node,
|
|
58091
|
-
value: newValue
|
|
58092
|
-
};
|
|
58093
|
-
}
|
|
58094
|
-
if (definitionArgs[value.name.value] && definitionArgs[value.name.value].required) {
|
|
58095
|
-
throw new HoudiniError({
|
|
58096
|
-
filepath,
|
|
58097
|
-
message: "Missing value for required arg: " + value.name.value
|
|
58098
|
-
});
|
|
58099
|
-
}
|
|
58100
|
-
return null;
|
|
58101
|
-
}
|
|
58102
|
-
});
|
|
58305
|
+
})
|
|
58306
|
+
);
|
|
58103
58307
|
if (newName) {
|
|
58104
58308
|
result.name = {
|
|
58105
58309
|
kind: graphql3.Kind.NAME,
|
|
@@ -58815,7 +59019,7 @@ async function paginate(config2, documents) {
|
|
|
58815
59019
|
]
|
|
58816
59020
|
}
|
|
58817
59021
|
];
|
|
58818
|
-
const
|
|
59022
|
+
const keys2 = config2.keyFieldsForType(!nodeQuery ? config2.schema.getQueryType()?.name || "" : fragment2).flatMap((key) => {
|
|
58819
59023
|
if (fragment2 === config2.schema.getQueryType()?.name) {
|
|
58820
59024
|
return [];
|
|
58821
59025
|
}
|
|
@@ -58865,7 +59069,7 @@ async function paginate(config2, documents) {
|
|
|
58865
59069
|
}
|
|
58866
59070
|
})
|
|
58867
59071
|
).concat(
|
|
58868
|
-
!nodeQuery ? [] :
|
|
59072
|
+
!nodeQuery ? [] : keys2.map(
|
|
58869
59073
|
(key) => ({
|
|
58870
59074
|
kind: graphql8.Kind.VARIABLE_DEFINITION,
|
|
58871
59075
|
type: key.type,
|
|
@@ -58888,7 +59092,7 @@ async function paginate(config2, documents) {
|
|
|
58888
59092
|
kind: graphql8.Kind.NAME,
|
|
58889
59093
|
value: typeConfig?.resolve?.queryField || "node"
|
|
58890
59094
|
},
|
|
58891
|
-
["arguments"]:
|
|
59095
|
+
["arguments"]: keys2.map((key) => ({
|
|
58892
59096
|
kind: graphql8.Kind.ARGUMENT,
|
|
58893
59097
|
name: {
|
|
58894
59098
|
kind: graphql8.Kind.NAME,
|
|
@@ -59582,12 +59786,24 @@ function prepareSelection({
|
|
|
59582
59786
|
}
|
|
59583
59787
|
const typeName = fieldType.toString();
|
|
59584
59788
|
const pathSoFar = path2.concat(attributeName);
|
|
59585
|
-
const
|
|
59789
|
+
const keys2 = config2.keyFieldsForType(rootType);
|
|
59586
59790
|
let fieldObj = {
|
|
59587
59791
|
type: typeName,
|
|
59588
59792
|
keyRaw: fieldKey(config2, field)
|
|
59589
59793
|
};
|
|
59590
|
-
if (
|
|
59794
|
+
if (field.directives && field.directives.length > 0) {
|
|
59795
|
+
fieldObj.directives = field.directives?.map((directive) => ({
|
|
59796
|
+
name: directive.name.value,
|
|
59797
|
+
arguments: (directive.arguments ?? []).reduce(
|
|
59798
|
+
(acc, arg) => ({
|
|
59799
|
+
...acc,
|
|
59800
|
+
[arg.name.value]: config2.serializeValueMap({ field: arg.value })["field"]
|
|
59801
|
+
}),
|
|
59802
|
+
{}
|
|
59803
|
+
)
|
|
59804
|
+
}));
|
|
59805
|
+
}
|
|
59806
|
+
if (keys2.includes(field.name.value)) {
|
|
59591
59807
|
fieldObj.visible = true;
|
|
59592
59808
|
}
|
|
59593
59809
|
if (nullable) {
|
|
@@ -59812,12 +60028,7 @@ function artifactGenerator(stats) {
|
|
|
59812
60028
|
writeIndexFile(config2, docs)
|
|
59813
60029
|
].concat(
|
|
59814
60030
|
docs.map(async (doc) => {
|
|
59815
|
-
const {
|
|
59816
|
-
document,
|
|
59817
|
-
name,
|
|
59818
|
-
generateArtifact,
|
|
59819
|
-
originalParsed
|
|
59820
|
-
} = doc;
|
|
60031
|
+
const { document, name, generateArtifact, originalParsed, originalString } = doc;
|
|
59821
60032
|
if (!generateArtifact) {
|
|
59822
60033
|
return;
|
|
59823
60034
|
}
|
|
@@ -60232,12 +60443,12 @@ ${exportStatement("config")}
|
|
|
60232
60443
|
},
|
|
60233
60444
|
[path_exports.join(config2.runtimeSource, "client", "plugins", "injectedPlugins.js")]: (content) => injectPlugins({ config: config2, content, importStatement, exportStatement })
|
|
60234
60445
|
}),
|
|
60235
|
-
...config2.plugins.filter((plugin2) => plugin2.includeRuntime).map((plugin2) => generatePluginRuntime(config2,
|
|
60446
|
+
...config2.plugins.filter((plugin2) => plugin2.includeRuntime).map((plugin2) => generatePluginRuntime(config2, plugin2)),
|
|
60236
60447
|
generatePluginIndex({ config: config2, exportStatement: exportStar })
|
|
60237
60448
|
]);
|
|
60238
60449
|
await generateGraphqlReturnTypes(config2, docs);
|
|
60239
60450
|
}
|
|
60240
|
-
async function generatePluginRuntime(config2,
|
|
60451
|
+
async function generatePluginRuntime(config2, plugin2) {
|
|
60241
60452
|
if (houdini_mode.is_testing || !plugin2.includeRuntime) {
|
|
60242
60453
|
return;
|
|
60243
60454
|
}
|
|
@@ -60254,16 +60465,12 @@ async function generatePluginRuntime(config2, docs, plugin2) {
|
|
|
60254
60465
|
});
|
|
60255
60466
|
}
|
|
60256
60467
|
const pluginDir = config2.pluginRuntimeDirectory(plugin2.name);
|
|
60257
|
-
let transformMap = plugin2.transformRuntime ?? {};
|
|
60258
|
-
if (transformMap && typeof transformMap === "function") {
|
|
60259
|
-
transformMap = transformMap(docs);
|
|
60260
|
-
}
|
|
60261
60468
|
await fs_exports.mkdirp(pluginDir);
|
|
60262
60469
|
await fs_exports.recursiveCopy(
|
|
60263
60470
|
runtime_path,
|
|
60264
60471
|
pluginDir,
|
|
60265
60472
|
Object.fromEntries(
|
|
60266
|
-
Object.entries(
|
|
60473
|
+
Object.entries(plugin2.transformRuntime ?? {}).map(([key, value]) => [
|
|
60267
60474
|
path_exports.join(runtime_path, key),
|
|
60268
60475
|
(content) => value({ config: config2, content })
|
|
60269
60476
|
])
|
|
@@ -60703,8 +60910,7 @@ async function generateDocumentTypes(config2, docs) {
|
|
|
60703
60910
|
originalParsed: originalDocument,
|
|
60704
60911
|
name,
|
|
60705
60912
|
filename,
|
|
60706
|
-
generateArtifact
|
|
60707
|
-
artifact
|
|
60913
|
+
generateArtifact
|
|
60708
60914
|
}) => {
|
|
60709
60915
|
if (!generateArtifact) {
|
|
60710
60916
|
return;
|
|
@@ -60743,14 +60949,6 @@ async function generateDocumentTypes(config2, docs) {
|
|
|
60743
60949
|
missingScalars
|
|
60744
60950
|
);
|
|
60745
60951
|
}
|
|
60746
|
-
program.body.push(
|
|
60747
|
-
AST11.exportNamedDeclaration(
|
|
60748
|
-
AST11.tsTypeAliasDeclaration(
|
|
60749
|
-
AST11.identifier(`${name}$artifact`),
|
|
60750
|
-
convertToTs(serializeValue(artifact))
|
|
60751
|
-
)
|
|
60752
|
-
)
|
|
60753
|
-
);
|
|
60754
60952
|
await fs_exports.writeFile(typeDefPath, recast11.print(program).code);
|
|
60755
60953
|
typePaths.push(typeDefPath);
|
|
60756
60954
|
}
|
|
@@ -60777,17 +60975,18 @@ export * from "${module}"
|
|
|
60777
60975
|
`;
|
|
60778
60976
|
let indexContent = recast11.print(typeIndex).code;
|
|
60779
60977
|
for (const plugin2 of config2.plugins) {
|
|
60780
|
-
if (plugin2.indexFile) {
|
|
60781
|
-
|
|
60782
|
-
config: config2,
|
|
60783
|
-
content: indexContent,
|
|
60784
|
-
exportDefaultAs,
|
|
60785
|
-
exportStarFrom: exportStarFrom2,
|
|
60786
|
-
pluginRoot: config2.pluginDirectory(plugin2.name),
|
|
60787
|
-
typedef: true,
|
|
60788
|
-
documents: docs
|
|
60789
|
-
});
|
|
60978
|
+
if (!plugin2.indexFile) {
|
|
60979
|
+
continue;
|
|
60790
60980
|
}
|
|
60981
|
+
indexContent = plugin2.indexFile({
|
|
60982
|
+
config: config2,
|
|
60983
|
+
content: indexContent,
|
|
60984
|
+
exportDefaultAs,
|
|
60985
|
+
exportStarFrom: exportStarFrom2,
|
|
60986
|
+
pluginRoot: config2.pluginDirectory(plugin2.name),
|
|
60987
|
+
typedef: true,
|
|
60988
|
+
documents: docs
|
|
60989
|
+
});
|
|
60791
60990
|
if (plugin2.includeRuntime) {
|
|
60792
60991
|
indexContent += exportStarFrom2({
|
|
60793
60992
|
module: "./" + path_exports.relative(config2.rootDir, config2.pluginRuntimeDirectory(plugin2.name))
|
|
@@ -60819,42 +61018,6 @@ ${[...missingScalars].map(
|
|
|
60819
61018
|
For more information, please visit this link: ${siteURL}/api/config#custom-scalars`);
|
|
60820
61019
|
}
|
|
60821
61020
|
}
|
|
60822
|
-
function convertToTs(source) {
|
|
60823
|
-
if (source.type === "ObjectExpression") {
|
|
60824
|
-
return AST11.tsTypeLiteral(
|
|
60825
|
-
source.properties.reduce(
|
|
60826
|
-
(props, prop) => {
|
|
60827
|
-
if (prop.type !== "ObjectProperty" || prop.key.type !== "StringLiteral" && prop.key.type === "Identifier") {
|
|
60828
|
-
return props;
|
|
60829
|
-
}
|
|
60830
|
-
return [
|
|
60831
|
-
...props,
|
|
60832
|
-
AST11.tsPropertySignature(
|
|
60833
|
-
prop.key,
|
|
60834
|
-
AST11.tsTypeAnnotation(convertToTs(prop.value))
|
|
60835
|
-
)
|
|
60836
|
-
];
|
|
60837
|
-
},
|
|
60838
|
-
[]
|
|
60839
|
-
)
|
|
60840
|
-
);
|
|
60841
|
-
}
|
|
60842
|
-
if (source.type === "ArrayExpression") {
|
|
60843
|
-
return AST11.tsTupleType(
|
|
60844
|
-
source.elements.map((element) => convertToTs(element))
|
|
60845
|
-
);
|
|
60846
|
-
}
|
|
60847
|
-
if (source.type === "Literal" && typeof source.value === "boolean") {
|
|
60848
|
-
return AST11.tsLiteralType(AST11.booleanLiteral(source.value));
|
|
60849
|
-
}
|
|
60850
|
-
if (source.type === "Literal" && typeof source.value === "number") {
|
|
60851
|
-
return AST11.tsLiteralType(AST11.numericLiteral(source.value));
|
|
60852
|
-
}
|
|
60853
|
-
if (source.type === "Literal" && typeof source.value === "string") {
|
|
60854
|
-
return AST11.tsLiteralType(AST11.stringLiteral(source.value));
|
|
60855
|
-
}
|
|
60856
|
-
return AST11.tsLiteralType(source);
|
|
60857
|
-
}
|
|
60858
61021
|
async function generateOperationTypeDefs(config2, filepath, body, definition, selections, visitedTypes, missingScalars) {
|
|
60859
61022
|
let parentType = null;
|
|
60860
61023
|
if (definition.operation === "query") {
|
|
@@ -61126,10 +61289,10 @@ function typeDefinitions(config2, body, docs, returnType) {
|
|
|
61126
61289
|
typeName = "__ROOT__";
|
|
61127
61290
|
}
|
|
61128
61291
|
let idFields = AST12.tsNeverKeyword();
|
|
61129
|
-
const
|
|
61130
|
-
if (graphql17.isObjectType(type) &&
|
|
61292
|
+
const keys2 = keyFieldsForType(config2.configFile, type.name);
|
|
61293
|
+
if (graphql17.isObjectType(type) && keys2.length > 0 && keys2.every((key) => type.getFields()[key])) {
|
|
61131
61294
|
idFields = AST12.tsTypeLiteral(
|
|
61132
|
-
|
|
61295
|
+
keys2.map((key) => {
|
|
61133
61296
|
const fieldType = type.getFields()[key];
|
|
61134
61297
|
const unwrapped = unwrapType(config2, fieldType.type);
|
|
61135
61298
|
return AST12.tsPropertySignature(
|
|
@@ -61562,6 +61725,9 @@ async function writeIndexFile2(config2, docs) {
|
|
|
61562
61725
|
module: relative2(config2.pluginRuntimeDirectory(plugin2.name))
|
|
61563
61726
|
});
|
|
61564
61727
|
}
|
|
61728
|
+
if (!plugin2.indexFile) {
|
|
61729
|
+
continue;
|
|
61730
|
+
}
|
|
61565
61731
|
}
|
|
61566
61732
|
await fs_exports.writeFile(path_exports.join(config2.rootDir, "index.js"), body);
|
|
61567
61733
|
}
|
|
@@ -62872,7 +63038,7 @@ function testConfigFile({ plugins, ...config2 } = {}) {
|
|
|
62872
63038
|
usersByCursor(first: Int, after: String, last: Int, before: String): UserConnection!
|
|
62873
63039
|
usersByBackwardsCursor(last: Int, before: String): UserConnection!
|
|
62874
63040
|
usersByForwardsCursor(first: Int, after: String): UserConnection!
|
|
62875
|
-
usersByOffset(offset: Int, limit: Int): [User!]!
|
|
63041
|
+
usersByOffset(offset: Int, limit: Int, stringFilter: String, filter: UserFilter): [User!]!
|
|
62876
63042
|
friendsByCursor(first: Int, after: String, last: Int, before: String): FriendConnection!
|
|
62877
63043
|
ghostsByCursor(first: Int, after: String, last: Int, before: String): IsGhostConnection!
|
|
62878
63044
|
entitiesByCursor(first: Int, after: String, last: Int, before: String): EntityConnection!
|
|
@@ -62882,6 +63048,10 @@ function testConfigFile({ plugins, ...config2 } = {}) {
|
|
|
62882
63048
|
monkeys: MonkeyConnection!
|
|
62883
63049
|
}
|
|
62884
63050
|
|
|
63051
|
+
input UserFilter {
|
|
63052
|
+
name: String
|
|
63053
|
+
}
|
|
63054
|
+
|
|
62885
63055
|
type PageInfo {
|
|
62886
63056
|
hasPreviousPage: Boolean!
|
|
62887
63057
|
hasNextPage: Boolean!
|
|
@@ -62960,7 +63130,7 @@ function testConfigFile({ plugins, ...config2 } = {}) {
|
|
|
62960
63130
|
interface IsGhost {
|
|
62961
63131
|
aka: String!
|
|
62962
63132
|
}
|
|
62963
|
-
|
|
63133
|
+
|
|
62964
63134
|
interface Animal implements Node {
|
|
62965
63135
|
id: ID!
|
|
62966
63136
|
name: String!
|