houdini-svelte 1.2.7 → 1.2.9
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/plugin/kit.d.ts +6 -0
- package/build/plugin-cjs/index.js +286 -211
- package/build/plugin-esm/index.js +286 -211
- package/build/preprocess-cjs/index.js +885 -844
- package/build/preprocess-esm/index.js +885 -844
- package/build/test-cjs/index.js +322 -247
- package/build/test-esm/index.js +322 -247
- package/package.json +2 -2
|
@@ -12000,13 +12000,13 @@ var require_esprima5 = __commonJS({
|
|
|
12000
12000
|
return Reader2;
|
|
12001
12001
|
}();
|
|
12002
12002
|
var Tokenizer = function() {
|
|
12003
|
-
function Tokenizer2(code,
|
|
12003
|
+
function Tokenizer2(code, config5) {
|
|
12004
12004
|
this.errorHandler = new error_handler_1.ErrorHandler();
|
|
12005
|
-
this.errorHandler.tolerant =
|
|
12005
|
+
this.errorHandler.tolerant = config5 ? typeof config5.tolerant === "boolean" && config5.tolerant : false;
|
|
12006
12006
|
this.scanner = new scanner_1.Scanner(code, this.errorHandler);
|
|
12007
|
-
this.scanner.trackComment =
|
|
12008
|
-
this.trackRange =
|
|
12009
|
-
this.trackLoc =
|
|
12007
|
+
this.scanner.trackComment = config5 ? typeof config5.comment === "boolean" && config5.comment : false;
|
|
12008
|
+
this.trackRange = config5 ? typeof config5.range === "boolean" && config5.range : false;
|
|
12009
|
+
this.trackLoc = config5 ? typeof config5.loc === "boolean" && config5.loc : false;
|
|
12010
12010
|
this.buffer = [];
|
|
12011
12011
|
this.reader = new Reader();
|
|
12012
12012
|
}
|
|
@@ -14175,11 +14175,11 @@ var require_printer3 = __commonJS({
|
|
|
14175
14175
|
return this.code;
|
|
14176
14176
|
};
|
|
14177
14177
|
var emptyPrintResult = new PrintResult("");
|
|
14178
|
-
var Printer = function Printer2(
|
|
14178
|
+
var Printer = function Printer2(config5) {
|
|
14179
14179
|
assert_1.default.ok(this instanceof Printer2);
|
|
14180
|
-
var explicitTabWidth =
|
|
14181
|
-
|
|
14182
|
-
|
|
14180
|
+
var explicitTabWidth = config5 && config5.tabWidth;
|
|
14181
|
+
config5 = (0, options_1.normalize)(config5);
|
|
14182
|
+
config5.sourceFileName = null;
|
|
14183
14183
|
function makePrintFunctionWith(options, overrides) {
|
|
14184
14184
|
options = Object.assign({}, options, overrides);
|
|
14185
14185
|
return function(path3) {
|
|
@@ -14194,19 +14194,19 @@ var require_printer3 = __commonJS({
|
|
|
14194
14194
|
includeComments: false
|
|
14195
14195
|
}));
|
|
14196
14196
|
}
|
|
14197
|
-
var oldTabWidth =
|
|
14197
|
+
var oldTabWidth = config5.tabWidth;
|
|
14198
14198
|
if (!explicitTabWidth) {
|
|
14199
14199
|
var loc = path3.getNode().loc;
|
|
14200
14200
|
if (loc && loc.lines && loc.lines.guessTabWidth) {
|
|
14201
|
-
|
|
14201
|
+
config5.tabWidth = loc.lines.guessTabWidth();
|
|
14202
14202
|
}
|
|
14203
14203
|
}
|
|
14204
14204
|
var reprinter = (0, patcher_1.getReprinter)(path3);
|
|
14205
|
-
var lines = reprinter ? reprinter(print) : genericPrint(path3,
|
|
14205
|
+
var lines = reprinter ? reprinter(print) : genericPrint(path3, config5, options, makePrintFunctionWith(options, {
|
|
14206
14206
|
includeComments: true,
|
|
14207
14207
|
avoidRootParens: false
|
|
14208
14208
|
}));
|
|
14209
|
-
|
|
14209
|
+
config5.tabWidth = oldTabWidth;
|
|
14210
14210
|
return lines;
|
|
14211
14211
|
}
|
|
14212
14212
|
this.print = function(ast) {
|
|
@@ -14217,7 +14217,7 @@ var require_printer3 = __commonJS({
|
|
|
14217
14217
|
includeComments: true,
|
|
14218
14218
|
avoidRootParens: false
|
|
14219
14219
|
});
|
|
14220
|
-
return new PrintResult(lines.toString(
|
|
14220
|
+
return new PrintResult(lines.toString(config5), util2.composeSourceMaps(config5.inputSourceMap, lines.getSourceMap(config5.sourceMapName, config5.sourceRoot)));
|
|
14221
14221
|
};
|
|
14222
14222
|
this.printGenerically = function(ast) {
|
|
14223
14223
|
if (!ast) {
|
|
@@ -14225,26 +14225,26 @@ var require_printer3 = __commonJS({
|
|
|
14225
14225
|
}
|
|
14226
14226
|
function printGenerically(path4) {
|
|
14227
14227
|
return (0, comments_1.printComments)(path4, function(path5) {
|
|
14228
|
-
return genericPrint(path5,
|
|
14228
|
+
return genericPrint(path5, config5, {
|
|
14229
14229
|
includeComments: true,
|
|
14230
14230
|
avoidRootParens: false
|
|
14231
14231
|
}, printGenerically);
|
|
14232
14232
|
});
|
|
14233
14233
|
}
|
|
14234
14234
|
var path3 = fast_path_1.default.from(ast);
|
|
14235
|
-
var oldReuseWhitespace =
|
|
14236
|
-
|
|
14237
|
-
var pr = new PrintResult(printGenerically(path3).toString(
|
|
14238
|
-
|
|
14235
|
+
var oldReuseWhitespace = config5.reuseWhitespace;
|
|
14236
|
+
config5.reuseWhitespace = false;
|
|
14237
|
+
var pr = new PrintResult(printGenerically(path3).toString(config5));
|
|
14238
|
+
config5.reuseWhitespace = oldReuseWhitespace;
|
|
14239
14239
|
return pr;
|
|
14240
14240
|
};
|
|
14241
14241
|
};
|
|
14242
14242
|
exports.Printer = Printer;
|
|
14243
|
-
function genericPrint(path3,
|
|
14243
|
+
function genericPrint(path3, config5, options, printPath) {
|
|
14244
14244
|
assert_1.default.ok(path3 instanceof fast_path_1.default);
|
|
14245
14245
|
var node2 = path3.getValue();
|
|
14246
14246
|
var parts = [];
|
|
14247
|
-
var linesWithoutParens = genericPrintNoParens(path3,
|
|
14247
|
+
var linesWithoutParens = genericPrintNoParens(path3, config5, printPath);
|
|
14248
14248
|
if (!node2 || linesWithoutParens.isEmpty()) {
|
|
14249
14249
|
return linesWithoutParens;
|
|
14250
14250
|
}
|
|
@@ -19962,25 +19962,25 @@ var require_definition3 = __commonJS({
|
|
|
19962
19962
|
return arr && arr.length > 0 ? arr : void 0;
|
|
19963
19963
|
}
|
|
19964
19964
|
var GraphQLScalarType = /* @__PURE__ */ function() {
|
|
19965
|
-
function GraphQLScalarType2(
|
|
19965
|
+
function GraphQLScalarType2(config5) {
|
|
19966
19966
|
var _config$parseValue, _config$serialize, _config$parseLiteral;
|
|
19967
|
-
var parseValue = (_config$parseValue =
|
|
19968
|
-
this.name =
|
|
19969
|
-
this.description =
|
|
19970
|
-
this.specifiedByUrl =
|
|
19971
|
-
this.serialize = (_config$serialize =
|
|
19967
|
+
var parseValue = (_config$parseValue = config5.parseValue) !== null && _config$parseValue !== void 0 ? _config$parseValue : _identityFunc.default;
|
|
19968
|
+
this.name = config5.name;
|
|
19969
|
+
this.description = config5.description;
|
|
19970
|
+
this.specifiedByUrl = config5.specifiedByUrl;
|
|
19971
|
+
this.serialize = (_config$serialize = config5.serialize) !== null && _config$serialize !== void 0 ? _config$serialize : _identityFunc.default;
|
|
19972
19972
|
this.parseValue = parseValue;
|
|
19973
|
-
this.parseLiteral = (_config$parseLiteral =
|
|
19973
|
+
this.parseLiteral = (_config$parseLiteral = config5.parseLiteral) !== null && _config$parseLiteral !== void 0 ? _config$parseLiteral : function(node2, variables) {
|
|
19974
19974
|
return parseValue((0, _valueFromASTUntyped.valueFromASTUntyped)(node2, variables));
|
|
19975
19975
|
};
|
|
19976
|
-
this.extensions =
|
|
19977
|
-
this.astNode =
|
|
19978
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
19979
|
-
typeof
|
|
19980
|
-
|
|
19981
|
-
|
|
19982
|
-
if (
|
|
19983
|
-
typeof
|
|
19976
|
+
this.extensions = config5.extensions && (0, _toObjMap.default)(config5.extensions);
|
|
19977
|
+
this.astNode = config5.astNode;
|
|
19978
|
+
this.extensionASTNodes = undefineIfEmpty(config5.extensionASTNodes);
|
|
19979
|
+
typeof config5.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
19980
|
+
config5.specifiedByUrl == null || typeof config5.specifiedByUrl === "string" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide "specifiedByUrl" as a string, ') + "but got: ".concat((0, _inspect.default)(config5.specifiedByUrl), "."));
|
|
19981
|
+
config5.serialize == null || typeof config5.serialize === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.'));
|
|
19982
|
+
if (config5.parseLiteral) {
|
|
19983
|
+
typeof config5.parseValue === "function" && typeof config5.parseLiteral === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide both "parseValue" and "parseLiteral" functions.'));
|
|
19984
19984
|
}
|
|
19985
19985
|
}
|
|
19986
19986
|
var _proto = GraphQLScalarType2.prototype;
|
|
@@ -20015,17 +20015,17 @@ var require_definition3 = __commonJS({
|
|
|
20015
20015
|
exports.GraphQLScalarType = GraphQLScalarType;
|
|
20016
20016
|
(0, _defineInspect.default)(GraphQLScalarType);
|
|
20017
20017
|
var GraphQLObjectType = /* @__PURE__ */ function() {
|
|
20018
|
-
function GraphQLObjectType2(
|
|
20019
|
-
this.name =
|
|
20020
|
-
this.description =
|
|
20021
|
-
this.isTypeOf =
|
|
20022
|
-
this.extensions =
|
|
20023
|
-
this.astNode =
|
|
20024
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
20025
|
-
this._fields = defineFieldMap.bind(void 0,
|
|
20026
|
-
this._interfaces = defineInterfaces.bind(void 0,
|
|
20027
|
-
typeof
|
|
20028
|
-
|
|
20018
|
+
function GraphQLObjectType2(config5) {
|
|
20019
|
+
this.name = config5.name;
|
|
20020
|
+
this.description = config5.description;
|
|
20021
|
+
this.isTypeOf = config5.isTypeOf;
|
|
20022
|
+
this.extensions = config5.extensions && (0, _toObjMap.default)(config5.extensions);
|
|
20023
|
+
this.astNode = config5.astNode;
|
|
20024
|
+
this.extensionASTNodes = undefineIfEmpty(config5.extensionASTNodes);
|
|
20025
|
+
this._fields = defineFieldMap.bind(void 0, config5);
|
|
20026
|
+
this._interfaces = defineInterfaces.bind(void 0, config5);
|
|
20027
|
+
typeof config5.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
20028
|
+
config5.isTypeOf == null || typeof config5.isTypeOf === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide "isTypeOf" as a function, ') + "but got: ".concat((0, _inspect.default)(config5.isTypeOf), "."));
|
|
20029
20029
|
}
|
|
20030
20030
|
var _proto2 = GraphQLObjectType2.prototype;
|
|
20031
20031
|
_proto2.getFields = function getFields() {
|
|
@@ -20068,22 +20068,22 @@ var require_definition3 = __commonJS({
|
|
|
20068
20068
|
}();
|
|
20069
20069
|
exports.GraphQLObjectType = GraphQLObjectType;
|
|
20070
20070
|
(0, _defineInspect.default)(GraphQLObjectType);
|
|
20071
|
-
function defineInterfaces(
|
|
20071
|
+
function defineInterfaces(config5) {
|
|
20072
20072
|
var _resolveThunk;
|
|
20073
|
-
var interfaces = (_resolveThunk = resolveThunk(
|
|
20074
|
-
Array.isArray(interfaces) || (0, _devAssert.default)(0, "".concat(
|
|
20073
|
+
var interfaces = (_resolveThunk = resolveThunk(config5.interfaces)) !== null && _resolveThunk !== void 0 ? _resolveThunk : [];
|
|
20074
|
+
Array.isArray(interfaces) || (0, _devAssert.default)(0, "".concat(config5.name, " interfaces must be an Array or a function which returns an Array."));
|
|
20075
20075
|
return interfaces;
|
|
20076
20076
|
}
|
|
20077
|
-
function defineFieldMap(
|
|
20078
|
-
var fieldMap = resolveThunk(
|
|
20079
|
-
isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(
|
|
20077
|
+
function defineFieldMap(config5) {
|
|
20078
|
+
var fieldMap = resolveThunk(config5.fields);
|
|
20079
|
+
isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(config5.name, " fields must be an object with field names as keys or a function which returns such an object."));
|
|
20080
20080
|
return (0, _mapValue.default)(fieldMap, function(fieldConfig, fieldName) {
|
|
20081
20081
|
var _fieldConfig$args;
|
|
20082
|
-
isPlainObj(fieldConfig) || (0, _devAssert.default)(0, "".concat(
|
|
20083
|
-
!("isDeprecated" in fieldConfig) || (0, _devAssert.default)(0, "".concat(
|
|
20084
|
-
fieldConfig.resolve == null || typeof fieldConfig.resolve === "function" || (0, _devAssert.default)(0, "".concat(
|
|
20082
|
+
isPlainObj(fieldConfig) || (0, _devAssert.default)(0, "".concat(config5.name, ".").concat(fieldName, " field config must be an object."));
|
|
20083
|
+
!("isDeprecated" in fieldConfig) || (0, _devAssert.default)(0, "".concat(config5.name, ".").concat(fieldName, ' should provide "deprecationReason" instead of "isDeprecated".'));
|
|
20084
|
+
fieldConfig.resolve == null || typeof fieldConfig.resolve === "function" || (0, _devAssert.default)(0, "".concat(config5.name, ".").concat(fieldName, " field resolver must be a function if ") + "provided, but got: ".concat((0, _inspect.default)(fieldConfig.resolve), "."));
|
|
20085
20085
|
var argsConfig = (_fieldConfig$args = fieldConfig.args) !== null && _fieldConfig$args !== void 0 ? _fieldConfig$args : {};
|
|
20086
|
-
isPlainObj(argsConfig) || (0, _devAssert.default)(0, "".concat(
|
|
20086
|
+
isPlainObj(argsConfig) || (0, _devAssert.default)(0, "".concat(config5.name, ".").concat(fieldName, " args must be an object with argument names as keys."));
|
|
20087
20087
|
var args = (0, _objectEntries.default)(argsConfig).map(function(_ref) {
|
|
20088
20088
|
var argName = _ref[0], argConfig = _ref[1];
|
|
20089
20089
|
return {
|
|
@@ -20145,17 +20145,17 @@ var require_definition3 = __commonJS({
|
|
|
20145
20145
|
return isNonNullType(arg.type) && arg.defaultValue === void 0;
|
|
20146
20146
|
}
|
|
20147
20147
|
var GraphQLInterfaceType = /* @__PURE__ */ function() {
|
|
20148
|
-
function GraphQLInterfaceType2(
|
|
20149
|
-
this.name =
|
|
20150
|
-
this.description =
|
|
20151
|
-
this.resolveType =
|
|
20152
|
-
this.extensions =
|
|
20153
|
-
this.astNode =
|
|
20154
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
20155
|
-
this._fields = defineFieldMap.bind(void 0,
|
|
20156
|
-
this._interfaces = defineInterfaces.bind(void 0,
|
|
20157
|
-
typeof
|
|
20158
|
-
|
|
20148
|
+
function GraphQLInterfaceType2(config5) {
|
|
20149
|
+
this.name = config5.name;
|
|
20150
|
+
this.description = config5.description;
|
|
20151
|
+
this.resolveType = config5.resolveType;
|
|
20152
|
+
this.extensions = config5.extensions && (0, _toObjMap.default)(config5.extensions);
|
|
20153
|
+
this.astNode = config5.astNode;
|
|
20154
|
+
this.extensionASTNodes = undefineIfEmpty(config5.extensionASTNodes);
|
|
20155
|
+
this._fields = defineFieldMap.bind(void 0, config5);
|
|
20156
|
+
this._interfaces = defineInterfaces.bind(void 0, config5);
|
|
20157
|
+
typeof config5.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
20158
|
+
config5.resolveType == null || typeof config5.resolveType === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide "resolveType" as a function, ') + "but got: ".concat((0, _inspect.default)(config5.resolveType), "."));
|
|
20159
20159
|
}
|
|
20160
20160
|
var _proto3 = GraphQLInterfaceType2.prototype;
|
|
20161
20161
|
_proto3.getFields = function getFields() {
|
|
@@ -20200,16 +20200,16 @@ var require_definition3 = __commonJS({
|
|
|
20200
20200
|
exports.GraphQLInterfaceType = GraphQLInterfaceType;
|
|
20201
20201
|
(0, _defineInspect.default)(GraphQLInterfaceType);
|
|
20202
20202
|
var GraphQLUnionType = /* @__PURE__ */ function() {
|
|
20203
|
-
function GraphQLUnionType2(
|
|
20204
|
-
this.name =
|
|
20205
|
-
this.description =
|
|
20206
|
-
this.resolveType =
|
|
20207
|
-
this.extensions =
|
|
20208
|
-
this.astNode =
|
|
20209
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
20210
|
-
this._types = defineTypes.bind(void 0,
|
|
20211
|
-
typeof
|
|
20212
|
-
|
|
20203
|
+
function GraphQLUnionType2(config5) {
|
|
20204
|
+
this.name = config5.name;
|
|
20205
|
+
this.description = config5.description;
|
|
20206
|
+
this.resolveType = config5.resolveType;
|
|
20207
|
+
this.extensions = config5.extensions && (0, _toObjMap.default)(config5.extensions);
|
|
20208
|
+
this.astNode = config5.astNode;
|
|
20209
|
+
this.extensionASTNodes = undefineIfEmpty(config5.extensionASTNodes);
|
|
20210
|
+
this._types = defineTypes.bind(void 0, config5);
|
|
20211
|
+
typeof config5.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
20212
|
+
config5.resolveType == null || typeof config5.resolveType === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide "resolveType" as a function, ') + "but got: ".concat((0, _inspect.default)(config5.resolveType), "."));
|
|
20213
20213
|
}
|
|
20214
20214
|
var _proto4 = GraphQLUnionType2.prototype;
|
|
20215
20215
|
_proto4.getTypes = function getTypes() {
|
|
@@ -20246,26 +20246,26 @@ var require_definition3 = __commonJS({
|
|
|
20246
20246
|
}();
|
|
20247
20247
|
exports.GraphQLUnionType = GraphQLUnionType;
|
|
20248
20248
|
(0, _defineInspect.default)(GraphQLUnionType);
|
|
20249
|
-
function defineTypes(
|
|
20250
|
-
var types11 = resolveThunk(
|
|
20251
|
-
Array.isArray(types11) || (0, _devAssert.default)(0, "Must provide Array of types or a function which returns such an array for Union ".concat(
|
|
20249
|
+
function defineTypes(config5) {
|
|
20250
|
+
var types11 = resolveThunk(config5.types);
|
|
20251
|
+
Array.isArray(types11) || (0, _devAssert.default)(0, "Must provide Array of types or a function which returns such an array for Union ".concat(config5.name, "."));
|
|
20252
20252
|
return types11;
|
|
20253
20253
|
}
|
|
20254
20254
|
var GraphQLEnumType = /* @__PURE__ */ function() {
|
|
20255
|
-
function GraphQLEnumType2(
|
|
20256
|
-
this.name =
|
|
20257
|
-
this.description =
|
|
20258
|
-
this.extensions =
|
|
20259
|
-
this.astNode =
|
|
20260
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
20261
|
-
this._values = defineEnumValues(this.name,
|
|
20255
|
+
function GraphQLEnumType2(config5) {
|
|
20256
|
+
this.name = config5.name;
|
|
20257
|
+
this.description = config5.description;
|
|
20258
|
+
this.extensions = config5.extensions && (0, _toObjMap.default)(config5.extensions);
|
|
20259
|
+
this.astNode = config5.astNode;
|
|
20260
|
+
this.extensionASTNodes = undefineIfEmpty(config5.extensionASTNodes);
|
|
20261
|
+
this._values = defineEnumValues(this.name, config5.values);
|
|
20262
20262
|
this._valueLookup = new Map(this._values.map(function(enumValue) {
|
|
20263
20263
|
return [enumValue.value, enumValue];
|
|
20264
20264
|
}));
|
|
20265
20265
|
this._nameLookup = (0, _keyMap.default)(this._values, function(value2) {
|
|
20266
20266
|
return value2.name;
|
|
20267
20267
|
});
|
|
20268
|
-
typeof
|
|
20268
|
+
typeof config5.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
20269
20269
|
}
|
|
20270
20270
|
var _proto5 = GraphQLEnumType2.prototype;
|
|
20271
20271
|
_proto5.getValues = function getValues() {
|
|
@@ -20367,14 +20367,14 @@ var require_definition3 = __commonJS({
|
|
|
20367
20367
|
});
|
|
20368
20368
|
}
|
|
20369
20369
|
var GraphQLInputObjectType = /* @__PURE__ */ function() {
|
|
20370
|
-
function GraphQLInputObjectType2(
|
|
20371
|
-
this.name =
|
|
20372
|
-
this.description =
|
|
20373
|
-
this.extensions =
|
|
20374
|
-
this.astNode =
|
|
20375
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
20376
|
-
this._fields = defineInputFieldMap.bind(void 0,
|
|
20377
|
-
typeof
|
|
20370
|
+
function GraphQLInputObjectType2(config5) {
|
|
20371
|
+
this.name = config5.name;
|
|
20372
|
+
this.description = config5.description;
|
|
20373
|
+
this.extensions = config5.extensions && (0, _toObjMap.default)(config5.extensions);
|
|
20374
|
+
this.astNode = config5.astNode;
|
|
20375
|
+
this.extensionASTNodes = undefineIfEmpty(config5.extensionASTNodes);
|
|
20376
|
+
this._fields = defineInputFieldMap.bind(void 0, config5);
|
|
20377
|
+
typeof config5.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
20378
20378
|
}
|
|
20379
20379
|
var _proto6 = GraphQLInputObjectType2.prototype;
|
|
20380
20380
|
_proto6.getFields = function getFields() {
|
|
@@ -20420,11 +20420,11 @@ var require_definition3 = __commonJS({
|
|
|
20420
20420
|
}();
|
|
20421
20421
|
exports.GraphQLInputObjectType = GraphQLInputObjectType;
|
|
20422
20422
|
(0, _defineInspect.default)(GraphQLInputObjectType);
|
|
20423
|
-
function defineInputFieldMap(
|
|
20424
|
-
var fieldMap = resolveThunk(
|
|
20425
|
-
isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(
|
|
20423
|
+
function defineInputFieldMap(config5) {
|
|
20424
|
+
var fieldMap = resolveThunk(config5.fields);
|
|
20425
|
+
isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(config5.name, " fields must be an object with field names as keys or a function which returns such an object."));
|
|
20426
20426
|
return (0, _mapValue.default)(fieldMap, function(fieldConfig, fieldName) {
|
|
20427
|
-
!("resolve" in fieldConfig) || (0, _devAssert.default)(0, "".concat(
|
|
20427
|
+
!("resolve" in fieldConfig) || (0, _devAssert.default)(0, "".concat(config5.name, ".").concat(fieldName, " field has a resolve property, but Input Types cannot define resolvers."));
|
|
20428
20428
|
return {
|
|
20429
20429
|
name: fieldName,
|
|
20430
20430
|
description: fieldConfig.description,
|
|
@@ -21621,18 +21621,18 @@ var require_directives3 = __commonJS({
|
|
|
21621
21621
|
return directive;
|
|
21622
21622
|
}
|
|
21623
21623
|
var GraphQLDirective = /* @__PURE__ */ function() {
|
|
21624
|
-
function GraphQLDirective2(
|
|
21624
|
+
function GraphQLDirective2(config5) {
|
|
21625
21625
|
var _config$isRepeatable, _config$args;
|
|
21626
|
-
this.name =
|
|
21627
|
-
this.description =
|
|
21628
|
-
this.locations =
|
|
21629
|
-
this.isRepeatable = (_config$isRepeatable =
|
|
21630
|
-
this.extensions =
|
|
21631
|
-
this.astNode =
|
|
21632
|
-
|
|
21633
|
-
Array.isArray(
|
|
21634
|
-
var args = (_config$args =
|
|
21635
|
-
(0, _isObjectLike.default)(args) && !Array.isArray(args) || (0, _devAssert.default)(0, "@".concat(
|
|
21626
|
+
this.name = config5.name;
|
|
21627
|
+
this.description = config5.description;
|
|
21628
|
+
this.locations = config5.locations;
|
|
21629
|
+
this.isRepeatable = (_config$isRepeatable = config5.isRepeatable) !== null && _config$isRepeatable !== void 0 ? _config$isRepeatable : false;
|
|
21630
|
+
this.extensions = config5.extensions && (0, _toObjMap.default)(config5.extensions);
|
|
21631
|
+
this.astNode = config5.astNode;
|
|
21632
|
+
config5.name || (0, _devAssert.default)(0, "Directive must be named.");
|
|
21633
|
+
Array.isArray(config5.locations) || (0, _devAssert.default)(0, "@".concat(config5.name, " locations must be an Array."));
|
|
21634
|
+
var args = (_config$args = config5.args) !== null && _config$args !== void 0 ? _config$args : {};
|
|
21635
|
+
(0, _isObjectLike.default)(args) && !Array.isArray(args) || (0, _devAssert.default)(0, "@".concat(config5.name, " args must be an object with argument names as keys."));
|
|
21636
21636
|
this.args = (0, _objectEntries.default)(args).map(function(_ref) {
|
|
21637
21637
|
var argName = _ref[0], argConfig = _ref[1];
|
|
21638
21638
|
return {
|
|
@@ -21788,23 +21788,23 @@ var require_schema3 = __commonJS({
|
|
|
21788
21788
|
return schema;
|
|
21789
21789
|
}
|
|
21790
21790
|
var GraphQLSchema = /* @__PURE__ */ function() {
|
|
21791
|
-
function GraphQLSchema2(
|
|
21791
|
+
function GraphQLSchema2(config5) {
|
|
21792
21792
|
var _config$directives;
|
|
21793
|
-
this.__validationErrors =
|
|
21794
|
-
(0, _isObjectLike.default)(
|
|
21795
|
-
!
|
|
21796
|
-
!
|
|
21797
|
-
this.description =
|
|
21798
|
-
this.extensions =
|
|
21799
|
-
this.astNode =
|
|
21800
|
-
this.extensionASTNodes =
|
|
21801
|
-
this._queryType =
|
|
21802
|
-
this._mutationType =
|
|
21803
|
-
this._subscriptionType =
|
|
21804
|
-
this._directives = (_config$directives =
|
|
21805
|
-
var allReferencedTypes = new Set(
|
|
21806
|
-
if (
|
|
21807
|
-
for (var _i2 = 0, _config$types2 =
|
|
21793
|
+
this.__validationErrors = config5.assumeValid === true ? [] : void 0;
|
|
21794
|
+
(0, _isObjectLike.default)(config5) || (0, _devAssert.default)(0, "Must provide configuration object.");
|
|
21795
|
+
!config5.types || Array.isArray(config5.types) || (0, _devAssert.default)(0, '"types" must be Array if provided but got: '.concat((0, _inspect.default)(config5.types), "."));
|
|
21796
|
+
!config5.directives || Array.isArray(config5.directives) || (0, _devAssert.default)(0, '"directives" must be Array if provided but got: ' + "".concat((0, _inspect.default)(config5.directives), "."));
|
|
21797
|
+
this.description = config5.description;
|
|
21798
|
+
this.extensions = config5.extensions && (0, _toObjMap.default)(config5.extensions);
|
|
21799
|
+
this.astNode = config5.astNode;
|
|
21800
|
+
this.extensionASTNodes = config5.extensionASTNodes;
|
|
21801
|
+
this._queryType = config5.query;
|
|
21802
|
+
this._mutationType = config5.mutation;
|
|
21803
|
+
this._subscriptionType = config5.subscription;
|
|
21804
|
+
this._directives = (_config$directives = config5.directives) !== null && _config$directives !== void 0 ? _config$directives : _directives.specifiedDirectives;
|
|
21805
|
+
var allReferencedTypes = new Set(config5.types);
|
|
21806
|
+
if (config5.types != null) {
|
|
21807
|
+
for (var _i2 = 0, _config$types2 = config5.types; _i2 < _config$types2.length; _i2++) {
|
|
21808
21808
|
var type = _config$types2[_i2];
|
|
21809
21809
|
allReferencedTypes.delete(type);
|
|
21810
21810
|
collectReferencedTypes(type, allReferencedTypes);
|
|
@@ -28130,9 +28130,9 @@ var require_extendSchema3 = __commonJS({
|
|
|
28130
28130
|
return typeMap[type.name];
|
|
28131
28131
|
}
|
|
28132
28132
|
function replaceDirective(directive) {
|
|
28133
|
-
var
|
|
28134
|
-
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({},
|
|
28135
|
-
args: (0, _mapValue.default)(
|
|
28133
|
+
var config5 = directive.toConfig();
|
|
28134
|
+
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({}, config5), {}, {
|
|
28135
|
+
args: (0, _mapValue.default)(config5.args, extendArg)
|
|
28136
28136
|
}));
|
|
28137
28137
|
}
|
|
28138
28138
|
function extendNamedType(type) {
|
|
@@ -28161,80 +28161,80 @@ var require_extendSchema3 = __commonJS({
|
|
|
28161
28161
|
}
|
|
28162
28162
|
function extendInputObjectType(type) {
|
|
28163
28163
|
var _typeExtensionsMap$co;
|
|
28164
|
-
var
|
|
28165
|
-
var extensions = (_typeExtensionsMap$co = typeExtensionsMap[
|
|
28166
|
-
return new _definition.GraphQLInputObjectType(_objectSpread(_objectSpread({},
|
|
28164
|
+
var config5 = type.toConfig();
|
|
28165
|
+
var extensions = (_typeExtensionsMap$co = typeExtensionsMap[config5.name]) !== null && _typeExtensionsMap$co !== void 0 ? _typeExtensionsMap$co : [];
|
|
28166
|
+
return new _definition.GraphQLInputObjectType(_objectSpread(_objectSpread({}, config5), {}, {
|
|
28167
28167
|
fields: function fields() {
|
|
28168
|
-
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(
|
|
28168
|
+
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(config5.fields, function(field) {
|
|
28169
28169
|
return _objectSpread(_objectSpread({}, field), {}, {
|
|
28170
28170
|
type: replaceType(field.type)
|
|
28171
28171
|
});
|
|
28172
28172
|
})), buildInputFieldMap(extensions));
|
|
28173
28173
|
},
|
|
28174
|
-
extensionASTNodes:
|
|
28174
|
+
extensionASTNodes: config5.extensionASTNodes.concat(extensions)
|
|
28175
28175
|
}));
|
|
28176
28176
|
}
|
|
28177
28177
|
function extendEnumType(type) {
|
|
28178
28178
|
var _typeExtensionsMap$ty;
|
|
28179
|
-
var
|
|
28179
|
+
var config5 = type.toConfig();
|
|
28180
28180
|
var extensions = (_typeExtensionsMap$ty = typeExtensionsMap[type.name]) !== null && _typeExtensionsMap$ty !== void 0 ? _typeExtensionsMap$ty : [];
|
|
28181
|
-
return new _definition.GraphQLEnumType(_objectSpread(_objectSpread({},
|
|
28182
|
-
values: _objectSpread(_objectSpread({},
|
|
28183
|
-
extensionASTNodes:
|
|
28181
|
+
return new _definition.GraphQLEnumType(_objectSpread(_objectSpread({}, config5), {}, {
|
|
28182
|
+
values: _objectSpread(_objectSpread({}, config5.values), buildEnumValueMap(extensions)),
|
|
28183
|
+
extensionASTNodes: config5.extensionASTNodes.concat(extensions)
|
|
28184
28184
|
}));
|
|
28185
28185
|
}
|
|
28186
28186
|
function extendScalarType(type) {
|
|
28187
28187
|
var _typeExtensionsMap$co2;
|
|
28188
|
-
var
|
|
28189
|
-
var extensions = (_typeExtensionsMap$co2 = typeExtensionsMap[
|
|
28190
|
-
var specifiedByUrl =
|
|
28188
|
+
var config5 = type.toConfig();
|
|
28189
|
+
var extensions = (_typeExtensionsMap$co2 = typeExtensionsMap[config5.name]) !== null && _typeExtensionsMap$co2 !== void 0 ? _typeExtensionsMap$co2 : [];
|
|
28190
|
+
var specifiedByUrl = config5.specifiedByUrl;
|
|
28191
28191
|
for (var _i8 = 0; _i8 < extensions.length; _i8++) {
|
|
28192
28192
|
var _getSpecifiedByUrl;
|
|
28193
28193
|
var extensionNode = extensions[_i8];
|
|
28194
28194
|
specifiedByUrl = (_getSpecifiedByUrl = getSpecifiedByUrl(extensionNode)) !== null && _getSpecifiedByUrl !== void 0 ? _getSpecifiedByUrl : specifiedByUrl;
|
|
28195
28195
|
}
|
|
28196
|
-
return new _definition.GraphQLScalarType(_objectSpread(_objectSpread({},
|
|
28196
|
+
return new _definition.GraphQLScalarType(_objectSpread(_objectSpread({}, config5), {}, {
|
|
28197
28197
|
specifiedByUrl,
|
|
28198
|
-
extensionASTNodes:
|
|
28198
|
+
extensionASTNodes: config5.extensionASTNodes.concat(extensions)
|
|
28199
28199
|
}));
|
|
28200
28200
|
}
|
|
28201
28201
|
function extendObjectType(type) {
|
|
28202
28202
|
var _typeExtensionsMap$co3;
|
|
28203
|
-
var
|
|
28204
|
-
var extensions = (_typeExtensionsMap$co3 = typeExtensionsMap[
|
|
28205
|
-
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({},
|
|
28203
|
+
var config5 = type.toConfig();
|
|
28204
|
+
var extensions = (_typeExtensionsMap$co3 = typeExtensionsMap[config5.name]) !== null && _typeExtensionsMap$co3 !== void 0 ? _typeExtensionsMap$co3 : [];
|
|
28205
|
+
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({}, config5), {}, {
|
|
28206
28206
|
interfaces: function interfaces() {
|
|
28207
28207
|
return [].concat(type.getInterfaces().map(replaceNamedType), buildInterfaces(extensions));
|
|
28208
28208
|
},
|
|
28209
28209
|
fields: function fields() {
|
|
28210
|
-
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(
|
|
28210
|
+
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(config5.fields, extendField)), buildFieldMap(extensions));
|
|
28211
28211
|
},
|
|
28212
|
-
extensionASTNodes:
|
|
28212
|
+
extensionASTNodes: config5.extensionASTNodes.concat(extensions)
|
|
28213
28213
|
}));
|
|
28214
28214
|
}
|
|
28215
28215
|
function extendInterfaceType(type) {
|
|
28216
28216
|
var _typeExtensionsMap$co4;
|
|
28217
|
-
var
|
|
28218
|
-
var extensions = (_typeExtensionsMap$co4 = typeExtensionsMap[
|
|
28219
|
-
return new _definition.GraphQLInterfaceType(_objectSpread(_objectSpread({},
|
|
28217
|
+
var config5 = type.toConfig();
|
|
28218
|
+
var extensions = (_typeExtensionsMap$co4 = typeExtensionsMap[config5.name]) !== null && _typeExtensionsMap$co4 !== void 0 ? _typeExtensionsMap$co4 : [];
|
|
28219
|
+
return new _definition.GraphQLInterfaceType(_objectSpread(_objectSpread({}, config5), {}, {
|
|
28220
28220
|
interfaces: function interfaces() {
|
|
28221
28221
|
return [].concat(type.getInterfaces().map(replaceNamedType), buildInterfaces(extensions));
|
|
28222
28222
|
},
|
|
28223
28223
|
fields: function fields() {
|
|
28224
|
-
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(
|
|
28224
|
+
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(config5.fields, extendField)), buildFieldMap(extensions));
|
|
28225
28225
|
},
|
|
28226
|
-
extensionASTNodes:
|
|
28226
|
+
extensionASTNodes: config5.extensionASTNodes.concat(extensions)
|
|
28227
28227
|
}));
|
|
28228
28228
|
}
|
|
28229
28229
|
function extendUnionType(type) {
|
|
28230
28230
|
var _typeExtensionsMap$co5;
|
|
28231
|
-
var
|
|
28232
|
-
var extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[
|
|
28233
|
-
return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({},
|
|
28231
|
+
var config5 = type.toConfig();
|
|
28232
|
+
var extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[config5.name]) !== null && _typeExtensionsMap$co5 !== void 0 ? _typeExtensionsMap$co5 : [];
|
|
28233
|
+
return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({}, config5), {}, {
|
|
28234
28234
|
types: function types11() {
|
|
28235
28235
|
return [].concat(type.getTypes().map(replaceNamedType), buildUnionTypes(extensions));
|
|
28236
28236
|
},
|
|
28237
|
-
extensionASTNodes:
|
|
28237
|
+
extensionASTNodes: config5.extensionASTNodes.concat(extensions)
|
|
28238
28238
|
}));
|
|
28239
28239
|
}
|
|
28240
28240
|
function extendField(field) {
|
|
@@ -28551,24 +28551,24 @@ var require_buildASTSchema3 = __commonJS({
|
|
|
28551
28551
|
extensionASTNodes: [],
|
|
28552
28552
|
assumeValid: false
|
|
28553
28553
|
};
|
|
28554
|
-
var
|
|
28555
|
-
if (
|
|
28556
|
-
for (var _i2 = 0, _config$types2 =
|
|
28554
|
+
var config5 = (0, _extendSchema.extendSchemaImpl)(emptySchemaConfig, documentAST, options);
|
|
28555
|
+
if (config5.astNode == null) {
|
|
28556
|
+
for (var _i2 = 0, _config$types2 = config5.types; _i2 < _config$types2.length; _i2++) {
|
|
28557
28557
|
var type = _config$types2[_i2];
|
|
28558
28558
|
switch (type.name) {
|
|
28559
28559
|
case "Query":
|
|
28560
|
-
|
|
28560
|
+
config5.query = type;
|
|
28561
28561
|
break;
|
|
28562
28562
|
case "Mutation":
|
|
28563
|
-
|
|
28563
|
+
config5.mutation = type;
|
|
28564
28564
|
break;
|
|
28565
28565
|
case "Subscription":
|
|
28566
|
-
|
|
28566
|
+
config5.subscription = type;
|
|
28567
28567
|
break;
|
|
28568
28568
|
}
|
|
28569
28569
|
}
|
|
28570
28570
|
}
|
|
28571
|
-
var directives =
|
|
28571
|
+
var directives = config5.directives;
|
|
28572
28572
|
var _loop = function _loop2(_i42) {
|
|
28573
28573
|
var stdDirective = _directives.specifiedDirectives[_i42];
|
|
28574
28574
|
if (directives.every(function(directive) {
|
|
@@ -28580,7 +28580,7 @@ var require_buildASTSchema3 = __commonJS({
|
|
|
28580
28580
|
for (var _i4 = 0; _i4 < _directives.specifiedDirectives.length; _i4++) {
|
|
28581
28581
|
_loop(_i4);
|
|
28582
28582
|
}
|
|
28583
|
-
return new _schema.GraphQLSchema(
|
|
28583
|
+
return new _schema.GraphQLSchema(config5);
|
|
28584
28584
|
}
|
|
28585
28585
|
function buildSchema(source, options) {
|
|
28586
28586
|
var document2 = (0, _parser.parse)(source, {
|
|
@@ -28682,12 +28682,12 @@ var require_lexicographicSortSchema3 = __commonJS({
|
|
|
28682
28682
|
return maybeType && replaceNamedType(maybeType);
|
|
28683
28683
|
}
|
|
28684
28684
|
function sortDirective(directive) {
|
|
28685
|
-
var
|
|
28686
|
-
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({},
|
|
28687
|
-
locations: sortBy(
|
|
28685
|
+
var config5 = directive.toConfig();
|
|
28686
|
+
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({}, config5), {}, {
|
|
28687
|
+
locations: sortBy(config5.locations, function(x4) {
|
|
28688
28688
|
return x4;
|
|
28689
28689
|
}),
|
|
28690
|
-
args: sortArgs(
|
|
28690
|
+
args: sortArgs(config5.args)
|
|
28691
28691
|
}));
|
|
28692
28692
|
}
|
|
28693
28693
|
function sortArgs(args) {
|
|
@@ -28720,13 +28720,13 @@ var require_lexicographicSortSchema3 = __commonJS({
|
|
|
28720
28720
|
return type;
|
|
28721
28721
|
}
|
|
28722
28722
|
if ((0, _definition.isObjectType)(type)) {
|
|
28723
|
-
var
|
|
28724
|
-
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({},
|
|
28723
|
+
var config5 = type.toConfig();
|
|
28724
|
+
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({}, config5), {}, {
|
|
28725
28725
|
interfaces: function interfaces() {
|
|
28726
|
-
return sortTypes(
|
|
28726
|
+
return sortTypes(config5.interfaces);
|
|
28727
28727
|
},
|
|
28728
28728
|
fields: function fields() {
|
|
28729
|
-
return sortFields(
|
|
28729
|
+
return sortFields(config5.fields);
|
|
28730
28730
|
}
|
|
28731
28731
|
}));
|
|
28732
28732
|
}
|
|
@@ -34624,25 +34624,25 @@ var require_definition = __commonJS2({
|
|
|
34624
34624
|
return arr && arr.length > 0 ? arr : void 0;
|
|
34625
34625
|
}
|
|
34626
34626
|
var GraphQLScalarType4 = /* @__PURE__ */ function() {
|
|
34627
|
-
function GraphQLScalarType5(
|
|
34627
|
+
function GraphQLScalarType5(config22) {
|
|
34628
34628
|
var _config$parseValue, _config$serialize, _config$parseLiteral;
|
|
34629
|
-
var parseValue = (_config$parseValue =
|
|
34630
|
-
this.name =
|
|
34631
|
-
this.description =
|
|
34632
|
-
this.specifiedByUrl =
|
|
34633
|
-
this.serialize = (_config$serialize =
|
|
34629
|
+
var parseValue = (_config$parseValue = config22.parseValue) !== null && _config$parseValue !== void 0 ? _config$parseValue : _identityFunc.default;
|
|
34630
|
+
this.name = config22.name;
|
|
34631
|
+
this.description = config22.description;
|
|
34632
|
+
this.specifiedByUrl = config22.specifiedByUrl;
|
|
34633
|
+
this.serialize = (_config$serialize = config22.serialize) !== null && _config$serialize !== void 0 ? _config$serialize : _identityFunc.default;
|
|
34634
34634
|
this.parseValue = parseValue;
|
|
34635
|
-
this.parseLiteral = (_config$parseLiteral =
|
|
34635
|
+
this.parseLiteral = (_config$parseLiteral = config22.parseLiteral) !== null && _config$parseLiteral !== void 0 ? _config$parseLiteral : function(node2, variables) {
|
|
34636
34636
|
return parseValue((0, _valueFromASTUntyped.valueFromASTUntyped)(node2, variables));
|
|
34637
34637
|
};
|
|
34638
|
-
this.extensions =
|
|
34639
|
-
this.astNode =
|
|
34640
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
34641
|
-
typeof
|
|
34642
|
-
|
|
34643
|
-
|
|
34644
|
-
if (
|
|
34645
|
-
typeof
|
|
34638
|
+
this.extensions = config22.extensions && (0, _toObjMap.default)(config22.extensions);
|
|
34639
|
+
this.astNode = config22.astNode;
|
|
34640
|
+
this.extensionASTNodes = undefineIfEmpty(config22.extensionASTNodes);
|
|
34641
|
+
typeof config22.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
34642
|
+
config22.specifiedByUrl == null || typeof config22.specifiedByUrl === "string" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide "specifiedByUrl" as a string, ') + "but got: ".concat((0, _inspect.default)(config22.specifiedByUrl), "."));
|
|
34643
|
+
config22.serialize == null || typeof config22.serialize === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.'));
|
|
34644
|
+
if (config22.parseLiteral) {
|
|
34645
|
+
typeof config22.parseValue === "function" && typeof config22.parseLiteral === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide both "parseValue" and "parseLiteral" functions.'));
|
|
34646
34646
|
}
|
|
34647
34647
|
}
|
|
34648
34648
|
var _proto = GraphQLScalarType5.prototype;
|
|
@@ -34677,17 +34677,17 @@ var require_definition = __commonJS2({
|
|
|
34677
34677
|
exports.GraphQLScalarType = GraphQLScalarType4;
|
|
34678
34678
|
(0, _defineInspect.default)(GraphQLScalarType4);
|
|
34679
34679
|
var GraphQLObjectType5 = /* @__PURE__ */ function() {
|
|
34680
|
-
function GraphQLObjectType6(
|
|
34681
|
-
this.name =
|
|
34682
|
-
this.description =
|
|
34683
|
-
this.isTypeOf =
|
|
34684
|
-
this.extensions =
|
|
34685
|
-
this.astNode =
|
|
34686
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
34687
|
-
this._fields = defineFieldMap.bind(void 0,
|
|
34688
|
-
this._interfaces = defineInterfaces.bind(void 0,
|
|
34689
|
-
typeof
|
|
34690
|
-
|
|
34680
|
+
function GraphQLObjectType6(config22) {
|
|
34681
|
+
this.name = config22.name;
|
|
34682
|
+
this.description = config22.description;
|
|
34683
|
+
this.isTypeOf = config22.isTypeOf;
|
|
34684
|
+
this.extensions = config22.extensions && (0, _toObjMap.default)(config22.extensions);
|
|
34685
|
+
this.astNode = config22.astNode;
|
|
34686
|
+
this.extensionASTNodes = undefineIfEmpty(config22.extensionASTNodes);
|
|
34687
|
+
this._fields = defineFieldMap.bind(void 0, config22);
|
|
34688
|
+
this._interfaces = defineInterfaces.bind(void 0, config22);
|
|
34689
|
+
typeof config22.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
34690
|
+
config22.isTypeOf == null || typeof config22.isTypeOf === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide "isTypeOf" as a function, ') + "but got: ".concat((0, _inspect.default)(config22.isTypeOf), "."));
|
|
34691
34691
|
}
|
|
34692
34692
|
var _proto2 = GraphQLObjectType6.prototype;
|
|
34693
34693
|
_proto2.getFields = function getFields() {
|
|
@@ -34730,22 +34730,22 @@ var require_definition = __commonJS2({
|
|
|
34730
34730
|
}();
|
|
34731
34731
|
exports.GraphQLObjectType = GraphQLObjectType5;
|
|
34732
34732
|
(0, _defineInspect.default)(GraphQLObjectType5);
|
|
34733
|
-
function defineInterfaces(
|
|
34733
|
+
function defineInterfaces(config22) {
|
|
34734
34734
|
var _resolveThunk;
|
|
34735
|
-
var interfaces = (_resolveThunk = resolveThunk(
|
|
34736
|
-
Array.isArray(interfaces) || (0, _devAssert.default)(0, "".concat(
|
|
34735
|
+
var interfaces = (_resolveThunk = resolveThunk(config22.interfaces)) !== null && _resolveThunk !== void 0 ? _resolveThunk : [];
|
|
34736
|
+
Array.isArray(interfaces) || (0, _devAssert.default)(0, "".concat(config22.name, " interfaces must be an Array or a function which returns an Array."));
|
|
34737
34737
|
return interfaces;
|
|
34738
34738
|
}
|
|
34739
|
-
function defineFieldMap(
|
|
34740
|
-
var fieldMap = resolveThunk(
|
|
34741
|
-
isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(
|
|
34739
|
+
function defineFieldMap(config22) {
|
|
34740
|
+
var fieldMap = resolveThunk(config22.fields);
|
|
34741
|
+
isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(config22.name, " fields must be an object with field names as keys or a function which returns such an object."));
|
|
34742
34742
|
return (0, _mapValue.default)(fieldMap, function(fieldConfig, fieldName) {
|
|
34743
34743
|
var _fieldConfig$args;
|
|
34744
|
-
isPlainObj(fieldConfig) || (0, _devAssert.default)(0, "".concat(
|
|
34745
|
-
!("isDeprecated" in fieldConfig) || (0, _devAssert.default)(0, "".concat(
|
|
34746
|
-
fieldConfig.resolve == null || typeof fieldConfig.resolve === "function" || (0, _devAssert.default)(0, "".concat(
|
|
34744
|
+
isPlainObj(fieldConfig) || (0, _devAssert.default)(0, "".concat(config22.name, ".").concat(fieldName, " field config must be an object."));
|
|
34745
|
+
!("isDeprecated" in fieldConfig) || (0, _devAssert.default)(0, "".concat(config22.name, ".").concat(fieldName, ' should provide "deprecationReason" instead of "isDeprecated".'));
|
|
34746
|
+
fieldConfig.resolve == null || typeof fieldConfig.resolve === "function" || (0, _devAssert.default)(0, "".concat(config22.name, ".").concat(fieldName, " field resolver must be a function if ") + "provided, but got: ".concat((0, _inspect.default)(fieldConfig.resolve), "."));
|
|
34747
34747
|
var argsConfig = (_fieldConfig$args = fieldConfig.args) !== null && _fieldConfig$args !== void 0 ? _fieldConfig$args : {};
|
|
34748
|
-
isPlainObj(argsConfig) || (0, _devAssert.default)(0, "".concat(
|
|
34748
|
+
isPlainObj(argsConfig) || (0, _devAssert.default)(0, "".concat(config22.name, ".").concat(fieldName, " args must be an object with argument names as keys."));
|
|
34749
34749
|
var args = (0, _objectEntries.default)(argsConfig).map(function(_ref) {
|
|
34750
34750
|
var argName = _ref[0], argConfig = _ref[1];
|
|
34751
34751
|
return {
|
|
@@ -34807,17 +34807,17 @@ var require_definition = __commonJS2({
|
|
|
34807
34807
|
return isNonNullType6(arg.type) && arg.defaultValue === void 0;
|
|
34808
34808
|
}
|
|
34809
34809
|
var GraphQLInterfaceType5 = /* @__PURE__ */ function() {
|
|
34810
|
-
function GraphQLInterfaceType6(
|
|
34811
|
-
this.name =
|
|
34812
|
-
this.description =
|
|
34813
|
-
this.resolveType =
|
|
34814
|
-
this.extensions =
|
|
34815
|
-
this.astNode =
|
|
34816
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
34817
|
-
this._fields = defineFieldMap.bind(void 0,
|
|
34818
|
-
this._interfaces = defineInterfaces.bind(void 0,
|
|
34819
|
-
typeof
|
|
34820
|
-
|
|
34810
|
+
function GraphQLInterfaceType6(config22) {
|
|
34811
|
+
this.name = config22.name;
|
|
34812
|
+
this.description = config22.description;
|
|
34813
|
+
this.resolveType = config22.resolveType;
|
|
34814
|
+
this.extensions = config22.extensions && (0, _toObjMap.default)(config22.extensions);
|
|
34815
|
+
this.astNode = config22.astNode;
|
|
34816
|
+
this.extensionASTNodes = undefineIfEmpty(config22.extensionASTNodes);
|
|
34817
|
+
this._fields = defineFieldMap.bind(void 0, config22);
|
|
34818
|
+
this._interfaces = defineInterfaces.bind(void 0, config22);
|
|
34819
|
+
typeof config22.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
34820
|
+
config22.resolveType == null || typeof config22.resolveType === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide "resolveType" as a function, ') + "but got: ".concat((0, _inspect.default)(config22.resolveType), "."));
|
|
34821
34821
|
}
|
|
34822
34822
|
var _proto3 = GraphQLInterfaceType6.prototype;
|
|
34823
34823
|
_proto3.getFields = function getFields() {
|
|
@@ -34862,16 +34862,16 @@ var require_definition = __commonJS2({
|
|
|
34862
34862
|
exports.GraphQLInterfaceType = GraphQLInterfaceType5;
|
|
34863
34863
|
(0, _defineInspect.default)(GraphQLInterfaceType5);
|
|
34864
34864
|
var GraphQLUnionType3 = /* @__PURE__ */ function() {
|
|
34865
|
-
function GraphQLUnionType4(
|
|
34866
|
-
this.name =
|
|
34867
|
-
this.description =
|
|
34868
|
-
this.resolveType =
|
|
34869
|
-
this.extensions =
|
|
34870
|
-
this.astNode =
|
|
34871
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
34872
|
-
this._types = defineTypes.bind(void 0,
|
|
34873
|
-
typeof
|
|
34874
|
-
|
|
34865
|
+
function GraphQLUnionType4(config22) {
|
|
34866
|
+
this.name = config22.name;
|
|
34867
|
+
this.description = config22.description;
|
|
34868
|
+
this.resolveType = config22.resolveType;
|
|
34869
|
+
this.extensions = config22.extensions && (0, _toObjMap.default)(config22.extensions);
|
|
34870
|
+
this.astNode = config22.astNode;
|
|
34871
|
+
this.extensionASTNodes = undefineIfEmpty(config22.extensionASTNodes);
|
|
34872
|
+
this._types = defineTypes.bind(void 0, config22);
|
|
34873
|
+
typeof config22.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
34874
|
+
config22.resolveType == null || typeof config22.resolveType === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide "resolveType" as a function, ') + "but got: ".concat((0, _inspect.default)(config22.resolveType), "."));
|
|
34875
34875
|
}
|
|
34876
34876
|
var _proto4 = GraphQLUnionType4.prototype;
|
|
34877
34877
|
_proto4.getTypes = function getTypes() {
|
|
@@ -34908,26 +34908,26 @@ var require_definition = __commonJS2({
|
|
|
34908
34908
|
}();
|
|
34909
34909
|
exports.GraphQLUnionType = GraphQLUnionType3;
|
|
34910
34910
|
(0, _defineInspect.default)(GraphQLUnionType3);
|
|
34911
|
-
function defineTypes(
|
|
34912
|
-
var types42 = resolveThunk(
|
|
34913
|
-
Array.isArray(types42) || (0, _devAssert.default)(0, "Must provide Array of types or a function which returns such an array for Union ".concat(
|
|
34911
|
+
function defineTypes(config22) {
|
|
34912
|
+
var types42 = resolveThunk(config22.types);
|
|
34913
|
+
Array.isArray(types42) || (0, _devAssert.default)(0, "Must provide Array of types or a function which returns such an array for Union ".concat(config22.name, "."));
|
|
34914
34914
|
return types42;
|
|
34915
34915
|
}
|
|
34916
34916
|
var GraphQLEnumType4 = /* @__PURE__ */ function() {
|
|
34917
|
-
function GraphQLEnumType5(
|
|
34918
|
-
this.name =
|
|
34919
|
-
this.description =
|
|
34920
|
-
this.extensions =
|
|
34921
|
-
this.astNode =
|
|
34922
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
34923
|
-
this._values = defineEnumValues(this.name,
|
|
34917
|
+
function GraphQLEnumType5(config22) {
|
|
34918
|
+
this.name = config22.name;
|
|
34919
|
+
this.description = config22.description;
|
|
34920
|
+
this.extensions = config22.extensions && (0, _toObjMap.default)(config22.extensions);
|
|
34921
|
+
this.astNode = config22.astNode;
|
|
34922
|
+
this.extensionASTNodes = undefineIfEmpty(config22.extensionASTNodes);
|
|
34923
|
+
this._values = defineEnumValues(this.name, config22.values);
|
|
34924
34924
|
this._valueLookup = new Map(this._values.map(function(enumValue) {
|
|
34925
34925
|
return [enumValue.value, enumValue];
|
|
34926
34926
|
}));
|
|
34927
34927
|
this._nameLookup = (0, _keyMap.default)(this._values, function(value2) {
|
|
34928
34928
|
return value2.name;
|
|
34929
34929
|
});
|
|
34930
|
-
typeof
|
|
34930
|
+
typeof config22.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
34931
34931
|
}
|
|
34932
34932
|
var _proto5 = GraphQLEnumType5.prototype;
|
|
34933
34933
|
_proto5.getValues = function getValues() {
|
|
@@ -35029,14 +35029,14 @@ var require_definition = __commonJS2({
|
|
|
35029
35029
|
});
|
|
35030
35030
|
}
|
|
35031
35031
|
var GraphQLInputObjectType4 = /* @__PURE__ */ function() {
|
|
35032
|
-
function GraphQLInputObjectType5(
|
|
35033
|
-
this.name =
|
|
35034
|
-
this.description =
|
|
35035
|
-
this.extensions =
|
|
35036
|
-
this.astNode =
|
|
35037
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
35038
|
-
this._fields = defineInputFieldMap.bind(void 0,
|
|
35039
|
-
typeof
|
|
35032
|
+
function GraphQLInputObjectType5(config22) {
|
|
35033
|
+
this.name = config22.name;
|
|
35034
|
+
this.description = config22.description;
|
|
35035
|
+
this.extensions = config22.extensions && (0, _toObjMap.default)(config22.extensions);
|
|
35036
|
+
this.astNode = config22.astNode;
|
|
35037
|
+
this.extensionASTNodes = undefineIfEmpty(config22.extensionASTNodes);
|
|
35038
|
+
this._fields = defineInputFieldMap.bind(void 0, config22);
|
|
35039
|
+
typeof config22.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
35040
35040
|
}
|
|
35041
35041
|
var _proto6 = GraphQLInputObjectType5.prototype;
|
|
35042
35042
|
_proto6.getFields = function getFields() {
|
|
@@ -35082,11 +35082,11 @@ var require_definition = __commonJS2({
|
|
|
35082
35082
|
}();
|
|
35083
35083
|
exports.GraphQLInputObjectType = GraphQLInputObjectType4;
|
|
35084
35084
|
(0, _defineInspect.default)(GraphQLInputObjectType4);
|
|
35085
|
-
function defineInputFieldMap(
|
|
35086
|
-
var fieldMap = resolveThunk(
|
|
35087
|
-
isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(
|
|
35085
|
+
function defineInputFieldMap(config22) {
|
|
35086
|
+
var fieldMap = resolveThunk(config22.fields);
|
|
35087
|
+
isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(config22.name, " fields must be an object with field names as keys or a function which returns such an object."));
|
|
35088
35088
|
return (0, _mapValue.default)(fieldMap, function(fieldConfig, fieldName) {
|
|
35089
|
-
!("resolve" in fieldConfig) || (0, _devAssert.default)(0, "".concat(
|
|
35089
|
+
!("resolve" in fieldConfig) || (0, _devAssert.default)(0, "".concat(config22.name, ".").concat(fieldName, " field has a resolve property, but Input Types cannot define resolvers."));
|
|
35090
35090
|
return {
|
|
35091
35091
|
name: fieldName,
|
|
35092
35092
|
description: fieldConfig.description,
|
|
@@ -36265,18 +36265,18 @@ var require_directives = __commonJS2({
|
|
|
36265
36265
|
return directive;
|
|
36266
36266
|
}
|
|
36267
36267
|
var GraphQLDirective2 = /* @__PURE__ */ function() {
|
|
36268
|
-
function GraphQLDirective3(
|
|
36268
|
+
function GraphQLDirective3(config22) {
|
|
36269
36269
|
var _config$isRepeatable, _config$args;
|
|
36270
|
-
this.name =
|
|
36271
|
-
this.description =
|
|
36272
|
-
this.locations =
|
|
36273
|
-
this.isRepeatable = (_config$isRepeatable =
|
|
36274
|
-
this.extensions =
|
|
36275
|
-
this.astNode =
|
|
36276
|
-
|
|
36277
|
-
Array.isArray(
|
|
36278
|
-
var args = (_config$args =
|
|
36279
|
-
(0, _isObjectLike.default)(args) && !Array.isArray(args) || (0, _devAssert.default)(0, "@".concat(
|
|
36270
|
+
this.name = config22.name;
|
|
36271
|
+
this.description = config22.description;
|
|
36272
|
+
this.locations = config22.locations;
|
|
36273
|
+
this.isRepeatable = (_config$isRepeatable = config22.isRepeatable) !== null && _config$isRepeatable !== void 0 ? _config$isRepeatable : false;
|
|
36274
|
+
this.extensions = config22.extensions && (0, _toObjMap.default)(config22.extensions);
|
|
36275
|
+
this.astNode = config22.astNode;
|
|
36276
|
+
config22.name || (0, _devAssert.default)(0, "Directive must be named.");
|
|
36277
|
+
Array.isArray(config22.locations) || (0, _devAssert.default)(0, "@".concat(config22.name, " locations must be an Array."));
|
|
36278
|
+
var args = (_config$args = config22.args) !== null && _config$args !== void 0 ? _config$args : {};
|
|
36279
|
+
(0, _isObjectLike.default)(args) && !Array.isArray(args) || (0, _devAssert.default)(0, "@".concat(config22.name, " args must be an object with argument names as keys."));
|
|
36280
36280
|
this.args = (0, _objectEntries.default)(args).map(function(_ref) {
|
|
36281
36281
|
var argName = _ref[0], argConfig = _ref[1];
|
|
36282
36282
|
return {
|
|
@@ -36430,23 +36430,23 @@ var require_schema = __commonJS2({
|
|
|
36430
36430
|
return schema;
|
|
36431
36431
|
}
|
|
36432
36432
|
var GraphQLSchema2 = /* @__PURE__ */ function() {
|
|
36433
|
-
function GraphQLSchema3(
|
|
36433
|
+
function GraphQLSchema3(config22) {
|
|
36434
36434
|
var _config$directives;
|
|
36435
|
-
this.__validationErrors =
|
|
36436
|
-
(0, _isObjectLike.default)(
|
|
36437
|
-
!
|
|
36438
|
-
!
|
|
36439
|
-
this.description =
|
|
36440
|
-
this.extensions =
|
|
36441
|
-
this.astNode =
|
|
36442
|
-
this.extensionASTNodes =
|
|
36443
|
-
this._queryType =
|
|
36444
|
-
this._mutationType =
|
|
36445
|
-
this._subscriptionType =
|
|
36446
|
-
this._directives = (_config$directives =
|
|
36447
|
-
var allReferencedTypes = new Set(
|
|
36448
|
-
if (
|
|
36449
|
-
for (var _i2 = 0, _config$types2 =
|
|
36435
|
+
this.__validationErrors = config22.assumeValid === true ? [] : void 0;
|
|
36436
|
+
(0, _isObjectLike.default)(config22) || (0, _devAssert.default)(0, "Must provide configuration object.");
|
|
36437
|
+
!config22.types || Array.isArray(config22.types) || (0, _devAssert.default)(0, '"types" must be Array if provided but got: '.concat((0, _inspect.default)(config22.types), "."));
|
|
36438
|
+
!config22.directives || Array.isArray(config22.directives) || (0, _devAssert.default)(0, '"directives" must be Array if provided but got: ' + "".concat((0, _inspect.default)(config22.directives), "."));
|
|
36439
|
+
this.description = config22.description;
|
|
36440
|
+
this.extensions = config22.extensions && (0, _toObjMap.default)(config22.extensions);
|
|
36441
|
+
this.astNode = config22.astNode;
|
|
36442
|
+
this.extensionASTNodes = config22.extensionASTNodes;
|
|
36443
|
+
this._queryType = config22.query;
|
|
36444
|
+
this._mutationType = config22.mutation;
|
|
36445
|
+
this._subscriptionType = config22.subscription;
|
|
36446
|
+
this._directives = (_config$directives = config22.directives) !== null && _config$directives !== void 0 ? _config$directives : _directives.specifiedDirectives;
|
|
36447
|
+
var allReferencedTypes = new Set(config22.types);
|
|
36448
|
+
if (config22.types != null) {
|
|
36449
|
+
for (var _i2 = 0, _config$types2 = config22.types; _i2 < _config$types2.length; _i2++) {
|
|
36450
36450
|
var type = _config$types2[_i2];
|
|
36451
36451
|
allReferencedTypes.delete(type);
|
|
36452
36452
|
collectReferencedTypes(type, allReferencedTypes);
|
|
@@ -42636,9 +42636,9 @@ var require_extendSchema = __commonJS2({
|
|
|
42636
42636
|
return typeMap[type.name];
|
|
42637
42637
|
}
|
|
42638
42638
|
function replaceDirective(directive) {
|
|
42639
|
-
var
|
|
42640
|
-
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({},
|
|
42641
|
-
args: (0, _mapValue.default)(
|
|
42639
|
+
var config22 = directive.toConfig();
|
|
42640
|
+
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({}, config22), {}, {
|
|
42641
|
+
args: (0, _mapValue.default)(config22.args, extendArg)
|
|
42642
42642
|
}));
|
|
42643
42643
|
}
|
|
42644
42644
|
function extendNamedType(type) {
|
|
@@ -42667,80 +42667,80 @@ var require_extendSchema = __commonJS2({
|
|
|
42667
42667
|
}
|
|
42668
42668
|
function extendInputObjectType(type) {
|
|
42669
42669
|
var _typeExtensionsMap$co;
|
|
42670
|
-
var
|
|
42671
|
-
var extensions = (_typeExtensionsMap$co = typeExtensionsMap[
|
|
42672
|
-
return new _definition.GraphQLInputObjectType(_objectSpread(_objectSpread({},
|
|
42670
|
+
var config22 = type.toConfig();
|
|
42671
|
+
var extensions = (_typeExtensionsMap$co = typeExtensionsMap[config22.name]) !== null && _typeExtensionsMap$co !== void 0 ? _typeExtensionsMap$co : [];
|
|
42672
|
+
return new _definition.GraphQLInputObjectType(_objectSpread(_objectSpread({}, config22), {}, {
|
|
42673
42673
|
fields: function fields() {
|
|
42674
|
-
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(
|
|
42674
|
+
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(config22.fields, function(field) {
|
|
42675
42675
|
return _objectSpread(_objectSpread({}, field), {}, {
|
|
42676
42676
|
type: replaceType(field.type)
|
|
42677
42677
|
});
|
|
42678
42678
|
})), buildInputFieldMap(extensions));
|
|
42679
42679
|
},
|
|
42680
|
-
extensionASTNodes:
|
|
42680
|
+
extensionASTNodes: config22.extensionASTNodes.concat(extensions)
|
|
42681
42681
|
}));
|
|
42682
42682
|
}
|
|
42683
42683
|
function extendEnumType(type) {
|
|
42684
42684
|
var _typeExtensionsMap$ty;
|
|
42685
|
-
var
|
|
42685
|
+
var config22 = type.toConfig();
|
|
42686
42686
|
var extensions = (_typeExtensionsMap$ty = typeExtensionsMap[type.name]) !== null && _typeExtensionsMap$ty !== void 0 ? _typeExtensionsMap$ty : [];
|
|
42687
|
-
return new _definition.GraphQLEnumType(_objectSpread(_objectSpread({},
|
|
42688
|
-
values: _objectSpread(_objectSpread({},
|
|
42689
|
-
extensionASTNodes:
|
|
42687
|
+
return new _definition.GraphQLEnumType(_objectSpread(_objectSpread({}, config22), {}, {
|
|
42688
|
+
values: _objectSpread(_objectSpread({}, config22.values), buildEnumValueMap(extensions)),
|
|
42689
|
+
extensionASTNodes: config22.extensionASTNodes.concat(extensions)
|
|
42690
42690
|
}));
|
|
42691
42691
|
}
|
|
42692
42692
|
function extendScalarType(type) {
|
|
42693
42693
|
var _typeExtensionsMap$co2;
|
|
42694
|
-
var
|
|
42695
|
-
var extensions = (_typeExtensionsMap$co2 = typeExtensionsMap[
|
|
42696
|
-
var specifiedByUrl =
|
|
42694
|
+
var config22 = type.toConfig();
|
|
42695
|
+
var extensions = (_typeExtensionsMap$co2 = typeExtensionsMap[config22.name]) !== null && _typeExtensionsMap$co2 !== void 0 ? _typeExtensionsMap$co2 : [];
|
|
42696
|
+
var specifiedByUrl = config22.specifiedByUrl;
|
|
42697
42697
|
for (var _i8 = 0; _i8 < extensions.length; _i8++) {
|
|
42698
42698
|
var _getSpecifiedByUrl;
|
|
42699
42699
|
var extensionNode = extensions[_i8];
|
|
42700
42700
|
specifiedByUrl = (_getSpecifiedByUrl = getSpecifiedByUrl(extensionNode)) !== null && _getSpecifiedByUrl !== void 0 ? _getSpecifiedByUrl : specifiedByUrl;
|
|
42701
42701
|
}
|
|
42702
|
-
return new _definition.GraphQLScalarType(_objectSpread(_objectSpread({},
|
|
42702
|
+
return new _definition.GraphQLScalarType(_objectSpread(_objectSpread({}, config22), {}, {
|
|
42703
42703
|
specifiedByUrl,
|
|
42704
|
-
extensionASTNodes:
|
|
42704
|
+
extensionASTNodes: config22.extensionASTNodes.concat(extensions)
|
|
42705
42705
|
}));
|
|
42706
42706
|
}
|
|
42707
42707
|
function extendObjectType(type) {
|
|
42708
42708
|
var _typeExtensionsMap$co3;
|
|
42709
|
-
var
|
|
42710
|
-
var extensions = (_typeExtensionsMap$co3 = typeExtensionsMap[
|
|
42711
|
-
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({},
|
|
42709
|
+
var config22 = type.toConfig();
|
|
42710
|
+
var extensions = (_typeExtensionsMap$co3 = typeExtensionsMap[config22.name]) !== null && _typeExtensionsMap$co3 !== void 0 ? _typeExtensionsMap$co3 : [];
|
|
42711
|
+
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({}, config22), {}, {
|
|
42712
42712
|
interfaces: function interfaces() {
|
|
42713
42713
|
return [].concat(type.getInterfaces().map(replaceNamedType), buildInterfaces(extensions));
|
|
42714
42714
|
},
|
|
42715
42715
|
fields: function fields() {
|
|
42716
|
-
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(
|
|
42716
|
+
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(config22.fields, extendField)), buildFieldMap(extensions));
|
|
42717
42717
|
},
|
|
42718
|
-
extensionASTNodes:
|
|
42718
|
+
extensionASTNodes: config22.extensionASTNodes.concat(extensions)
|
|
42719
42719
|
}));
|
|
42720
42720
|
}
|
|
42721
42721
|
function extendInterfaceType(type) {
|
|
42722
42722
|
var _typeExtensionsMap$co4;
|
|
42723
|
-
var
|
|
42724
|
-
var extensions = (_typeExtensionsMap$co4 = typeExtensionsMap[
|
|
42725
|
-
return new _definition.GraphQLInterfaceType(_objectSpread(_objectSpread({},
|
|
42723
|
+
var config22 = type.toConfig();
|
|
42724
|
+
var extensions = (_typeExtensionsMap$co4 = typeExtensionsMap[config22.name]) !== null && _typeExtensionsMap$co4 !== void 0 ? _typeExtensionsMap$co4 : [];
|
|
42725
|
+
return new _definition.GraphQLInterfaceType(_objectSpread(_objectSpread({}, config22), {}, {
|
|
42726
42726
|
interfaces: function interfaces() {
|
|
42727
42727
|
return [].concat(type.getInterfaces().map(replaceNamedType), buildInterfaces(extensions));
|
|
42728
42728
|
},
|
|
42729
42729
|
fields: function fields() {
|
|
42730
|
-
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(
|
|
42730
|
+
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(config22.fields, extendField)), buildFieldMap(extensions));
|
|
42731
42731
|
},
|
|
42732
|
-
extensionASTNodes:
|
|
42732
|
+
extensionASTNodes: config22.extensionASTNodes.concat(extensions)
|
|
42733
42733
|
}));
|
|
42734
42734
|
}
|
|
42735
42735
|
function extendUnionType(type) {
|
|
42736
42736
|
var _typeExtensionsMap$co5;
|
|
42737
|
-
var
|
|
42738
|
-
var extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[
|
|
42739
|
-
return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({},
|
|
42737
|
+
var config22 = type.toConfig();
|
|
42738
|
+
var extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[config22.name]) !== null && _typeExtensionsMap$co5 !== void 0 ? _typeExtensionsMap$co5 : [];
|
|
42739
|
+
return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({}, config22), {}, {
|
|
42740
42740
|
types: function types42() {
|
|
42741
42741
|
return [].concat(type.getTypes().map(replaceNamedType), buildUnionTypes(extensions));
|
|
42742
42742
|
},
|
|
42743
|
-
extensionASTNodes:
|
|
42743
|
+
extensionASTNodes: config22.extensionASTNodes.concat(extensions)
|
|
42744
42744
|
}));
|
|
42745
42745
|
}
|
|
42746
42746
|
function extendField(field) {
|
|
@@ -43055,24 +43055,24 @@ var require_buildASTSchema = __commonJS2({
|
|
|
43055
43055
|
extensionASTNodes: [],
|
|
43056
43056
|
assumeValid: false
|
|
43057
43057
|
};
|
|
43058
|
-
var
|
|
43059
|
-
if (
|
|
43060
|
-
for (var _i2 = 0, _config$types2 =
|
|
43058
|
+
var config22 = (0, _extendSchema.extendSchemaImpl)(emptySchemaConfig, documentAST, options);
|
|
43059
|
+
if (config22.astNode == null) {
|
|
43060
|
+
for (var _i2 = 0, _config$types2 = config22.types; _i2 < _config$types2.length; _i2++) {
|
|
43061
43061
|
var type = _config$types2[_i2];
|
|
43062
43062
|
switch (type.name) {
|
|
43063
43063
|
case "Query":
|
|
43064
|
-
|
|
43064
|
+
config22.query = type;
|
|
43065
43065
|
break;
|
|
43066
43066
|
case "Mutation":
|
|
43067
|
-
|
|
43067
|
+
config22.mutation = type;
|
|
43068
43068
|
break;
|
|
43069
43069
|
case "Subscription":
|
|
43070
|
-
|
|
43070
|
+
config22.subscription = type;
|
|
43071
43071
|
break;
|
|
43072
43072
|
}
|
|
43073
43073
|
}
|
|
43074
43074
|
}
|
|
43075
|
-
var directives =
|
|
43075
|
+
var directives = config22.directives;
|
|
43076
43076
|
var _loop = function _loop2(_i42) {
|
|
43077
43077
|
var stdDirective = _directives.specifiedDirectives[_i42];
|
|
43078
43078
|
if (directives.every(function(directive) {
|
|
@@ -43084,7 +43084,7 @@ var require_buildASTSchema = __commonJS2({
|
|
|
43084
43084
|
for (var _i4 = 0; _i4 < _directives.specifiedDirectives.length; _i4++) {
|
|
43085
43085
|
_loop(_i4);
|
|
43086
43086
|
}
|
|
43087
|
-
return new _schema.GraphQLSchema(
|
|
43087
|
+
return new _schema.GraphQLSchema(config22);
|
|
43088
43088
|
}
|
|
43089
43089
|
function buildSchema3(source, options) {
|
|
43090
43090
|
var document2 = (0, _parser.parse)(source, {
|
|
@@ -43184,12 +43184,12 @@ var require_lexicographicSortSchema = __commonJS2({
|
|
|
43184
43184
|
return maybeType && replaceNamedType(maybeType);
|
|
43185
43185
|
}
|
|
43186
43186
|
function sortDirective(directive) {
|
|
43187
|
-
var
|
|
43188
|
-
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({},
|
|
43189
|
-
locations: sortBy(
|
|
43187
|
+
var config22 = directive.toConfig();
|
|
43188
|
+
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({}, config22), {}, {
|
|
43189
|
+
locations: sortBy(config22.locations, function(x22) {
|
|
43190
43190
|
return x22;
|
|
43191
43191
|
}),
|
|
43192
|
-
args: sortArgs(
|
|
43192
|
+
args: sortArgs(config22.args)
|
|
43193
43193
|
}));
|
|
43194
43194
|
}
|
|
43195
43195
|
function sortArgs(args) {
|
|
@@ -43222,13 +43222,13 @@ var require_lexicographicSortSchema = __commonJS2({
|
|
|
43222
43222
|
return type;
|
|
43223
43223
|
}
|
|
43224
43224
|
if ((0, _definition.isObjectType)(type)) {
|
|
43225
|
-
var
|
|
43226
|
-
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({},
|
|
43225
|
+
var config22 = type.toConfig();
|
|
43226
|
+
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({}, config22), {}, {
|
|
43227
43227
|
interfaces: function interfaces() {
|
|
43228
|
-
return sortTypes(
|
|
43228
|
+
return sortTypes(config22.interfaces);
|
|
43229
43229
|
},
|
|
43230
43230
|
fields: function fields() {
|
|
43231
|
-
return sortFields(
|
|
43231
|
+
return sortFields(config22.fields);
|
|
43232
43232
|
}
|
|
43233
43233
|
}));
|
|
43234
43234
|
}
|
|
@@ -84597,13 +84597,13 @@ var require_esprima2 = __commonJS2({
|
|
|
84597
84597
|
return Reader2;
|
|
84598
84598
|
}();
|
|
84599
84599
|
var Tokenizer = function() {
|
|
84600
|
-
function Tokenizer2(code,
|
|
84600
|
+
function Tokenizer2(code, config22) {
|
|
84601
84601
|
this.errorHandler = new error_handler_1.ErrorHandler();
|
|
84602
|
-
this.errorHandler.tolerant =
|
|
84602
|
+
this.errorHandler.tolerant = config22 ? typeof config22.tolerant === "boolean" && config22.tolerant : false;
|
|
84603
84603
|
this.scanner = new scanner_1.Scanner(code, this.errorHandler);
|
|
84604
|
-
this.scanner.trackComment =
|
|
84605
|
-
this.trackRange =
|
|
84606
|
-
this.trackLoc =
|
|
84604
|
+
this.scanner.trackComment = config22 ? typeof config22.comment === "boolean" && config22.comment : false;
|
|
84605
|
+
this.trackRange = config22 ? typeof config22.range === "boolean" && config22.range : false;
|
|
84606
|
+
this.trackLoc = config22 ? typeof config22.loc === "boolean" && config22.loc : false;
|
|
84607
84607
|
this.buffer = [];
|
|
84608
84608
|
this.reader = new Reader();
|
|
84609
84609
|
}
|
|
@@ -86754,11 +86754,11 @@ var require_printer2 = __commonJS2({
|
|
|
86754
86754
|
return this.code;
|
|
86755
86755
|
};
|
|
86756
86756
|
var emptyPrintResult = new PrintResult("");
|
|
86757
|
-
var Printer = function Printer2(
|
|
86757
|
+
var Printer = function Printer2(config22) {
|
|
86758
86758
|
assert_1.default.ok(this instanceof Printer2);
|
|
86759
|
-
var explicitTabWidth =
|
|
86760
|
-
|
|
86761
|
-
|
|
86759
|
+
var explicitTabWidth = config22 && config22.tabWidth;
|
|
86760
|
+
config22 = (0, options_1.normalize)(config22);
|
|
86761
|
+
config22.sourceFileName = null;
|
|
86762
86762
|
function makePrintFunctionWith(options, overrides) {
|
|
86763
86763
|
options = Object.assign({}, options, overrides);
|
|
86764
86764
|
return function(path22) {
|
|
@@ -86773,19 +86773,19 @@ var require_printer2 = __commonJS2({
|
|
|
86773
86773
|
includeComments: false
|
|
86774
86774
|
}));
|
|
86775
86775
|
}
|
|
86776
|
-
var oldTabWidth =
|
|
86776
|
+
var oldTabWidth = config22.tabWidth;
|
|
86777
86777
|
if (!explicitTabWidth) {
|
|
86778
86778
|
var loc = path22.getNode().loc;
|
|
86779
86779
|
if (loc && loc.lines && loc.lines.guessTabWidth) {
|
|
86780
|
-
|
|
86780
|
+
config22.tabWidth = loc.lines.guessTabWidth();
|
|
86781
86781
|
}
|
|
86782
86782
|
}
|
|
86783
86783
|
var reprinter = (0, patcher_1.getReprinter)(path22);
|
|
86784
|
-
var lines = reprinter ? reprinter(print5) : genericPrint(path22,
|
|
86784
|
+
var lines = reprinter ? reprinter(print5) : genericPrint(path22, config22, options, makePrintFunctionWith(options, {
|
|
86785
86785
|
includeComments: true,
|
|
86786
86786
|
avoidRootParens: false
|
|
86787
86787
|
}));
|
|
86788
|
-
|
|
86788
|
+
config22.tabWidth = oldTabWidth;
|
|
86789
86789
|
return lines;
|
|
86790
86790
|
}
|
|
86791
86791
|
this.print = function(ast) {
|
|
@@ -86796,7 +86796,7 @@ var require_printer2 = __commonJS2({
|
|
|
86796
86796
|
includeComments: true,
|
|
86797
86797
|
avoidRootParens: false
|
|
86798
86798
|
});
|
|
86799
|
-
return new PrintResult(lines.toString(
|
|
86799
|
+
return new PrintResult(lines.toString(config22), util2.composeSourceMaps(config22.inputSourceMap, lines.getSourceMap(config22.sourceMapName, config22.sourceRoot)));
|
|
86800
86800
|
};
|
|
86801
86801
|
this.printGenerically = function(ast) {
|
|
86802
86802
|
if (!ast) {
|
|
@@ -86804,26 +86804,26 @@ var require_printer2 = __commonJS2({
|
|
|
86804
86804
|
}
|
|
86805
86805
|
function printGenerically(path3) {
|
|
86806
86806
|
return (0, comments_1.printComments)(path3, function(path4) {
|
|
86807
|
-
return genericPrint(path4,
|
|
86807
|
+
return genericPrint(path4, config22, {
|
|
86808
86808
|
includeComments: true,
|
|
86809
86809
|
avoidRootParens: false
|
|
86810
86810
|
}, printGenerically);
|
|
86811
86811
|
});
|
|
86812
86812
|
}
|
|
86813
86813
|
var path22 = fast_path_1.default.from(ast);
|
|
86814
|
-
var oldReuseWhitespace =
|
|
86815
|
-
|
|
86816
|
-
var pr = new PrintResult(printGenerically(path22).toString(
|
|
86817
|
-
|
|
86814
|
+
var oldReuseWhitespace = config22.reuseWhitespace;
|
|
86815
|
+
config22.reuseWhitespace = false;
|
|
86816
|
+
var pr = new PrintResult(printGenerically(path22).toString(config22));
|
|
86817
|
+
config22.reuseWhitespace = oldReuseWhitespace;
|
|
86818
86818
|
return pr;
|
|
86819
86819
|
};
|
|
86820
86820
|
};
|
|
86821
86821
|
exports.Printer = Printer;
|
|
86822
|
-
function genericPrint(path22,
|
|
86822
|
+
function genericPrint(path22, config22, options, printPath) {
|
|
86823
86823
|
assert_1.default.ok(path22 instanceof fast_path_1.default);
|
|
86824
86824
|
var node2 = path22.getValue();
|
|
86825
86825
|
var parts = [];
|
|
86826
|
-
var linesWithoutParens = genericPrintNoParens(path22,
|
|
86826
|
+
var linesWithoutParens = genericPrintNoParens(path22, config22, printPath);
|
|
86827
86827
|
if (!node2 || linesWithoutParens.isEmpty()) {
|
|
86828
86828
|
return linesWithoutParens;
|
|
86829
86829
|
}
|
|
@@ -89037,9 +89037,9 @@ var require_cjs = __commonJS2({
|
|
|
89037
89037
|
module.exports = deepmerge_1;
|
|
89038
89038
|
}
|
|
89039
89039
|
});
|
|
89040
|
-
async function runPipeline(
|
|
89040
|
+
async function runPipeline(config22, pipeline22, target) {
|
|
89041
89041
|
for (const transform of pipeline22) {
|
|
89042
|
-
await transform?.(
|
|
89042
|
+
await transform?.(config22, target);
|
|
89043
89043
|
}
|
|
89044
89044
|
}
|
|
89045
89045
|
var import_graphql16 = __toESM2(require_graphql2(), 1);
|
|
@@ -90112,35 +90112,35 @@ function rewireTypes(originalTypeMap, directives) {
|
|
|
90112
90112
|
}
|
|
90113
90113
|
function rewireNamedType(type) {
|
|
90114
90114
|
if ((0, import_graphql8.isObjectType)(type)) {
|
|
90115
|
-
const
|
|
90115
|
+
const config22 = type.toConfig();
|
|
90116
90116
|
const newConfig = {
|
|
90117
|
-
...
|
|
90118
|
-
fields: () => rewireFields(
|
|
90119
|
-
interfaces: () => rewireNamedTypes(
|
|
90117
|
+
...config22,
|
|
90118
|
+
fields: () => rewireFields(config22.fields),
|
|
90119
|
+
interfaces: () => rewireNamedTypes(config22.interfaces)
|
|
90120
90120
|
};
|
|
90121
90121
|
return new import_graphql8.GraphQLObjectType(newConfig);
|
|
90122
90122
|
} else if ((0, import_graphql8.isInterfaceType)(type)) {
|
|
90123
|
-
const
|
|
90123
|
+
const config22 = type.toConfig();
|
|
90124
90124
|
const newConfig = {
|
|
90125
|
-
...
|
|
90126
|
-
fields: () => rewireFields(
|
|
90125
|
+
...config22,
|
|
90126
|
+
fields: () => rewireFields(config22.fields)
|
|
90127
90127
|
};
|
|
90128
90128
|
if ("interfaces" in newConfig) {
|
|
90129
|
-
newConfig.interfaces = () => rewireNamedTypes(
|
|
90129
|
+
newConfig.interfaces = () => rewireNamedTypes(config22.interfaces);
|
|
90130
90130
|
}
|
|
90131
90131
|
return new import_graphql8.GraphQLInterfaceType(newConfig);
|
|
90132
90132
|
} else if ((0, import_graphql8.isUnionType)(type)) {
|
|
90133
|
-
const
|
|
90133
|
+
const config22 = type.toConfig();
|
|
90134
90134
|
const newConfig = {
|
|
90135
|
-
...
|
|
90136
|
-
types: () => rewireNamedTypes(
|
|
90135
|
+
...config22,
|
|
90136
|
+
types: () => rewireNamedTypes(config22.types)
|
|
90137
90137
|
};
|
|
90138
90138
|
return new import_graphql8.GraphQLUnionType(newConfig);
|
|
90139
90139
|
} else if ((0, import_graphql8.isInputObjectType)(type)) {
|
|
90140
|
-
const
|
|
90140
|
+
const config22 = type.toConfig();
|
|
90141
90141
|
const newConfig = {
|
|
90142
|
-
...
|
|
90143
|
-
fields: () => rewireInputFields(
|
|
90142
|
+
...config22,
|
|
90143
|
+
fields: () => rewireInputFields(config22.fields)
|
|
90144
90144
|
};
|
|
90145
90145
|
return new import_graphql8.GraphQLInputObjectType(newConfig);
|
|
90146
90146
|
} else if ((0, import_graphql8.isEnumType)(type)) {
|
|
@@ -90293,8 +90293,8 @@ function mapEnumValues(originalTypeMap, schema, schemaMapper) {
|
|
|
90293
90293
|
}
|
|
90294
90294
|
return mapTypes(originalTypeMap, schema, {
|
|
90295
90295
|
[MapperKind.ENUM_TYPE]: (type) => {
|
|
90296
|
-
const
|
|
90297
|
-
const originalEnumValueConfigMap =
|
|
90296
|
+
const config22 = type.toConfig();
|
|
90297
|
+
const originalEnumValueConfigMap = config22.values;
|
|
90298
90298
|
const newEnumValueConfigMap = {};
|
|
90299
90299
|
for (const externalValue in originalEnumValueConfigMap) {
|
|
90300
90300
|
const originalEnumValueConfig = originalEnumValueConfigMap[externalValue];
|
|
@@ -90309,7 +90309,7 @@ function mapEnumValues(originalTypeMap, schema, schemaMapper) {
|
|
|
90309
90309
|
}
|
|
90310
90310
|
}
|
|
90311
90311
|
return correctASTNodes(new import_graphql10.GraphQLEnumType({
|
|
90312
|
-
...
|
|
90312
|
+
...config22,
|
|
90313
90313
|
values: newEnumValueConfigMap
|
|
90314
90314
|
}));
|
|
90315
90315
|
}
|
|
@@ -90372,8 +90372,8 @@ function mapFields(originalTypeMap, schema, schemaMapper) {
|
|
|
90372
90372
|
newTypeMap[typeName] = originalType;
|
|
90373
90373
|
continue;
|
|
90374
90374
|
}
|
|
90375
|
-
const
|
|
90376
|
-
const originalFieldConfigMap =
|
|
90375
|
+
const config22 = originalType.toConfig();
|
|
90376
|
+
const originalFieldConfigMap = config22.fields;
|
|
90377
90377
|
const newFieldConfigMap = {};
|
|
90378
90378
|
for (const fieldName in originalFieldConfigMap) {
|
|
90379
90379
|
const originalFieldConfig = originalFieldConfigMap[fieldName];
|
|
@@ -90398,17 +90398,17 @@ function mapFields(originalTypeMap, schema, schemaMapper) {
|
|
|
90398
90398
|
}
|
|
90399
90399
|
if ((0, import_graphql10.isObjectType)(originalType)) {
|
|
90400
90400
|
newTypeMap[typeName] = correctASTNodes(new import_graphql10.GraphQLObjectType({
|
|
90401
|
-
...
|
|
90401
|
+
...config22,
|
|
90402
90402
|
fields: newFieldConfigMap
|
|
90403
90403
|
}));
|
|
90404
90404
|
} else if ((0, import_graphql10.isInterfaceType)(originalType)) {
|
|
90405
90405
|
newTypeMap[typeName] = correctASTNodes(new import_graphql10.GraphQLInterfaceType({
|
|
90406
|
-
...
|
|
90406
|
+
...config22,
|
|
90407
90407
|
fields: newFieldConfigMap
|
|
90408
90408
|
}));
|
|
90409
90409
|
} else {
|
|
90410
90410
|
newTypeMap[typeName] = correctASTNodes(new import_graphql10.GraphQLInputObjectType({
|
|
90411
|
-
...
|
|
90411
|
+
...config22,
|
|
90412
90412
|
fields: newFieldConfigMap
|
|
90413
90413
|
}));
|
|
90414
90414
|
}
|
|
@@ -90430,8 +90430,8 @@ function mapArguments(originalTypeMap, schema, schemaMapper) {
|
|
|
90430
90430
|
newTypeMap[typeName] = originalType;
|
|
90431
90431
|
continue;
|
|
90432
90432
|
}
|
|
90433
|
-
const
|
|
90434
|
-
const originalFieldConfigMap =
|
|
90433
|
+
const config22 = originalType.toConfig();
|
|
90434
|
+
const originalFieldConfigMap = config22.fields;
|
|
90435
90435
|
const newFieldConfigMap = {};
|
|
90436
90436
|
for (const fieldName in originalFieldConfigMap) {
|
|
90437
90437
|
const originalFieldConfig = originalFieldConfigMap[fieldName];
|
|
@@ -90465,17 +90465,17 @@ function mapArguments(originalTypeMap, schema, schemaMapper) {
|
|
|
90465
90465
|
}
|
|
90466
90466
|
if ((0, import_graphql10.isObjectType)(originalType)) {
|
|
90467
90467
|
newTypeMap[typeName] = new import_graphql10.GraphQLObjectType({
|
|
90468
|
-
...
|
|
90468
|
+
...config22,
|
|
90469
90469
|
fields: newFieldConfigMap
|
|
90470
90470
|
});
|
|
90471
90471
|
} else if ((0, import_graphql10.isInterfaceType)(originalType)) {
|
|
90472
90472
|
newTypeMap[typeName] = new import_graphql10.GraphQLInterfaceType({
|
|
90473
|
-
...
|
|
90473
|
+
...config22,
|
|
90474
90474
|
fields: newFieldConfigMap
|
|
90475
90475
|
});
|
|
90476
90476
|
} else {
|
|
90477
90477
|
newTypeMap[typeName] = new import_graphql10.GraphQLInputObjectType({
|
|
90478
|
-
...
|
|
90478
|
+
...config22,
|
|
90479
90479
|
fields: newFieldConfigMap
|
|
90480
90480
|
});
|
|
90481
90481
|
}
|
|
@@ -90579,99 +90579,99 @@ function getEnumValueMapper(schemaMapper) {
|
|
|
90579
90579
|
}
|
|
90580
90580
|
function correctASTNodes(type) {
|
|
90581
90581
|
if ((0, import_graphql10.isObjectType)(type)) {
|
|
90582
|
-
const
|
|
90583
|
-
if (
|
|
90582
|
+
const config22 = type.toConfig();
|
|
90583
|
+
if (config22.astNode != null) {
|
|
90584
90584
|
const fields = [];
|
|
90585
|
-
for (const fieldName in
|
|
90586
|
-
const fieldConfig =
|
|
90585
|
+
for (const fieldName in config22.fields) {
|
|
90586
|
+
const fieldConfig = config22.fields[fieldName];
|
|
90587
90587
|
if (fieldConfig.astNode != null) {
|
|
90588
90588
|
fields.push(fieldConfig.astNode);
|
|
90589
90589
|
}
|
|
90590
90590
|
}
|
|
90591
|
-
|
|
90592
|
-
...
|
|
90591
|
+
config22.astNode = {
|
|
90592
|
+
...config22.astNode,
|
|
90593
90593
|
kind: import_graphql10.Kind.OBJECT_TYPE_DEFINITION,
|
|
90594
90594
|
fields
|
|
90595
90595
|
};
|
|
90596
90596
|
}
|
|
90597
|
-
if (
|
|
90598
|
-
|
|
90597
|
+
if (config22.extensionASTNodes != null) {
|
|
90598
|
+
config22.extensionASTNodes = config22.extensionASTNodes.map((node2) => ({
|
|
90599
90599
|
...node2,
|
|
90600
90600
|
kind: import_graphql10.Kind.OBJECT_TYPE_EXTENSION,
|
|
90601
90601
|
fields: void 0
|
|
90602
90602
|
}));
|
|
90603
90603
|
}
|
|
90604
|
-
return new import_graphql10.GraphQLObjectType(
|
|
90604
|
+
return new import_graphql10.GraphQLObjectType(config22);
|
|
90605
90605
|
} else if ((0, import_graphql10.isInterfaceType)(type)) {
|
|
90606
|
-
const
|
|
90607
|
-
if (
|
|
90606
|
+
const config22 = type.toConfig();
|
|
90607
|
+
if (config22.astNode != null) {
|
|
90608
90608
|
const fields = [];
|
|
90609
|
-
for (const fieldName in
|
|
90610
|
-
const fieldConfig =
|
|
90609
|
+
for (const fieldName in config22.fields) {
|
|
90610
|
+
const fieldConfig = config22.fields[fieldName];
|
|
90611
90611
|
if (fieldConfig.astNode != null) {
|
|
90612
90612
|
fields.push(fieldConfig.astNode);
|
|
90613
90613
|
}
|
|
90614
90614
|
}
|
|
90615
|
-
|
|
90616
|
-
...
|
|
90615
|
+
config22.astNode = {
|
|
90616
|
+
...config22.astNode,
|
|
90617
90617
|
kind: import_graphql10.Kind.INTERFACE_TYPE_DEFINITION,
|
|
90618
90618
|
fields
|
|
90619
90619
|
};
|
|
90620
90620
|
}
|
|
90621
|
-
if (
|
|
90622
|
-
|
|
90621
|
+
if (config22.extensionASTNodes != null) {
|
|
90622
|
+
config22.extensionASTNodes = config22.extensionASTNodes.map((node2) => ({
|
|
90623
90623
|
...node2,
|
|
90624
90624
|
kind: import_graphql10.Kind.INTERFACE_TYPE_EXTENSION,
|
|
90625
90625
|
fields: void 0
|
|
90626
90626
|
}));
|
|
90627
90627
|
}
|
|
90628
|
-
return new import_graphql10.GraphQLInterfaceType(
|
|
90628
|
+
return new import_graphql10.GraphQLInterfaceType(config22);
|
|
90629
90629
|
} else if ((0, import_graphql10.isInputObjectType)(type)) {
|
|
90630
|
-
const
|
|
90631
|
-
if (
|
|
90630
|
+
const config22 = type.toConfig();
|
|
90631
|
+
if (config22.astNode != null) {
|
|
90632
90632
|
const fields = [];
|
|
90633
|
-
for (const fieldName in
|
|
90634
|
-
const fieldConfig =
|
|
90633
|
+
for (const fieldName in config22.fields) {
|
|
90634
|
+
const fieldConfig = config22.fields[fieldName];
|
|
90635
90635
|
if (fieldConfig.astNode != null) {
|
|
90636
90636
|
fields.push(fieldConfig.astNode);
|
|
90637
90637
|
}
|
|
90638
90638
|
}
|
|
90639
|
-
|
|
90640
|
-
...
|
|
90639
|
+
config22.astNode = {
|
|
90640
|
+
...config22.astNode,
|
|
90641
90641
|
kind: import_graphql10.Kind.INPUT_OBJECT_TYPE_DEFINITION,
|
|
90642
90642
|
fields
|
|
90643
90643
|
};
|
|
90644
90644
|
}
|
|
90645
|
-
if (
|
|
90646
|
-
|
|
90645
|
+
if (config22.extensionASTNodes != null) {
|
|
90646
|
+
config22.extensionASTNodes = config22.extensionASTNodes.map((node2) => ({
|
|
90647
90647
|
...node2,
|
|
90648
90648
|
kind: import_graphql10.Kind.INPUT_OBJECT_TYPE_EXTENSION,
|
|
90649
90649
|
fields: void 0
|
|
90650
90650
|
}));
|
|
90651
90651
|
}
|
|
90652
|
-
return new import_graphql10.GraphQLInputObjectType(
|
|
90652
|
+
return new import_graphql10.GraphQLInputObjectType(config22);
|
|
90653
90653
|
} else if ((0, import_graphql10.isEnumType)(type)) {
|
|
90654
|
-
const
|
|
90655
|
-
if (
|
|
90654
|
+
const config22 = type.toConfig();
|
|
90655
|
+
if (config22.astNode != null) {
|
|
90656
90656
|
const values = [];
|
|
90657
|
-
for (const enumKey in
|
|
90658
|
-
const enumValueConfig =
|
|
90657
|
+
for (const enumKey in config22.values) {
|
|
90658
|
+
const enumValueConfig = config22.values[enumKey];
|
|
90659
90659
|
if (enumValueConfig.astNode != null) {
|
|
90660
90660
|
values.push(enumValueConfig.astNode);
|
|
90661
90661
|
}
|
|
90662
90662
|
}
|
|
90663
|
-
|
|
90664
|
-
...
|
|
90663
|
+
config22.astNode = {
|
|
90664
|
+
...config22.astNode,
|
|
90665
90665
|
values
|
|
90666
90666
|
};
|
|
90667
90667
|
}
|
|
90668
|
-
if (
|
|
90669
|
-
|
|
90668
|
+
if (config22.extensionASTNodes != null) {
|
|
90669
|
+
config22.extensionASTNodes = config22.extensionASTNodes.map((node2) => ({
|
|
90670
90670
|
...node2,
|
|
90671
90671
|
values: void 0
|
|
90672
90672
|
}));
|
|
90673
90673
|
}
|
|
90674
|
-
return new import_graphql10.GraphQLEnumType(
|
|
90674
|
+
return new import_graphql10.GraphQLEnumType(config22);
|
|
90675
90675
|
} else {
|
|
90676
90676
|
return type;
|
|
90677
90677
|
}
|
|
@@ -90801,9 +90801,9 @@ function getResolversFromSchema(schema, includeDefaultMergedResolver) {
|
|
|
90801
90801
|
const type = typeMap[typeName];
|
|
90802
90802
|
if ((0, import_graphql12.isScalarType)(type)) {
|
|
90803
90803
|
if (!(0, import_graphql12.isSpecifiedScalarType)(type)) {
|
|
90804
|
-
const
|
|
90805
|
-
delete
|
|
90806
|
-
resolvers[typeName] = new import_graphql12.GraphQLScalarType(
|
|
90804
|
+
const config22 = type.toConfig();
|
|
90805
|
+
delete config22.astNode;
|
|
90806
|
+
resolvers[typeName] = new import_graphql12.GraphQLScalarType(config22);
|
|
90807
90807
|
}
|
|
90808
90808
|
} else if ((0, import_graphql12.isEnumType)(type)) {
|
|
90809
90809
|
resolvers[typeName] = {};
|
|
@@ -91159,26 +91159,26 @@ function addResolversToExistingSchema(schema, resolvers, defaultFieldResolver) {
|
|
|
91159
91159
|
}
|
|
91160
91160
|
}
|
|
91161
91161
|
} else if ((0, import_graphql17.isEnumType)(type)) {
|
|
91162
|
-
const
|
|
91163
|
-
const enumValueConfigMap =
|
|
91162
|
+
const config22 = type.toConfig();
|
|
91163
|
+
const enumValueConfigMap = config22.values;
|
|
91164
91164
|
for (const fieldName in resolverValue) {
|
|
91165
91165
|
if (fieldName.startsWith("__")) {
|
|
91166
|
-
|
|
91167
|
-
} else if (fieldName === "astNode" &&
|
|
91168
|
-
|
|
91169
|
-
...
|
|
91170
|
-
description: (_h = (_g = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.astNode) === null || _g === void 0 ? void 0 : _g.description) !== null && _h !== void 0 ? _h :
|
|
91171
|
-
directives: ((_j =
|
|
91166
|
+
config22[fieldName.substring(2)] = resolverValue[fieldName];
|
|
91167
|
+
} else if (fieldName === "astNode" && config22.astNode != null) {
|
|
91168
|
+
config22.astNode = {
|
|
91169
|
+
...config22.astNode,
|
|
91170
|
+
description: (_h = (_g = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.astNode) === null || _g === void 0 ? void 0 : _g.description) !== null && _h !== void 0 ? _h : config22.astNode.description,
|
|
91171
|
+
directives: ((_j = config22.astNode.directives) !== null && _j !== void 0 ? _j : []).concat((_l = (_k = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.astNode) === null || _k === void 0 ? void 0 : _k.directives) !== null && _l !== void 0 ? _l : [])
|
|
91172
91172
|
};
|
|
91173
|
-
} else if (fieldName === "extensionASTNodes" &&
|
|
91174
|
-
|
|
91173
|
+
} else if (fieldName === "extensionASTNodes" && config22.extensionASTNodes != null) {
|
|
91174
|
+
config22.extensionASTNodes = config22.extensionASTNodes.concat((_m = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.extensionASTNodes) !== null && _m !== void 0 ? _m : []);
|
|
91175
91175
|
} else if (fieldName === "extensions" && type.extensions != null && resolverValue.extensions != null) {
|
|
91176
91176
|
type.extensions = Object.assign(/* @__PURE__ */ Object.create(null), type.extensions, resolverValue.extensions);
|
|
91177
91177
|
} else if (enumValueConfigMap[fieldName]) {
|
|
91178
91178
|
enumValueConfigMap[fieldName].value = resolverValue[fieldName];
|
|
91179
91179
|
}
|
|
91180
91180
|
}
|
|
91181
|
-
typeMap[typeName] = new import_graphql17.GraphQLEnumType(
|
|
91181
|
+
typeMap[typeName] = new import_graphql17.GraphQLEnumType(config22);
|
|
91182
91182
|
} else if ((0, import_graphql17.isUnionType)(type)) {
|
|
91183
91183
|
for (const fieldName in resolverValue) {
|
|
91184
91184
|
if (fieldName.startsWith("__")) {
|
|
@@ -91220,83 +91220,83 @@ function createNewSchemaWithResolvers(schema, resolvers, defaultFieldResolver) {
|
|
|
91220
91220
|
schema = mapSchema(schema, {
|
|
91221
91221
|
[MapperKind.SCALAR_TYPE]: (type) => {
|
|
91222
91222
|
var _a, _b, _c, _d, _e, _f;
|
|
91223
|
-
const
|
|
91223
|
+
const config22 = type.toConfig();
|
|
91224
91224
|
const resolverValue = resolvers[type.name];
|
|
91225
91225
|
if (!(0, import_graphql17.isSpecifiedScalarType)(type) && resolverValue != null) {
|
|
91226
91226
|
for (const fieldName in resolverValue) {
|
|
91227
91227
|
if (fieldName.startsWith("__")) {
|
|
91228
|
-
|
|
91229
|
-
} else if (fieldName === "astNode" &&
|
|
91230
|
-
|
|
91231
|
-
...
|
|
91232
|
-
description: (_b = (_a = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.astNode) === null || _a === void 0 ? void 0 : _a.description) !== null && _b !== void 0 ? _b :
|
|
91233
|
-
directives: ((_c =
|
|
91234
|
-
};
|
|
91235
|
-
} else if (fieldName === "extensionASTNodes" &&
|
|
91236
|
-
|
|
91237
|
-
} else if (fieldName === "extensions" &&
|
|
91238
|
-
|
|
91228
|
+
config22[fieldName.substring(2)] = resolverValue[fieldName];
|
|
91229
|
+
} else if (fieldName === "astNode" && config22.astNode != null) {
|
|
91230
|
+
config22.astNode = {
|
|
91231
|
+
...config22.astNode,
|
|
91232
|
+
description: (_b = (_a = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.astNode) === null || _a === void 0 ? void 0 : _a.description) !== null && _b !== void 0 ? _b : config22.astNode.description,
|
|
91233
|
+
directives: ((_c = config22.astNode.directives) !== null && _c !== void 0 ? _c : []).concat((_e = (_d = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.astNode) === null || _d === void 0 ? void 0 : _d.directives) !== null && _e !== void 0 ? _e : [])
|
|
91234
|
+
};
|
|
91235
|
+
} else if (fieldName === "extensionASTNodes" && config22.extensionASTNodes != null) {
|
|
91236
|
+
config22.extensionASTNodes = config22.extensionASTNodes.concat((_f = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.extensionASTNodes) !== null && _f !== void 0 ? _f : []);
|
|
91237
|
+
} else if (fieldName === "extensions" && config22.extensions != null && resolverValue.extensions != null) {
|
|
91238
|
+
config22.extensions = Object.assign(/* @__PURE__ */ Object.create(null), type.extensions, resolverValue.extensions);
|
|
91239
91239
|
} else {
|
|
91240
|
-
|
|
91240
|
+
config22[fieldName] = resolverValue[fieldName];
|
|
91241
91241
|
}
|
|
91242
91242
|
}
|
|
91243
|
-
return new import_graphql17.GraphQLScalarType(
|
|
91243
|
+
return new import_graphql17.GraphQLScalarType(config22);
|
|
91244
91244
|
}
|
|
91245
91245
|
},
|
|
91246
91246
|
[MapperKind.ENUM_TYPE]: (type) => {
|
|
91247
91247
|
var _a, _b, _c, _d, _e, _f;
|
|
91248
91248
|
const resolverValue = resolvers[type.name];
|
|
91249
|
-
const
|
|
91250
|
-
const enumValueConfigMap =
|
|
91249
|
+
const config22 = type.toConfig();
|
|
91250
|
+
const enumValueConfigMap = config22.values;
|
|
91251
91251
|
if (resolverValue != null) {
|
|
91252
91252
|
for (const fieldName in resolverValue) {
|
|
91253
91253
|
if (fieldName.startsWith("__")) {
|
|
91254
|
-
|
|
91255
|
-
} else if (fieldName === "astNode" &&
|
|
91256
|
-
|
|
91257
|
-
...
|
|
91258
|
-
description: (_b = (_a = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.astNode) === null || _a === void 0 ? void 0 : _a.description) !== null && _b !== void 0 ? _b :
|
|
91259
|
-
directives: ((_c =
|
|
91260
|
-
};
|
|
91261
|
-
} else if (fieldName === "extensionASTNodes" &&
|
|
91262
|
-
|
|
91263
|
-
} else if (fieldName === "extensions" &&
|
|
91264
|
-
|
|
91254
|
+
config22[fieldName.substring(2)] = resolverValue[fieldName];
|
|
91255
|
+
} else if (fieldName === "astNode" && config22.astNode != null) {
|
|
91256
|
+
config22.astNode = {
|
|
91257
|
+
...config22.astNode,
|
|
91258
|
+
description: (_b = (_a = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.astNode) === null || _a === void 0 ? void 0 : _a.description) !== null && _b !== void 0 ? _b : config22.astNode.description,
|
|
91259
|
+
directives: ((_c = config22.astNode.directives) !== null && _c !== void 0 ? _c : []).concat((_e = (_d = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.astNode) === null || _d === void 0 ? void 0 : _d.directives) !== null && _e !== void 0 ? _e : [])
|
|
91260
|
+
};
|
|
91261
|
+
} else if (fieldName === "extensionASTNodes" && config22.extensionASTNodes != null) {
|
|
91262
|
+
config22.extensionASTNodes = config22.extensionASTNodes.concat((_f = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.extensionASTNodes) !== null && _f !== void 0 ? _f : []);
|
|
91263
|
+
} else if (fieldName === "extensions" && config22.extensions != null && resolverValue.extensions != null) {
|
|
91264
|
+
config22.extensions = Object.assign(/* @__PURE__ */ Object.create(null), type.extensions, resolverValue.extensions);
|
|
91265
91265
|
} else if (enumValueConfigMap[fieldName]) {
|
|
91266
91266
|
enumValueConfigMap[fieldName].value = resolverValue[fieldName];
|
|
91267
91267
|
}
|
|
91268
91268
|
}
|
|
91269
|
-
return new import_graphql17.GraphQLEnumType(
|
|
91269
|
+
return new import_graphql17.GraphQLEnumType(config22);
|
|
91270
91270
|
}
|
|
91271
91271
|
},
|
|
91272
91272
|
[MapperKind.UNION_TYPE]: (type) => {
|
|
91273
91273
|
const resolverValue = resolvers[type.name];
|
|
91274
91274
|
if (resolverValue != null) {
|
|
91275
|
-
const
|
|
91275
|
+
const config22 = type.toConfig();
|
|
91276
91276
|
if (resolverValue["__resolveType"]) {
|
|
91277
|
-
|
|
91277
|
+
config22.resolveType = resolverValue["__resolveType"];
|
|
91278
91278
|
}
|
|
91279
|
-
return new import_graphql17.GraphQLUnionType(
|
|
91279
|
+
return new import_graphql17.GraphQLUnionType(config22);
|
|
91280
91280
|
}
|
|
91281
91281
|
},
|
|
91282
91282
|
[MapperKind.OBJECT_TYPE]: (type) => {
|
|
91283
91283
|
const resolverValue = resolvers[type.name];
|
|
91284
91284
|
if (resolverValue != null) {
|
|
91285
|
-
const
|
|
91285
|
+
const config22 = type.toConfig();
|
|
91286
91286
|
if (resolverValue["__isTypeOf"]) {
|
|
91287
|
-
|
|
91287
|
+
config22.isTypeOf = resolverValue["__isTypeOf"];
|
|
91288
91288
|
}
|
|
91289
|
-
return new import_graphql17.GraphQLObjectType(
|
|
91289
|
+
return new import_graphql17.GraphQLObjectType(config22);
|
|
91290
91290
|
}
|
|
91291
91291
|
},
|
|
91292
91292
|
[MapperKind.INTERFACE_TYPE]: (type) => {
|
|
91293
91293
|
const resolverValue = resolvers[type.name];
|
|
91294
91294
|
if (resolverValue != null) {
|
|
91295
|
-
const
|
|
91295
|
+
const config22 = type.toConfig();
|
|
91296
91296
|
if (resolverValue["__resolveType"]) {
|
|
91297
|
-
|
|
91297
|
+
config22.resolveType = resolverValue["__resolveType"];
|
|
91298
91298
|
}
|
|
91299
|
-
return new import_graphql17.GraphQLInterfaceType(
|
|
91299
|
+
return new import_graphql17.GraphQLInterfaceType(config22);
|
|
91300
91300
|
}
|
|
91301
91301
|
},
|
|
91302
91302
|
[MapperKind.COMPOSITE_FIELD]: (fieldConfig, fieldName, typeName) => {
|
|
@@ -91363,9 +91363,9 @@ function mergeResolvers(resolversDefinitions, options) {
|
|
|
91363
91363
|
}
|
|
91364
91364
|
return result;
|
|
91365
91365
|
}
|
|
91366
|
-
function mergeArguments(args1, args2,
|
|
91366
|
+
function mergeArguments(args1, args2, config22) {
|
|
91367
91367
|
const result = deduplicateArguments([...args2, ...args1].filter(isSome));
|
|
91368
|
-
if (
|
|
91368
|
+
if (config22 && config22.sort) {
|
|
91369
91369
|
result.sort(compareNodes);
|
|
91370
91370
|
}
|
|
91371
91371
|
return result;
|
|
@@ -91419,8 +91419,8 @@ function deduplicateDirectives(directives) {
|
|
|
91419
91419
|
return directive;
|
|
91420
91420
|
}).filter(isSome);
|
|
91421
91421
|
}
|
|
91422
|
-
function mergeDirectives(d1 = [], d2 = [],
|
|
91423
|
-
const reverseOrder =
|
|
91422
|
+
function mergeDirectives(d1 = [], d2 = [], config22) {
|
|
91423
|
+
const reverseOrder = config22 && config22.reverseDirectives;
|
|
91424
91424
|
const asNext = reverseOrder ? d1 : d2;
|
|
91425
91425
|
const asFirst = reverseOrder ? d2 : d1;
|
|
91426
91426
|
const result = deduplicateDirectives([...asNext]);
|
|
@@ -91470,8 +91470,8 @@ function mergeDirective(node2, existingNode) {
|
|
|
91470
91470
|
function deduplicateLists(source, target, filterFn) {
|
|
91471
91471
|
return source.concat(target.filter((val) => filterFn(val, source)));
|
|
91472
91472
|
}
|
|
91473
|
-
function mergeEnumValues(first, second,
|
|
91474
|
-
if (
|
|
91473
|
+
function mergeEnumValues(first, second, config22) {
|
|
91474
|
+
if (config22 === null || config22 === void 0 ? void 0 : config22.consistentEnumMerge) {
|
|
91475
91475
|
const reversed = [];
|
|
91476
91476
|
if (first) {
|
|
91477
91477
|
reversed.push(...first);
|
|
@@ -91498,24 +91498,24 @@ function mergeEnumValues(first, second, config4) {
|
|
|
91498
91498
|
}
|
|
91499
91499
|
}
|
|
91500
91500
|
const result = [...enumValueMap.values()];
|
|
91501
|
-
if (
|
|
91501
|
+
if (config22 && config22.sort) {
|
|
91502
91502
|
result.sort(compareNodes);
|
|
91503
91503
|
}
|
|
91504
91504
|
return result;
|
|
91505
91505
|
}
|
|
91506
91506
|
var import_graphql19 = __toESM2(require_graphql2(), 1);
|
|
91507
|
-
function mergeEnum(e1, e22,
|
|
91507
|
+
function mergeEnum(e1, e22, config22) {
|
|
91508
91508
|
if (e22) {
|
|
91509
91509
|
return {
|
|
91510
91510
|
name: e1.name,
|
|
91511
91511
|
description: e1["description"] || e22["description"],
|
|
91512
|
-
kind: (
|
|
91512
|
+
kind: (config22 === null || config22 === void 0 ? void 0 : config22.convertExtensions) || e1.kind === "EnumTypeDefinition" || e22.kind === "EnumTypeDefinition" ? "EnumTypeDefinition" : "EnumTypeExtension",
|
|
91513
91513
|
loc: e1.loc,
|
|
91514
|
-
directives: mergeDirectives(e1.directives, e22.directives,
|
|
91515
|
-
values: mergeEnumValues(e1.values, e22.values,
|
|
91514
|
+
directives: mergeDirectives(e1.directives, e22.directives, config22),
|
|
91515
|
+
values: mergeEnumValues(e1.values, e22.values, config22)
|
|
91516
91516
|
};
|
|
91517
91517
|
}
|
|
91518
|
-
return (
|
|
91518
|
+
return (config22 === null || config22 === void 0 ? void 0 : config22.convertExtensions) ? {
|
|
91519
91519
|
...e1,
|
|
91520
91520
|
kind: import_graphql19.Kind.ENUM_TYPE_DEFINITION
|
|
91521
91521
|
} : e1;
|
|
@@ -91574,9 +91574,9 @@ function defaultStringComparator(a, b) {
|
|
|
91574
91574
|
return CompareVal.A_GREATER_THAN_B;
|
|
91575
91575
|
return CompareVal.A_EQUALS_B;
|
|
91576
91576
|
}
|
|
91577
|
-
function fieldAlreadyExists(fieldsArr, otherField,
|
|
91577
|
+
function fieldAlreadyExists(fieldsArr, otherField, config22) {
|
|
91578
91578
|
const result = fieldsArr.find((field) => field.name.value === otherField.name.value);
|
|
91579
|
-
if (result && !(
|
|
91579
|
+
if (result && !(config22 === null || config22 === void 0 ? void 0 : config22.ignoreFieldConflicts)) {
|
|
91580
91580
|
const t1 = extractType(result.type);
|
|
91581
91581
|
const t22 = extractType(otherField.type);
|
|
91582
91582
|
if (t1.name.value !== t22.name.value) {
|
|
@@ -91585,17 +91585,17 @@ function fieldAlreadyExists(fieldsArr, otherField, config4) {
|
|
|
91585
91585
|
}
|
|
91586
91586
|
return !!result;
|
|
91587
91587
|
}
|
|
91588
|
-
function mergeFields(type, f1, f222,
|
|
91588
|
+
function mergeFields(type, f1, f222, config22) {
|
|
91589
91589
|
const result = [];
|
|
91590
91590
|
if (f222 != null) {
|
|
91591
91591
|
result.push(...f222);
|
|
91592
91592
|
}
|
|
91593
91593
|
if (f1 != null) {
|
|
91594
91594
|
for (const field of f1) {
|
|
91595
|
-
if (fieldAlreadyExists(result, field,
|
|
91595
|
+
if (fieldAlreadyExists(result, field, config22)) {
|
|
91596
91596
|
const existing = result.find((f32) => f32.name.value === field.name.value);
|
|
91597
|
-
if (!(
|
|
91598
|
-
if (
|
|
91597
|
+
if (!(config22 === null || config22 === void 0 ? void 0 : config22.ignoreFieldConflicts)) {
|
|
91598
|
+
if (config22 === null || config22 === void 0 ? void 0 : config22.throwOnConflict) {
|
|
91599
91599
|
preventConflicts(type, existing, field, false);
|
|
91600
91600
|
} else {
|
|
91601
91601
|
preventConflicts(type, existing, field, true);
|
|
@@ -91604,19 +91604,19 @@ function mergeFields(type, f1, f222, config4) {
|
|
|
91604
91604
|
existing.type = field.type;
|
|
91605
91605
|
}
|
|
91606
91606
|
}
|
|
91607
|
-
existing.arguments = mergeArguments(field["arguments"] || [], existing.arguments || [],
|
|
91608
|
-
existing.directives = mergeDirectives(field.directives, existing.directives,
|
|
91607
|
+
existing.arguments = mergeArguments(field["arguments"] || [], existing.arguments || [], config22);
|
|
91608
|
+
existing.directives = mergeDirectives(field.directives, existing.directives, config22);
|
|
91609
91609
|
existing.description = field.description || existing.description;
|
|
91610
91610
|
} else {
|
|
91611
91611
|
result.push(field);
|
|
91612
91612
|
}
|
|
91613
91613
|
}
|
|
91614
91614
|
}
|
|
91615
|
-
if (
|
|
91615
|
+
if (config22 && config22.sort) {
|
|
91616
91616
|
result.sort(compareNodes);
|
|
91617
91617
|
}
|
|
91618
|
-
if (
|
|
91619
|
-
const exclusions =
|
|
91618
|
+
if (config22 && config22.exclusions) {
|
|
91619
|
+
const exclusions = config22.exclusions;
|
|
91620
91620
|
return result.filter((field) => !exclusions.includes(`${type.name.value}.${field.name.value}`));
|
|
91621
91621
|
}
|
|
91622
91622
|
return result;
|
|
@@ -91645,44 +91645,44 @@ function safeChangeForFieldType(oldType, newType, ignoreNullability = false) {
|
|
|
91645
91645
|
return false;
|
|
91646
91646
|
}
|
|
91647
91647
|
var import_graphql21 = __toESM2(require_graphql2(), 1);
|
|
91648
|
-
function mergeInputType(node2, existingNode,
|
|
91648
|
+
function mergeInputType(node2, existingNode, config22) {
|
|
91649
91649
|
if (existingNode) {
|
|
91650
91650
|
try {
|
|
91651
91651
|
return {
|
|
91652
91652
|
name: node2.name,
|
|
91653
91653
|
description: node2["description"] || existingNode["description"],
|
|
91654
|
-
kind: (
|
|
91654
|
+
kind: (config22 === null || config22 === void 0 ? void 0 : config22.convertExtensions) || node2.kind === "InputObjectTypeDefinition" || existingNode.kind === "InputObjectTypeDefinition" ? "InputObjectTypeDefinition" : "InputObjectTypeExtension",
|
|
91655
91655
|
loc: node2.loc,
|
|
91656
|
-
fields: mergeFields(node2, node2.fields, existingNode.fields,
|
|
91657
|
-
directives: mergeDirectives(node2.directives, existingNode.directives,
|
|
91656
|
+
fields: mergeFields(node2, node2.fields, existingNode.fields, config22),
|
|
91657
|
+
directives: mergeDirectives(node2.directives, existingNode.directives, config22)
|
|
91658
91658
|
};
|
|
91659
91659
|
} catch (e22) {
|
|
91660
91660
|
throw new Error(`Unable to merge GraphQL input type "${node2.name.value}": ${e22.message}`);
|
|
91661
91661
|
}
|
|
91662
91662
|
}
|
|
91663
|
-
return (
|
|
91663
|
+
return (config22 === null || config22 === void 0 ? void 0 : config22.convertExtensions) ? {
|
|
91664
91664
|
...node2,
|
|
91665
91665
|
kind: import_graphql21.Kind.INPUT_OBJECT_TYPE_DEFINITION
|
|
91666
91666
|
} : node2;
|
|
91667
91667
|
}
|
|
91668
91668
|
var import_graphql22 = __toESM2(require_graphql2(), 1);
|
|
91669
|
-
function mergeInterface(node2, existingNode,
|
|
91669
|
+
function mergeInterface(node2, existingNode, config22) {
|
|
91670
91670
|
if (existingNode) {
|
|
91671
91671
|
try {
|
|
91672
91672
|
return {
|
|
91673
91673
|
name: node2.name,
|
|
91674
91674
|
description: node2["description"] || existingNode["description"],
|
|
91675
|
-
kind: (
|
|
91675
|
+
kind: (config22 === null || config22 === void 0 ? void 0 : config22.convertExtensions) || node2.kind === "InterfaceTypeDefinition" || existingNode.kind === "InterfaceTypeDefinition" ? "InterfaceTypeDefinition" : "InterfaceTypeExtension",
|
|
91676
91676
|
loc: node2.loc,
|
|
91677
|
-
fields: mergeFields(node2, node2.fields, existingNode.fields,
|
|
91678
|
-
directives: mergeDirectives(node2.directives, existingNode.directives,
|
|
91679
|
-
interfaces: node2["interfaces"] ? mergeNamedTypeArray(node2["interfaces"], existingNode["interfaces"],
|
|
91677
|
+
fields: mergeFields(node2, node2.fields, existingNode.fields, config22),
|
|
91678
|
+
directives: mergeDirectives(node2.directives, existingNode.directives, config22),
|
|
91679
|
+
interfaces: node2["interfaces"] ? mergeNamedTypeArray(node2["interfaces"], existingNode["interfaces"], config22) : void 0
|
|
91680
91680
|
};
|
|
91681
91681
|
} catch (e22) {
|
|
91682
91682
|
throw new Error(`Unable to merge GraphQL interface "${node2.name.value}": ${e22.message}`);
|
|
91683
91683
|
}
|
|
91684
91684
|
}
|
|
91685
|
-
return (
|
|
91685
|
+
return (config22 === null || config22 === void 0 ? void 0 : config22.convertExtensions) ? {
|
|
91686
91686
|
...node2,
|
|
91687
91687
|
kind: import_graphql22.Kind.INTERFACE_TYPE_DEFINITION
|
|
91688
91688
|
} : node2;
|
|
@@ -91690,65 +91690,65 @@ function mergeInterface(node2, existingNode, config4) {
|
|
|
91690
91690
|
function alreadyExists(arr, other) {
|
|
91691
91691
|
return !!arr.find((i22) => i22.name.value === other.name.value);
|
|
91692
91692
|
}
|
|
91693
|
-
function mergeNamedTypeArray(first = [], second = [],
|
|
91693
|
+
function mergeNamedTypeArray(first = [], second = [], config22 = {}) {
|
|
91694
91694
|
const result = [...second, ...first.filter((d) => !alreadyExists(second, d))];
|
|
91695
|
-
if (
|
|
91695
|
+
if (config22 && config22.sort) {
|
|
91696
91696
|
result.sort(compareNodes);
|
|
91697
91697
|
}
|
|
91698
91698
|
return result;
|
|
91699
91699
|
}
|
|
91700
91700
|
var import_graphql27 = __toESM2(require_graphql2(), 1);
|
|
91701
91701
|
var import_graphql23 = __toESM2(require_graphql2(), 1);
|
|
91702
|
-
function mergeType(node2, existingNode,
|
|
91702
|
+
function mergeType(node2, existingNode, config22) {
|
|
91703
91703
|
if (existingNode) {
|
|
91704
91704
|
try {
|
|
91705
91705
|
return {
|
|
91706
91706
|
name: node2.name,
|
|
91707
91707
|
description: node2["description"] || existingNode["description"],
|
|
91708
|
-
kind: (
|
|
91708
|
+
kind: (config22 === null || config22 === void 0 ? void 0 : config22.convertExtensions) || node2.kind === "ObjectTypeDefinition" || existingNode.kind === "ObjectTypeDefinition" ? "ObjectTypeDefinition" : "ObjectTypeExtension",
|
|
91709
91709
|
loc: node2.loc,
|
|
91710
|
-
fields: mergeFields(node2, node2.fields, existingNode.fields,
|
|
91711
|
-
directives: mergeDirectives(node2.directives, existingNode.directives,
|
|
91712
|
-
interfaces: mergeNamedTypeArray(node2.interfaces, existingNode.interfaces,
|
|
91710
|
+
fields: mergeFields(node2, node2.fields, existingNode.fields, config22),
|
|
91711
|
+
directives: mergeDirectives(node2.directives, existingNode.directives, config22),
|
|
91712
|
+
interfaces: mergeNamedTypeArray(node2.interfaces, existingNode.interfaces, config22)
|
|
91713
91713
|
};
|
|
91714
91714
|
} catch (e22) {
|
|
91715
91715
|
throw new Error(`Unable to merge GraphQL type "${node2.name.value}": ${e22.message}`);
|
|
91716
91716
|
}
|
|
91717
91717
|
}
|
|
91718
|
-
return (
|
|
91718
|
+
return (config22 === null || config22 === void 0 ? void 0 : config22.convertExtensions) ? {
|
|
91719
91719
|
...node2,
|
|
91720
91720
|
kind: import_graphql23.Kind.OBJECT_TYPE_DEFINITION
|
|
91721
91721
|
} : node2;
|
|
91722
91722
|
}
|
|
91723
91723
|
var import_graphql24 = __toESM2(require_graphql2(), 1);
|
|
91724
|
-
function mergeScalar(node2, existingNode,
|
|
91724
|
+
function mergeScalar(node2, existingNode, config22) {
|
|
91725
91725
|
if (existingNode) {
|
|
91726
91726
|
return {
|
|
91727
91727
|
name: node2.name,
|
|
91728
91728
|
description: node2["description"] || existingNode["description"],
|
|
91729
|
-
kind: (
|
|
91729
|
+
kind: (config22 === null || config22 === void 0 ? void 0 : config22.convertExtensions) || node2.kind === "ScalarTypeDefinition" || existingNode.kind === "ScalarTypeDefinition" ? "ScalarTypeDefinition" : "ScalarTypeExtension",
|
|
91730
91730
|
loc: node2.loc,
|
|
91731
|
-
directives: mergeDirectives(node2.directives, existingNode.directives,
|
|
91731
|
+
directives: mergeDirectives(node2.directives, existingNode.directives, config22)
|
|
91732
91732
|
};
|
|
91733
91733
|
}
|
|
91734
|
-
return (
|
|
91734
|
+
return (config22 === null || config22 === void 0 ? void 0 : config22.convertExtensions) ? {
|
|
91735
91735
|
...node2,
|
|
91736
91736
|
kind: import_graphql24.Kind.SCALAR_TYPE_DEFINITION
|
|
91737
91737
|
} : node2;
|
|
91738
91738
|
}
|
|
91739
91739
|
var import_graphql25 = __toESM2(require_graphql2(), 1);
|
|
91740
|
-
function mergeUnion(first, second,
|
|
91740
|
+
function mergeUnion(first, second, config22) {
|
|
91741
91741
|
if (second) {
|
|
91742
91742
|
return {
|
|
91743
91743
|
name: first.name,
|
|
91744
91744
|
description: first["description"] || second["description"],
|
|
91745
|
-
directives: mergeDirectives(first.directives, second.directives,
|
|
91746
|
-
kind: (
|
|
91745
|
+
directives: mergeDirectives(first.directives, second.directives, config22),
|
|
91746
|
+
kind: (config22 === null || config22 === void 0 ? void 0 : config22.convertExtensions) || first.kind === "UnionTypeDefinition" || second.kind === "UnionTypeDefinition" ? import_graphql25.Kind.UNION_TYPE_DEFINITION : import_graphql25.Kind.UNION_TYPE_EXTENSION,
|
|
91747
91747
|
loc: first.loc,
|
|
91748
|
-
types: mergeNamedTypeArray(first.types, second.types,
|
|
91748
|
+
types: mergeNamedTypeArray(first.types, second.types, config22)
|
|
91749
91749
|
};
|
|
91750
91750
|
}
|
|
91751
|
-
return (
|
|
91751
|
+
return (config22 === null || config22 === void 0 ? void 0 : config22.convertExtensions) ? {
|
|
91752
91752
|
...first,
|
|
91753
91753
|
kind: import_graphql25.Kind.UNION_TYPE_DEFINITION
|
|
91754
91754
|
} : first;
|
|
@@ -91769,16 +91769,16 @@ function mergeOperationTypes(opNodeList = [], existingOpNodeList = []) {
|
|
|
91769
91769
|
}
|
|
91770
91770
|
return finalOpNodeList;
|
|
91771
91771
|
}
|
|
91772
|
-
function mergeSchemaDefs(node2, existingNode,
|
|
91772
|
+
function mergeSchemaDefs(node2, existingNode, config22) {
|
|
91773
91773
|
if (existingNode) {
|
|
91774
91774
|
return {
|
|
91775
91775
|
kind: node2.kind === import_graphql26.Kind.SCHEMA_DEFINITION || existingNode.kind === import_graphql26.Kind.SCHEMA_DEFINITION ? import_graphql26.Kind.SCHEMA_DEFINITION : import_graphql26.Kind.SCHEMA_EXTENSION,
|
|
91776
91776
|
description: node2["description"] || existingNode["description"],
|
|
91777
|
-
directives: mergeDirectives(node2.directives, existingNode.directives,
|
|
91777
|
+
directives: mergeDirectives(node2.directives, existingNode.directives, config22),
|
|
91778
91778
|
operationTypes: mergeOperationTypes(node2.operationTypes, existingNode.operationTypes)
|
|
91779
91779
|
};
|
|
91780
91780
|
}
|
|
91781
|
-
return (
|
|
91781
|
+
return (config22 === null || config22 === void 0 ? void 0 : config22.convertExtensions) ? {
|
|
91782
91782
|
...node2,
|
|
91783
91783
|
kind: import_graphql26.Kind.SCHEMA_DEFINITION
|
|
91784
91784
|
} : node2;
|
|
@@ -91787,45 +91787,45 @@ var schemaDefSymbol = "SCHEMA_DEF_SYMBOL";
|
|
|
91787
91787
|
function isNamedDefinitionNode(definitionNode) {
|
|
91788
91788
|
return "name" in definitionNode;
|
|
91789
91789
|
}
|
|
91790
|
-
function mergeGraphQLNodes(nodes,
|
|
91790
|
+
function mergeGraphQLNodes(nodes, config22) {
|
|
91791
91791
|
var _a, _b, _c;
|
|
91792
91792
|
const mergedResultMap = {};
|
|
91793
91793
|
for (const nodeDefinition of nodes) {
|
|
91794
91794
|
if (isNamedDefinitionNode(nodeDefinition)) {
|
|
91795
91795
|
const name = (_a = nodeDefinition.name) === null || _a === void 0 ? void 0 : _a.value;
|
|
91796
|
-
if (
|
|
91796
|
+
if (config22 === null || config22 === void 0 ? void 0 : config22.commentDescriptions) {
|
|
91797
91797
|
collectComment(nodeDefinition);
|
|
91798
91798
|
}
|
|
91799
91799
|
if (name == null) {
|
|
91800
91800
|
continue;
|
|
91801
91801
|
}
|
|
91802
|
-
if (((_b =
|
|
91802
|
+
if (((_b = config22 === null || config22 === void 0 ? void 0 : config22.exclusions) === null || _b === void 0 ? void 0 : _b.includes(name + ".*")) || ((_c = config22 === null || config22 === void 0 ? void 0 : config22.exclusions) === null || _c === void 0 ? void 0 : _c.includes(name))) {
|
|
91803
91803
|
delete mergedResultMap[name];
|
|
91804
91804
|
} else {
|
|
91805
91805
|
switch (nodeDefinition.kind) {
|
|
91806
91806
|
case import_graphql27.Kind.OBJECT_TYPE_DEFINITION:
|
|
91807
91807
|
case import_graphql27.Kind.OBJECT_TYPE_EXTENSION:
|
|
91808
|
-
mergedResultMap[name] = mergeType(nodeDefinition, mergedResultMap[name],
|
|
91808
|
+
mergedResultMap[name] = mergeType(nodeDefinition, mergedResultMap[name], config22);
|
|
91809
91809
|
break;
|
|
91810
91810
|
case import_graphql27.Kind.ENUM_TYPE_DEFINITION:
|
|
91811
91811
|
case import_graphql27.Kind.ENUM_TYPE_EXTENSION:
|
|
91812
|
-
mergedResultMap[name] = mergeEnum(nodeDefinition, mergedResultMap[name],
|
|
91812
|
+
mergedResultMap[name] = mergeEnum(nodeDefinition, mergedResultMap[name], config22);
|
|
91813
91813
|
break;
|
|
91814
91814
|
case import_graphql27.Kind.UNION_TYPE_DEFINITION:
|
|
91815
91815
|
case import_graphql27.Kind.UNION_TYPE_EXTENSION:
|
|
91816
|
-
mergedResultMap[name] = mergeUnion(nodeDefinition, mergedResultMap[name],
|
|
91816
|
+
mergedResultMap[name] = mergeUnion(nodeDefinition, mergedResultMap[name], config22);
|
|
91817
91817
|
break;
|
|
91818
91818
|
case import_graphql27.Kind.SCALAR_TYPE_DEFINITION:
|
|
91819
91819
|
case import_graphql27.Kind.SCALAR_TYPE_EXTENSION:
|
|
91820
|
-
mergedResultMap[name] = mergeScalar(nodeDefinition, mergedResultMap[name],
|
|
91820
|
+
mergedResultMap[name] = mergeScalar(nodeDefinition, mergedResultMap[name], config22);
|
|
91821
91821
|
break;
|
|
91822
91822
|
case import_graphql27.Kind.INPUT_OBJECT_TYPE_DEFINITION:
|
|
91823
91823
|
case import_graphql27.Kind.INPUT_OBJECT_TYPE_EXTENSION:
|
|
91824
|
-
mergedResultMap[name] = mergeInputType(nodeDefinition, mergedResultMap[name],
|
|
91824
|
+
mergedResultMap[name] = mergeInputType(nodeDefinition, mergedResultMap[name], config22);
|
|
91825
91825
|
break;
|
|
91826
91826
|
case import_graphql27.Kind.INTERFACE_TYPE_DEFINITION:
|
|
91827
91827
|
case import_graphql27.Kind.INTERFACE_TYPE_EXTENSION:
|
|
91828
|
-
mergedResultMap[name] = mergeInterface(nodeDefinition, mergedResultMap[name],
|
|
91828
|
+
mergedResultMap[name] = mergeInterface(nodeDefinition, mergedResultMap[name], config22);
|
|
91829
91829
|
break;
|
|
91830
91830
|
case import_graphql27.Kind.DIRECTIVE_DEFINITION:
|
|
91831
91831
|
mergedResultMap[name] = mergeDirective(nodeDefinition, mergedResultMap[name]);
|
|
@@ -91833,13 +91833,13 @@ function mergeGraphQLNodes(nodes, config4) {
|
|
|
91833
91833
|
}
|
|
91834
91834
|
}
|
|
91835
91835
|
} else if (nodeDefinition.kind === import_graphql27.Kind.SCHEMA_DEFINITION || nodeDefinition.kind === import_graphql27.Kind.SCHEMA_EXTENSION) {
|
|
91836
|
-
mergedResultMap[schemaDefSymbol] = mergeSchemaDefs(nodeDefinition, mergedResultMap[schemaDefSymbol],
|
|
91836
|
+
mergedResultMap[schemaDefSymbol] = mergeSchemaDefs(nodeDefinition, mergedResultMap[schemaDefSymbol], config22);
|
|
91837
91837
|
}
|
|
91838
91838
|
}
|
|
91839
91839
|
return mergedResultMap;
|
|
91840
91840
|
}
|
|
91841
91841
|
var import_graphql28 = __toESM2(require_graphql2(), 1);
|
|
91842
|
-
function mergeTypeDefs(typeSource,
|
|
91842
|
+
function mergeTypeDefs(typeSource, config22) {
|
|
91843
91843
|
resetComments();
|
|
91844
91844
|
const doc = {
|
|
91845
91845
|
kind: import_graphql28.Kind.DOCUMENT,
|
|
@@ -91848,11 +91848,11 @@ function mergeTypeDefs(typeSource, config4) {
|
|
|
91848
91848
|
forceSchemaDefinition: false,
|
|
91849
91849
|
throwOnConflict: false,
|
|
91850
91850
|
commentDescriptions: false,
|
|
91851
|
-
...
|
|
91851
|
+
...config22
|
|
91852
91852
|
})
|
|
91853
91853
|
};
|
|
91854
91854
|
let result;
|
|
91855
|
-
if (
|
|
91855
|
+
if (config22 === null || config22 === void 0 ? void 0 : config22.commentDescriptions) {
|
|
91856
91856
|
result = printWithComments(doc);
|
|
91857
91857
|
} else {
|
|
91858
91858
|
result = doc;
|
|
@@ -91885,12 +91885,12 @@ function visitTypeSources(typeSource, options, allNodes = [], visitedTypeSources
|
|
|
91885
91885
|
}
|
|
91886
91886
|
return allNodes;
|
|
91887
91887
|
}
|
|
91888
|
-
function mergeGraphQLTypes(typeSource,
|
|
91888
|
+
function mergeGraphQLTypes(typeSource, config22) {
|
|
91889
91889
|
var _a, _b, _c;
|
|
91890
91890
|
resetComments();
|
|
91891
|
-
const allNodes = visitTypeSources(typeSource,
|
|
91892
|
-
const mergedNodes = mergeGraphQLNodes(allNodes,
|
|
91893
|
-
if (
|
|
91891
|
+
const allNodes = visitTypeSources(typeSource, config22);
|
|
91892
|
+
const mergedNodes = mergeGraphQLNodes(allNodes, config22);
|
|
91893
|
+
if (config22 === null || config22 === void 0 ? void 0 : config22.useSchemaDefinition) {
|
|
91894
91894
|
const schemaDef = mergedNodes[schemaDefSymbol] || {
|
|
91895
91895
|
kind: import_graphql28.Kind.SCHEMA_DEFINITION,
|
|
91896
91896
|
operationTypes: []
|
|
@@ -91917,7 +91917,7 @@ function mergeGraphQLTypes(typeSource, config4) {
|
|
|
91917
91917
|
mergedNodes[schemaDefSymbol] = schemaDef;
|
|
91918
91918
|
}
|
|
91919
91919
|
}
|
|
91920
|
-
if ((
|
|
91920
|
+
if ((config22 === null || config22 === void 0 ? void 0 : config22.forceSchemaDefinition) && !((_c = (_b = mergedNodes[schemaDefSymbol]) === null || _b === void 0 ? void 0 : _b.operationTypes) === null || _c === void 0 ? void 0 : _c.length)) {
|
|
91921
91921
|
mergedNodes[schemaDefSymbol] = {
|
|
91922
91922
|
kind: import_graphql28.Kind.SCHEMA_DEFINITION,
|
|
91923
91923
|
operationTypes: [
|
|
@@ -91936,8 +91936,8 @@ function mergeGraphQLTypes(typeSource, config4) {
|
|
|
91936
91936
|
};
|
|
91937
91937
|
}
|
|
91938
91938
|
const mergedNodeDefinitions = Object.values(mergedNodes);
|
|
91939
|
-
if (
|
|
91940
|
-
const sortFn = typeof
|
|
91939
|
+
if (config22 === null || config22 === void 0 ? void 0 : config22.sort) {
|
|
91940
|
+
const sortFn = typeof config22.sort === "function" ? config22.sort : defaultStringComparator;
|
|
91941
91941
|
mergedNodeDefinitions.sort((a, b) => {
|
|
91942
91942
|
var _a2, _b2;
|
|
91943
91943
|
return sortFn((_a2 = a.name) === null || _a2 === void 0 ? void 0 : _a2.value, (_b2 = b.name) === null || _b2 === void 0 ? void 0 : _b2.value);
|
|
@@ -92021,30 +92021,30 @@ function makeExecutableSchema({ typeDefs, resolvers = {}, resolverValidationOpti
|
|
|
92021
92021
|
}
|
|
92022
92022
|
return schema;
|
|
92023
92023
|
}
|
|
92024
|
-
function mergeSchemas(
|
|
92024
|
+
function mergeSchemas(config22) {
|
|
92025
92025
|
const extractedTypeDefs = [];
|
|
92026
92026
|
const extractedResolvers = [];
|
|
92027
92027
|
const extractedSchemaExtensions = [];
|
|
92028
|
-
if (
|
|
92029
|
-
for (const schema of
|
|
92028
|
+
if (config22.schemas != null) {
|
|
92029
|
+
for (const schema of config22.schemas) {
|
|
92030
92030
|
extractedTypeDefs.push(schema);
|
|
92031
92031
|
extractedResolvers.push(getResolversFromSchema(schema));
|
|
92032
92032
|
extractedSchemaExtensions.push(extractExtensionsFromSchema(schema));
|
|
92033
92033
|
}
|
|
92034
92034
|
}
|
|
92035
|
-
if (
|
|
92036
|
-
extractedTypeDefs.push(
|
|
92035
|
+
if (config22.typeDefs != null) {
|
|
92036
|
+
extractedTypeDefs.push(config22.typeDefs);
|
|
92037
92037
|
}
|
|
92038
|
-
if (
|
|
92039
|
-
const additionalResolvers = asArray(
|
|
92038
|
+
if (config22.resolvers != null) {
|
|
92039
|
+
const additionalResolvers = asArray(config22.resolvers);
|
|
92040
92040
|
extractedResolvers.push(...additionalResolvers);
|
|
92041
92041
|
}
|
|
92042
|
-
if (
|
|
92043
|
-
const additionalSchemaExtensions = asArray(
|
|
92042
|
+
if (config22.schemaExtensions != null) {
|
|
92043
|
+
const additionalSchemaExtensions = asArray(config22.schemaExtensions);
|
|
92044
92044
|
extractedSchemaExtensions.push(...additionalSchemaExtensions);
|
|
92045
92045
|
}
|
|
92046
92046
|
return makeExecutableSchema({
|
|
92047
|
-
...
|
|
92047
|
+
...config22,
|
|
92048
92048
|
typeDefs: extractedTypeDefs,
|
|
92049
92049
|
resolvers: extractedResolvers,
|
|
92050
92050
|
schemaExtensions: extractedSchemaExtensions
|
|
@@ -92173,7 +92173,7 @@ async function marshalSelection({
|
|
|
92173
92173
|
selection,
|
|
92174
92174
|
data: data2
|
|
92175
92175
|
}) {
|
|
92176
|
-
const
|
|
92176
|
+
const config22 = getCurrentConfig();
|
|
92177
92177
|
if (data2 === null || typeof data2 === "undefined") {
|
|
92178
92178
|
return data2;
|
|
92179
92179
|
}
|
|
@@ -92191,8 +92191,8 @@ async function marshalSelection({
|
|
|
92191
92191
|
if (selection2) {
|
|
92192
92192
|
return [fieldName, await marshalSelection({ selection: selection2, data: value2 })];
|
|
92193
92193
|
}
|
|
92194
|
-
if (
|
|
92195
|
-
const marshalFn =
|
|
92194
|
+
if (config22.scalars?.[type]) {
|
|
92195
|
+
const marshalFn = config22.scalars[type].marshal;
|
|
92196
92196
|
if (!marshalFn) {
|
|
92197
92197
|
throw new Error(
|
|
92198
92198
|
`scalar type ${type} is missing a \`marshal\` function. see https://github.com/AlecAivazis/houdini#%EF%B8%8Fcustom-scalars`
|
|
@@ -92545,6 +92545,35 @@ async function glob(pattern) {
|
|
|
92545
92545
|
return await promisify(import_glob.glob)(posixify(pattern));
|
|
92546
92546
|
}
|
|
92547
92547
|
glob.hasMagic = import_glob.glob.hasMagic;
|
|
92548
|
+
var config = {
|
|
92549
|
+
reset: {
|
|
92550
|
+
node: `\x1B[37m\x1B[0m`,
|
|
92551
|
+
browser: ""
|
|
92552
|
+
},
|
|
92553
|
+
green: {
|
|
92554
|
+
node: `\x1B[32m`,
|
|
92555
|
+
browser: "color: green"
|
|
92556
|
+
},
|
|
92557
|
+
magneta: {
|
|
92558
|
+
node: `\x1B[35m`,
|
|
92559
|
+
browser: "color: #ff00ff"
|
|
92560
|
+
},
|
|
92561
|
+
red: {
|
|
92562
|
+
node: `\x1B[31m`,
|
|
92563
|
+
browser: "color: red"
|
|
92564
|
+
},
|
|
92565
|
+
cyan: {
|
|
92566
|
+
node: `\x1B[36m`,
|
|
92567
|
+
browser: "color: cyan"
|
|
92568
|
+
},
|
|
92569
|
+
yellow: {
|
|
92570
|
+
node: `\x1B[33m`,
|
|
92571
|
+
browser: "color: yellow"
|
|
92572
|
+
}
|
|
92573
|
+
};
|
|
92574
|
+
function logCyan(str) {
|
|
92575
|
+
return `${config.cyan.node}${str}${config.reset.node}`;
|
|
92576
|
+
}
|
|
92548
92577
|
var graphql = __toESM2(require_graphql2(), 1);
|
|
92549
92578
|
function dataUriToBuffer(uri) {
|
|
92550
92579
|
if (!/^data:/i.test(uri)) {
|
|
@@ -93712,7 +93741,8 @@ function fixResponseChunkedTransferBadEnding(request, errorCallback) {
|
|
|
93712
93741
|
});
|
|
93713
93742
|
});
|
|
93714
93743
|
}
|
|
93715
|
-
async function pullSchema(url, schemaPath, headers) {
|
|
93744
|
+
async function pullSchema(url, schemaPath, headers, skipWriting) {
|
|
93745
|
+
let content = "";
|
|
93716
93746
|
try {
|
|
93717
93747
|
const resp = await fetch(url, {
|
|
93718
93748
|
method: "POST",
|
|
@@ -93721,30 +93751,41 @@ async function pullSchema(url, schemaPath, headers) {
|
|
|
93721
93751
|
}),
|
|
93722
93752
|
headers: { "Content-Type": "application/json", ...headers }
|
|
93723
93753
|
});
|
|
93724
|
-
|
|
93754
|
+
content = await resp.text();
|
|
93725
93755
|
const jsonSchema = JSON.parse(content).data;
|
|
93726
|
-
|
|
93756
|
+
let fileData = "";
|
|
93727
93757
|
if (schemaPath.endsWith("gql") || schemaPath.endsWith("graphql")) {
|
|
93728
|
-
const
|
|
93729
|
-
|
|
93758
|
+
const schema = graphql.buildClientSchema(jsonSchema);
|
|
93759
|
+
fileData = graphql.printSchema(graphql.lexicographicSortSchema(schema));
|
|
93730
93760
|
} else {
|
|
93731
|
-
|
|
93761
|
+
fileData = JSON.stringify(jsonSchema);
|
|
93732
93762
|
}
|
|
93733
|
-
|
|
93763
|
+
if (!skipWriting) {
|
|
93764
|
+
await writeFile(schemaPath, fileData);
|
|
93765
|
+
}
|
|
93766
|
+
return fileData;
|
|
93734
93767
|
} catch (e22) {
|
|
93735
|
-
|
|
93768
|
+
if (content) {
|
|
93769
|
+
console.warn(
|
|
93770
|
+
`\u26A0\uFE0F Couldn't pull your schema.
|
|
93771
|
+
${logCyan(" Reponse:")} ${content}
|
|
93772
|
+
${logCyan(" Error :")} ${e22.message}`
|
|
93773
|
+
);
|
|
93774
|
+
} else {
|
|
93775
|
+
console.warn(`\u26A0\uFE0F Couldn't pull your schema: ${e22.message}`);
|
|
93776
|
+
}
|
|
93736
93777
|
}
|
|
93737
|
-
return
|
|
93778
|
+
return null;
|
|
93738
93779
|
}
|
|
93739
93780
|
function plugin(name, hooks) {
|
|
93740
93781
|
const data2 = {
|
|
93741
93782
|
name,
|
|
93742
93783
|
plugin: hooks,
|
|
93743
93784
|
__plugin_init__: true,
|
|
93744
|
-
with(
|
|
93785
|
+
with(config22) {
|
|
93745
93786
|
return {
|
|
93746
93787
|
...data2,
|
|
93747
|
-
config:
|
|
93788
|
+
config: config22
|
|
93748
93789
|
};
|
|
93749
93790
|
}
|
|
93750
93791
|
};
|
|
@@ -94955,7 +94996,7 @@ var InMemorySubscriptions = class {
|
|
|
94955
94996
|
};
|
|
94956
94997
|
var Cache = class {
|
|
94957
94998
|
_internal_unstable;
|
|
94958
|
-
constructor({ disabled, ...
|
|
94999
|
+
constructor({ disabled, ...config22 } = {}) {
|
|
94959
95000
|
this._internal_unstable = new CacheInternal({
|
|
94960
95001
|
cache: this,
|
|
94961
95002
|
storage: new InMemoryStorage(),
|
|
@@ -94965,8 +95006,8 @@ var Cache = class {
|
|
|
94965
95006
|
staleManager: new StaleManager(this),
|
|
94966
95007
|
disabled: disabled ?? typeof globalThis.window === "undefined"
|
|
94967
95008
|
});
|
|
94968
|
-
if (Object.keys(
|
|
94969
|
-
this.setConfig(defaultConfigValues(
|
|
95009
|
+
if (Object.keys(config22).length > 0) {
|
|
95010
|
+
this.setConfig(defaultConfigValues(config22));
|
|
94970
95011
|
}
|
|
94971
95012
|
}
|
|
94972
95013
|
write({
|
|
@@ -95020,8 +95061,8 @@ var Cache = class {
|
|
|
95020
95061
|
this._internal_unstable.lists.removeIDFromAllLists(id2, layer);
|
|
95021
95062
|
this._internal_unstable.storage.delete(id2, layer);
|
|
95022
95063
|
}
|
|
95023
|
-
setConfig(
|
|
95024
|
-
this._internal_unstable.setConfig(
|
|
95064
|
+
setConfig(config22) {
|
|
95065
|
+
this._internal_unstable.setConfig(config22);
|
|
95025
95066
|
}
|
|
95026
95067
|
markTypeStale(options) {
|
|
95027
95068
|
if (!options) {
|
|
@@ -95146,7 +95187,7 @@ var CacheInternal = class {
|
|
|
95146
95187
|
lifetimes,
|
|
95147
95188
|
staleManager,
|
|
95148
95189
|
disabled,
|
|
95149
|
-
config:
|
|
95190
|
+
config: config22
|
|
95150
95191
|
}) {
|
|
95151
95192
|
this.storage = storage;
|
|
95152
95193
|
this.subscriptions = subscriptions;
|
|
@@ -95154,7 +95195,7 @@ var CacheInternal = class {
|
|
|
95154
95195
|
this.cache = cache;
|
|
95155
95196
|
this.lifetimes = lifetimes;
|
|
95156
95197
|
this.staleManager = staleManager;
|
|
95157
|
-
this._config =
|
|
95198
|
+
this._config = config22;
|
|
95158
95199
|
this._disabled = disabled;
|
|
95159
95200
|
try {
|
|
95160
95201
|
if (process.env.HOUDINI_TEST === "true") {
|
|
@@ -95166,8 +95207,8 @@ var CacheInternal = class {
|
|
|
95166
95207
|
get config() {
|
|
95167
95208
|
return this._config ?? getCurrentConfig();
|
|
95168
95209
|
}
|
|
95169
|
-
setConfig(
|
|
95170
|
-
this._config =
|
|
95210
|
+
setConfig(config22) {
|
|
95211
|
+
this._config = config22;
|
|
95171
95212
|
}
|
|
95172
95213
|
writeSelection({
|
|
95173
95214
|
data: data2,
|
|
@@ -96665,7 +96706,7 @@ async function getConfig({
|
|
|
96665
96706
|
);
|
|
96666
96707
|
} else if (!await readFile(_config.schemaPath)) {
|
|
96667
96708
|
console.log("\u231B Pulling schema from api");
|
|
96668
|
-
schemaOk = await pullSchema(apiURL, _config.schemaPath);
|
|
96709
|
+
schemaOk = await pullSchema(apiURL, _config.schemaPath) !== null;
|
|
96669
96710
|
}
|
|
96670
96711
|
}
|
|
96671
96712
|
if (schemaOk && !noSchema) {
|
|
@@ -96723,8 +96764,8 @@ async function readConfigFile(configPath = DEFAULT_CONFIG_PATH) {
|
|
|
96723
96764
|
throw new Error(`Could not load config file at file://${configPath}.
|
|
96724
96765
|
${e22.message}`);
|
|
96725
96766
|
}
|
|
96726
|
-
const
|
|
96727
|
-
return
|
|
96767
|
+
const config22 = imported.default || imported;
|
|
96768
|
+
return config22;
|
|
96728
96769
|
}
|
|
96729
96770
|
var orderedPlugins = (plugins2) => {
|
|
96730
96771
|
const ordered = plugins2.filter(
|
|
@@ -96830,23 +96871,23 @@ function formatErrors(e22, afterError) {
|
|
|
96830
96871
|
afterError?.(e22);
|
|
96831
96872
|
}
|
|
96832
96873
|
}
|
|
96833
|
-
function unwrapType(
|
|
96874
|
+
function unwrapType(config22, type, wrappers = []) {
|
|
96834
96875
|
if (type.kind === "NonNullType") {
|
|
96835
|
-
return unwrapType(
|
|
96876
|
+
return unwrapType(config22, type.type, [TypeWrapper.NonNull, ...wrappers]);
|
|
96836
96877
|
}
|
|
96837
96878
|
if (type instanceof graphql3.GraphQLNonNull) {
|
|
96838
|
-
return unwrapType(
|
|
96879
|
+
return unwrapType(config22, type.ofType, [TypeWrapper.NonNull, ...wrappers]);
|
|
96839
96880
|
}
|
|
96840
96881
|
if (wrappers[0] !== TypeWrapper.NonNull) {
|
|
96841
96882
|
wrappers.unshift(TypeWrapper.Nullable);
|
|
96842
96883
|
}
|
|
96843
96884
|
if (type.kind === "ListType") {
|
|
96844
|
-
return unwrapType(
|
|
96885
|
+
return unwrapType(config22, type.type, [TypeWrapper.List, ...wrappers]);
|
|
96845
96886
|
}
|
|
96846
96887
|
if (type instanceof graphql3.GraphQLList) {
|
|
96847
|
-
return unwrapType(
|
|
96888
|
+
return unwrapType(config22, type.ofType, [TypeWrapper.List, ...wrappers]);
|
|
96848
96889
|
}
|
|
96849
|
-
const namedType =
|
|
96890
|
+
const namedType = config22.schema.getType(type.name.value || type.name);
|
|
96850
96891
|
if (!namedType) {
|
|
96851
96892
|
throw new Error("Could not unwrap type: " + JSON.stringify(type));
|
|
96852
96893
|
}
|
|
@@ -96879,12 +96920,12 @@ function deepMerge2(filepath, ...targets) {
|
|
|
96879
96920
|
});
|
|
96880
96921
|
}
|
|
96881
96922
|
}
|
|
96882
|
-
function parseJS(str,
|
|
96923
|
+
function parseJS(str, config22) {
|
|
96883
96924
|
const defaultConfig = {
|
|
96884
|
-
plugins: ["typescript", "importAssertions", "decorators"],
|
|
96925
|
+
plugins: ["typescript", "importAssertions", "decorators-legacy"],
|
|
96885
96926
|
sourceType: "module"
|
|
96886
96927
|
};
|
|
96887
|
-
return (0, import_parser.parse)(str || "",
|
|
96928
|
+
return (0, import_parser.parse)(str || "", config22 ? deepMerge2("", defaultConfig, config22) : defaultConfig).program;
|
|
96888
96929
|
}
|
|
96889
96930
|
async function printJS(script, options) {
|
|
96890
96931
|
if (options?.pretty) {
|
|
@@ -97002,7 +97043,7 @@ async function asyncWalk(ast, { enter, leave }) {
|
|
|
97002
97043
|
return await instance.visit(ast, null);
|
|
97003
97044
|
}
|
|
97004
97045
|
var graphql4 = __toESM2(require_graphql2(), 1);
|
|
97005
|
-
async function find_graphql(
|
|
97046
|
+
async function find_graphql(config22, parsedScript, walker) {
|
|
97006
97047
|
await asyncWalk(parsedScript, {
|
|
97007
97048
|
async enter(node2, parent2) {
|
|
97008
97049
|
if (node2.type !== "TaggedTemplateExpression" && node2.type !== "CallExpression") {
|
|
@@ -97035,7 +97076,7 @@ async function find_graphql(config4, parsedScript, walker) {
|
|
|
97035
97076
|
if (walker.where && !walker.where(parsedTag, { node: node2, parent: parent2 })) {
|
|
97036
97077
|
return;
|
|
97037
97078
|
}
|
|
97038
|
-
const definition =
|
|
97079
|
+
const definition = config22.extractDefinition(parsedTag);
|
|
97039
97080
|
const name = definition.name?.value;
|
|
97040
97081
|
if (!name) {
|
|
97041
97082
|
throw new Error("Could not find definition name");
|
|
@@ -97052,7 +97093,7 @@ async function find_graphql(config4, parsedScript, walker) {
|
|
|
97052
97093
|
kind = CompiledSubscriptionKind;
|
|
97053
97094
|
}
|
|
97054
97095
|
}
|
|
97055
|
-
walker.dependency?.(
|
|
97096
|
+
walker.dependency?.(config22.artifactPath(parsedTag));
|
|
97056
97097
|
await walker.tag({
|
|
97057
97098
|
parsedDocument: parsedTag,
|
|
97058
97099
|
node: {
|
|
@@ -105089,21 +105130,21 @@ function fetchParseValues(dict) {
|
|
|
105089
105130
|
}
|
|
105090
105131
|
return result;
|
|
105091
105132
|
}
|
|
105092
|
-
function processConfig(
|
|
105133
|
+
function processConfig(config5) {
|
|
105093
105134
|
const parseConfig = {
|
|
105094
105135
|
context: /* @__PURE__ */ Object.create(null),
|
|
105095
|
-
scope: Object.assign(/* @__PURE__ */ Object.create(null),
|
|
105096
|
-
atrule: fetchParseValues(
|
|
105097
|
-
pseudo: fetchParseValues(
|
|
105098
|
-
node: fetchParseValues(
|
|
105136
|
+
scope: Object.assign(/* @__PURE__ */ Object.create(null), config5.scope),
|
|
105137
|
+
atrule: fetchParseValues(config5.atrule),
|
|
105138
|
+
pseudo: fetchParseValues(config5.pseudo),
|
|
105139
|
+
node: fetchParseValues(config5.node)
|
|
105099
105140
|
};
|
|
105100
|
-
for (const name in
|
|
105101
|
-
switch (typeof
|
|
105141
|
+
for (const name in config5.parseContext) {
|
|
105142
|
+
switch (typeof config5.parseContext[name]) {
|
|
105102
105143
|
case "function":
|
|
105103
|
-
parseConfig.context[name] =
|
|
105144
|
+
parseConfig.context[name] = config5.parseContext[name];
|
|
105104
105145
|
break;
|
|
105105
105146
|
case "string":
|
|
105106
|
-
parseConfig.context[name] = createParseContext(
|
|
105147
|
+
parseConfig.context[name] = createParseContext(config5.parseContext[name]);
|
|
105107
105148
|
break;
|
|
105108
105149
|
}
|
|
105109
105150
|
}
|
|
@@ -105113,14 +105154,14 @@ function processConfig(config4) {
|
|
|
105113
105154
|
...parseConfig.node
|
|
105114
105155
|
};
|
|
105115
105156
|
}
|
|
105116
|
-
function createParser(
|
|
105157
|
+
function createParser(config5) {
|
|
105117
105158
|
let source = "";
|
|
105118
105159
|
let filename = "<unknown>";
|
|
105119
105160
|
let needPositions = false;
|
|
105120
105161
|
let onParseError = NOOP;
|
|
105121
105162
|
let onParseErrorThrow = false;
|
|
105122
105163
|
const locationMap = new OffsetToLocation();
|
|
105123
|
-
const parser = Object.assign(new TokenStream(), processConfig(
|
|
105164
|
+
const parser = Object.assign(new TokenStream(), processConfig(config5 || {}), {
|
|
105124
105165
|
parseAtrulePrelude: true,
|
|
105125
105166
|
parseRulePrelude: true,
|
|
105126
105167
|
parseValue: true,
|
|
@@ -106970,7 +107011,7 @@ var node = /* @__PURE__ */ Object.freeze({
|
|
|
106970
107011
|
Value: parse$G,
|
|
106971
107012
|
WhiteSpace: parse$H
|
|
106972
107013
|
});
|
|
106973
|
-
var
|
|
107014
|
+
var config2 = {
|
|
106974
107015
|
parseContext: {
|
|
106975
107016
|
default: "StyleSheet",
|
|
106976
107017
|
stylesheet: "StyleSheet",
|
|
@@ -106995,7 +107036,7 @@ var config = {
|
|
|
106995
107036
|
pseudo,
|
|
106996
107037
|
node
|
|
106997
107038
|
};
|
|
106998
|
-
var parse$I = createParser(
|
|
107039
|
+
var parse$I = createParser(config2);
|
|
106999
107040
|
var regex_closing_style_tag = /<\/style\s*>/;
|
|
107000
107041
|
var regex_starts_with_closing_style_tag = /^<\/style\s*>/;
|
|
107001
107042
|
function read_style(parser, start, attributes) {
|
|
@@ -124691,7 +124732,7 @@ function findScriptInnerBounds({
|
|
|
124691
124732
|
}
|
|
124692
124733
|
|
|
124693
124734
|
// ../../node_modules/.pnpm/@kitql+helper@0.5.0/node_modules/@kitql/helper/index.mjs
|
|
124694
|
-
var
|
|
124735
|
+
var config3 = {
|
|
124695
124736
|
reset: {
|
|
124696
124737
|
node: `\x1B[37m\x1B[0m`,
|
|
124697
124738
|
browser: ""
|
|
@@ -124718,7 +124759,7 @@ var config2 = {
|
|
|
124718
124759
|
}
|
|
124719
124760
|
};
|
|
124720
124761
|
function logYellow(str) {
|
|
124721
|
-
return `${
|
|
124762
|
+
return `${config3.yellow.node}${str}${config3.reset.node}`;
|
|
124722
124763
|
}
|
|
124723
124764
|
|
|
124724
124765
|
// ../houdini/build/vite-esm/index.js
|
|
@@ -132398,25 +132439,25 @@ var require_definition2 = __commonJS3({
|
|
|
132398
132439
|
return arr && arr.length > 0 ? arr : void 0;
|
|
132399
132440
|
}
|
|
132400
132441
|
var GraphQLScalarType4 = /* @__PURE__ */ function() {
|
|
132401
|
-
function GraphQLScalarType5(
|
|
132442
|
+
function GraphQLScalarType5(config42) {
|
|
132402
132443
|
var _config$parseValue, _config$serialize, _config$parseLiteral;
|
|
132403
|
-
var parseValue = (_config$parseValue =
|
|
132404
|
-
this.name =
|
|
132405
|
-
this.description =
|
|
132406
|
-
this.specifiedByUrl =
|
|
132407
|
-
this.serialize = (_config$serialize =
|
|
132444
|
+
var parseValue = (_config$parseValue = config42.parseValue) !== null && _config$parseValue !== void 0 ? _config$parseValue : _identityFunc.default;
|
|
132445
|
+
this.name = config42.name;
|
|
132446
|
+
this.description = config42.description;
|
|
132447
|
+
this.specifiedByUrl = config42.specifiedByUrl;
|
|
132448
|
+
this.serialize = (_config$serialize = config42.serialize) !== null && _config$serialize !== void 0 ? _config$serialize : _identityFunc.default;
|
|
132408
132449
|
this.parseValue = parseValue;
|
|
132409
|
-
this.parseLiteral = (_config$parseLiteral =
|
|
132450
|
+
this.parseLiteral = (_config$parseLiteral = config42.parseLiteral) !== null && _config$parseLiteral !== void 0 ? _config$parseLiteral : function(node2, variables) {
|
|
132410
132451
|
return parseValue((0, _valueFromASTUntyped.valueFromASTUntyped)(node2, variables));
|
|
132411
132452
|
};
|
|
132412
|
-
this.extensions =
|
|
132413
|
-
this.astNode =
|
|
132414
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
132415
|
-
typeof
|
|
132416
|
-
|
|
132417
|
-
|
|
132418
|
-
if (
|
|
132419
|
-
typeof
|
|
132453
|
+
this.extensions = config42.extensions && (0, _toObjMap.default)(config42.extensions);
|
|
132454
|
+
this.astNode = config42.astNode;
|
|
132455
|
+
this.extensionASTNodes = undefineIfEmpty(config42.extensionASTNodes);
|
|
132456
|
+
typeof config42.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
132457
|
+
config42.specifiedByUrl == null || typeof config42.specifiedByUrl === "string" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide "specifiedByUrl" as a string, ') + "but got: ".concat((0, _inspect.default)(config42.specifiedByUrl), "."));
|
|
132458
|
+
config42.serialize == null || typeof config42.serialize === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.'));
|
|
132459
|
+
if (config42.parseLiteral) {
|
|
132460
|
+
typeof config42.parseValue === "function" && typeof config42.parseLiteral === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide both "parseValue" and "parseLiteral" functions.'));
|
|
132420
132461
|
}
|
|
132421
132462
|
}
|
|
132422
132463
|
var _proto = GraphQLScalarType5.prototype;
|
|
@@ -132451,17 +132492,17 @@ var require_definition2 = __commonJS3({
|
|
|
132451
132492
|
exports.GraphQLScalarType = GraphQLScalarType4;
|
|
132452
132493
|
(0, _defineInspect.default)(GraphQLScalarType4);
|
|
132453
132494
|
var GraphQLObjectType6 = /* @__PURE__ */ function() {
|
|
132454
|
-
function GraphQLObjectType7(
|
|
132455
|
-
this.name =
|
|
132456
|
-
this.description =
|
|
132457
|
-
this.isTypeOf =
|
|
132458
|
-
this.extensions =
|
|
132459
|
-
this.astNode =
|
|
132460
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
132461
|
-
this._fields = defineFieldMap.bind(void 0,
|
|
132462
|
-
this._interfaces = defineInterfaces.bind(void 0,
|
|
132463
|
-
typeof
|
|
132464
|
-
|
|
132495
|
+
function GraphQLObjectType7(config42) {
|
|
132496
|
+
this.name = config42.name;
|
|
132497
|
+
this.description = config42.description;
|
|
132498
|
+
this.isTypeOf = config42.isTypeOf;
|
|
132499
|
+
this.extensions = config42.extensions && (0, _toObjMap.default)(config42.extensions);
|
|
132500
|
+
this.astNode = config42.astNode;
|
|
132501
|
+
this.extensionASTNodes = undefineIfEmpty(config42.extensionASTNodes);
|
|
132502
|
+
this._fields = defineFieldMap.bind(void 0, config42);
|
|
132503
|
+
this._interfaces = defineInterfaces.bind(void 0, config42);
|
|
132504
|
+
typeof config42.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
132505
|
+
config42.isTypeOf == null || typeof config42.isTypeOf === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide "isTypeOf" as a function, ') + "but got: ".concat((0, _inspect.default)(config42.isTypeOf), "."));
|
|
132465
132506
|
}
|
|
132466
132507
|
var _proto2 = GraphQLObjectType7.prototype;
|
|
132467
132508
|
_proto2.getFields = function getFields() {
|
|
@@ -132504,22 +132545,22 @@ var require_definition2 = __commonJS3({
|
|
|
132504
132545
|
}();
|
|
132505
132546
|
exports.GraphQLObjectType = GraphQLObjectType6;
|
|
132506
132547
|
(0, _defineInspect.default)(GraphQLObjectType6);
|
|
132507
|
-
function defineInterfaces(
|
|
132548
|
+
function defineInterfaces(config42) {
|
|
132508
132549
|
var _resolveThunk;
|
|
132509
|
-
var interfaces = (_resolveThunk = resolveThunk(
|
|
132510
|
-
Array.isArray(interfaces) || (0, _devAssert.default)(0, "".concat(
|
|
132550
|
+
var interfaces = (_resolveThunk = resolveThunk(config42.interfaces)) !== null && _resolveThunk !== void 0 ? _resolveThunk : [];
|
|
132551
|
+
Array.isArray(interfaces) || (0, _devAssert.default)(0, "".concat(config42.name, " interfaces must be an Array or a function which returns an Array."));
|
|
132511
132552
|
return interfaces;
|
|
132512
132553
|
}
|
|
132513
|
-
function defineFieldMap(
|
|
132514
|
-
var fieldMap = resolveThunk(
|
|
132515
|
-
isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(
|
|
132554
|
+
function defineFieldMap(config42) {
|
|
132555
|
+
var fieldMap = resolveThunk(config42.fields);
|
|
132556
|
+
isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(config42.name, " fields must be an object with field names as keys or a function which returns such an object."));
|
|
132516
132557
|
return (0, _mapValue.default)(fieldMap, function(fieldConfig, fieldName) {
|
|
132517
132558
|
var _fieldConfig$args;
|
|
132518
|
-
isPlainObj(fieldConfig) || (0, _devAssert.default)(0, "".concat(
|
|
132519
|
-
!("isDeprecated" in fieldConfig) || (0, _devAssert.default)(0, "".concat(
|
|
132520
|
-
fieldConfig.resolve == null || typeof fieldConfig.resolve === "function" || (0, _devAssert.default)(0, "".concat(
|
|
132559
|
+
isPlainObj(fieldConfig) || (0, _devAssert.default)(0, "".concat(config42.name, ".").concat(fieldName, " field config must be an object."));
|
|
132560
|
+
!("isDeprecated" in fieldConfig) || (0, _devAssert.default)(0, "".concat(config42.name, ".").concat(fieldName, ' should provide "deprecationReason" instead of "isDeprecated".'));
|
|
132561
|
+
fieldConfig.resolve == null || typeof fieldConfig.resolve === "function" || (0, _devAssert.default)(0, "".concat(config42.name, ".").concat(fieldName, " field resolver must be a function if ") + "provided, but got: ".concat((0, _inspect.default)(fieldConfig.resolve), "."));
|
|
132521
132562
|
var argsConfig = (_fieldConfig$args = fieldConfig.args) !== null && _fieldConfig$args !== void 0 ? _fieldConfig$args : {};
|
|
132522
|
-
isPlainObj(argsConfig) || (0, _devAssert.default)(0, "".concat(
|
|
132563
|
+
isPlainObj(argsConfig) || (0, _devAssert.default)(0, "".concat(config42.name, ".").concat(fieldName, " args must be an object with argument names as keys."));
|
|
132523
132564
|
var args = (0, _objectEntries.default)(argsConfig).map(function(_ref) {
|
|
132524
132565
|
var argName = _ref[0], argConfig = _ref[1];
|
|
132525
132566
|
return {
|
|
@@ -132581,17 +132622,17 @@ var require_definition2 = __commonJS3({
|
|
|
132581
132622
|
return isNonNullType10(arg.type) && arg.defaultValue === void 0;
|
|
132582
132623
|
}
|
|
132583
132624
|
var GraphQLInterfaceType5 = /* @__PURE__ */ function() {
|
|
132584
|
-
function GraphQLInterfaceType6(
|
|
132585
|
-
this.name =
|
|
132586
|
-
this.description =
|
|
132587
|
-
this.resolveType =
|
|
132588
|
-
this.extensions =
|
|
132589
|
-
this.astNode =
|
|
132590
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
132591
|
-
this._fields = defineFieldMap.bind(void 0,
|
|
132592
|
-
this._interfaces = defineInterfaces.bind(void 0,
|
|
132593
|
-
typeof
|
|
132594
|
-
|
|
132625
|
+
function GraphQLInterfaceType6(config42) {
|
|
132626
|
+
this.name = config42.name;
|
|
132627
|
+
this.description = config42.description;
|
|
132628
|
+
this.resolveType = config42.resolveType;
|
|
132629
|
+
this.extensions = config42.extensions && (0, _toObjMap.default)(config42.extensions);
|
|
132630
|
+
this.astNode = config42.astNode;
|
|
132631
|
+
this.extensionASTNodes = undefineIfEmpty(config42.extensionASTNodes);
|
|
132632
|
+
this._fields = defineFieldMap.bind(void 0, config42);
|
|
132633
|
+
this._interfaces = defineInterfaces.bind(void 0, config42);
|
|
132634
|
+
typeof config42.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
132635
|
+
config42.resolveType == null || typeof config42.resolveType === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide "resolveType" as a function, ') + "but got: ".concat((0, _inspect.default)(config42.resolveType), "."));
|
|
132595
132636
|
}
|
|
132596
132637
|
var _proto3 = GraphQLInterfaceType6.prototype;
|
|
132597
132638
|
_proto3.getFields = function getFields() {
|
|
@@ -132636,16 +132677,16 @@ var require_definition2 = __commonJS3({
|
|
|
132636
132677
|
exports.GraphQLInterfaceType = GraphQLInterfaceType5;
|
|
132637
132678
|
(0, _defineInspect.default)(GraphQLInterfaceType5);
|
|
132638
132679
|
var GraphQLUnionType3 = /* @__PURE__ */ function() {
|
|
132639
|
-
function GraphQLUnionType4(
|
|
132640
|
-
this.name =
|
|
132641
|
-
this.description =
|
|
132642
|
-
this.resolveType =
|
|
132643
|
-
this.extensions =
|
|
132644
|
-
this.astNode =
|
|
132645
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
132646
|
-
this._types = defineTypes.bind(void 0,
|
|
132647
|
-
typeof
|
|
132648
|
-
|
|
132680
|
+
function GraphQLUnionType4(config42) {
|
|
132681
|
+
this.name = config42.name;
|
|
132682
|
+
this.description = config42.description;
|
|
132683
|
+
this.resolveType = config42.resolveType;
|
|
132684
|
+
this.extensions = config42.extensions && (0, _toObjMap.default)(config42.extensions);
|
|
132685
|
+
this.astNode = config42.astNode;
|
|
132686
|
+
this.extensionASTNodes = undefineIfEmpty(config42.extensionASTNodes);
|
|
132687
|
+
this._types = defineTypes.bind(void 0, config42);
|
|
132688
|
+
typeof config42.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
132689
|
+
config42.resolveType == null || typeof config42.resolveType === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide "resolveType" as a function, ') + "but got: ".concat((0, _inspect.default)(config42.resolveType), "."));
|
|
132649
132690
|
}
|
|
132650
132691
|
var _proto4 = GraphQLUnionType4.prototype;
|
|
132651
132692
|
_proto4.getTypes = function getTypes() {
|
|
@@ -132682,26 +132723,26 @@ var require_definition2 = __commonJS3({
|
|
|
132682
132723
|
}();
|
|
132683
132724
|
exports.GraphQLUnionType = GraphQLUnionType3;
|
|
132684
132725
|
(0, _defineInspect.default)(GraphQLUnionType3);
|
|
132685
|
-
function defineTypes(
|
|
132686
|
-
var types18 = resolveThunk(
|
|
132687
|
-
Array.isArray(types18) || (0, _devAssert.default)(0, "Must provide Array of types or a function which returns such an array for Union ".concat(
|
|
132726
|
+
function defineTypes(config42) {
|
|
132727
|
+
var types18 = resolveThunk(config42.types);
|
|
132728
|
+
Array.isArray(types18) || (0, _devAssert.default)(0, "Must provide Array of types or a function which returns such an array for Union ".concat(config42.name, "."));
|
|
132688
132729
|
return types18;
|
|
132689
132730
|
}
|
|
132690
132731
|
var GraphQLEnumType4 = /* @__PURE__ */ function() {
|
|
132691
|
-
function GraphQLEnumType5(
|
|
132692
|
-
this.name =
|
|
132693
|
-
this.description =
|
|
132694
|
-
this.extensions =
|
|
132695
|
-
this.astNode =
|
|
132696
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
132697
|
-
this._values = defineEnumValues(this.name,
|
|
132732
|
+
function GraphQLEnumType5(config42) {
|
|
132733
|
+
this.name = config42.name;
|
|
132734
|
+
this.description = config42.description;
|
|
132735
|
+
this.extensions = config42.extensions && (0, _toObjMap.default)(config42.extensions);
|
|
132736
|
+
this.astNode = config42.astNode;
|
|
132737
|
+
this.extensionASTNodes = undefineIfEmpty(config42.extensionASTNodes);
|
|
132738
|
+
this._values = defineEnumValues(this.name, config42.values);
|
|
132698
132739
|
this._valueLookup = new Map(this._values.map(function(enumValue) {
|
|
132699
132740
|
return [enumValue.value, enumValue];
|
|
132700
132741
|
}));
|
|
132701
132742
|
this._nameLookup = (0, _keyMap.default)(this._values, function(value2) {
|
|
132702
132743
|
return value2.name;
|
|
132703
132744
|
});
|
|
132704
|
-
typeof
|
|
132745
|
+
typeof config42.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
132705
132746
|
}
|
|
132706
132747
|
var _proto5 = GraphQLEnumType5.prototype;
|
|
132707
132748
|
_proto5.getValues = function getValues() {
|
|
@@ -132803,14 +132844,14 @@ var require_definition2 = __commonJS3({
|
|
|
132803
132844
|
});
|
|
132804
132845
|
}
|
|
132805
132846
|
var GraphQLInputObjectType4 = /* @__PURE__ */ function() {
|
|
132806
|
-
function GraphQLInputObjectType5(
|
|
132807
|
-
this.name =
|
|
132808
|
-
this.description =
|
|
132809
|
-
this.extensions =
|
|
132810
|
-
this.astNode =
|
|
132811
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
132812
|
-
this._fields = defineInputFieldMap.bind(void 0,
|
|
132813
|
-
typeof
|
|
132847
|
+
function GraphQLInputObjectType5(config42) {
|
|
132848
|
+
this.name = config42.name;
|
|
132849
|
+
this.description = config42.description;
|
|
132850
|
+
this.extensions = config42.extensions && (0, _toObjMap.default)(config42.extensions);
|
|
132851
|
+
this.astNode = config42.astNode;
|
|
132852
|
+
this.extensionASTNodes = undefineIfEmpty(config42.extensionASTNodes);
|
|
132853
|
+
this._fields = defineInputFieldMap.bind(void 0, config42);
|
|
132854
|
+
typeof config42.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
132814
132855
|
}
|
|
132815
132856
|
var _proto6 = GraphQLInputObjectType5.prototype;
|
|
132816
132857
|
_proto6.getFields = function getFields() {
|
|
@@ -132856,11 +132897,11 @@ var require_definition2 = __commonJS3({
|
|
|
132856
132897
|
}();
|
|
132857
132898
|
exports.GraphQLInputObjectType = GraphQLInputObjectType4;
|
|
132858
132899
|
(0, _defineInspect.default)(GraphQLInputObjectType4);
|
|
132859
|
-
function defineInputFieldMap(
|
|
132860
|
-
var fieldMap = resolveThunk(
|
|
132861
|
-
isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(
|
|
132900
|
+
function defineInputFieldMap(config42) {
|
|
132901
|
+
var fieldMap = resolveThunk(config42.fields);
|
|
132902
|
+
isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(config42.name, " fields must be an object with field names as keys or a function which returns such an object."));
|
|
132862
132903
|
return (0, _mapValue.default)(fieldMap, function(fieldConfig, fieldName) {
|
|
132863
|
-
!("resolve" in fieldConfig) || (0, _devAssert.default)(0, "".concat(
|
|
132904
|
+
!("resolve" in fieldConfig) || (0, _devAssert.default)(0, "".concat(config42.name, ".").concat(fieldName, " field has a resolve property, but Input Types cannot define resolvers."));
|
|
132864
132905
|
return {
|
|
132865
132906
|
name: fieldName,
|
|
132866
132907
|
description: fieldConfig.description,
|
|
@@ -134039,18 +134080,18 @@ var require_directives2 = __commonJS3({
|
|
|
134039
134080
|
return directive;
|
|
134040
134081
|
}
|
|
134041
134082
|
var GraphQLDirective2 = /* @__PURE__ */ function() {
|
|
134042
|
-
function GraphQLDirective3(
|
|
134083
|
+
function GraphQLDirective3(config42) {
|
|
134043
134084
|
var _config$isRepeatable, _config$args;
|
|
134044
|
-
this.name =
|
|
134045
|
-
this.description =
|
|
134046
|
-
this.locations =
|
|
134047
|
-
this.isRepeatable = (_config$isRepeatable =
|
|
134048
|
-
this.extensions =
|
|
134049
|
-
this.astNode =
|
|
134050
|
-
|
|
134051
|
-
Array.isArray(
|
|
134052
|
-
var args = (_config$args =
|
|
134053
|
-
(0, _isObjectLike.default)(args) && !Array.isArray(args) || (0, _devAssert.default)(0, "@".concat(
|
|
134085
|
+
this.name = config42.name;
|
|
134086
|
+
this.description = config42.description;
|
|
134087
|
+
this.locations = config42.locations;
|
|
134088
|
+
this.isRepeatable = (_config$isRepeatable = config42.isRepeatable) !== null && _config$isRepeatable !== void 0 ? _config$isRepeatable : false;
|
|
134089
|
+
this.extensions = config42.extensions && (0, _toObjMap.default)(config42.extensions);
|
|
134090
|
+
this.astNode = config42.astNode;
|
|
134091
|
+
config42.name || (0, _devAssert.default)(0, "Directive must be named.");
|
|
134092
|
+
Array.isArray(config42.locations) || (0, _devAssert.default)(0, "@".concat(config42.name, " locations must be an Array."));
|
|
134093
|
+
var args = (_config$args = config42.args) !== null && _config$args !== void 0 ? _config$args : {};
|
|
134094
|
+
(0, _isObjectLike.default)(args) && !Array.isArray(args) || (0, _devAssert.default)(0, "@".concat(config42.name, " args must be an object with argument names as keys."));
|
|
134054
134095
|
this.args = (0, _objectEntries.default)(args).map(function(_ref) {
|
|
134055
134096
|
var argName = _ref[0], argConfig = _ref[1];
|
|
134056
134097
|
return {
|
|
@@ -134204,23 +134245,23 @@ var require_schema2 = __commonJS3({
|
|
|
134204
134245
|
return schema;
|
|
134205
134246
|
}
|
|
134206
134247
|
var GraphQLSchema2 = /* @__PURE__ */ function() {
|
|
134207
|
-
function GraphQLSchema3(
|
|
134248
|
+
function GraphQLSchema3(config42) {
|
|
134208
134249
|
var _config$directives;
|
|
134209
|
-
this.__validationErrors =
|
|
134210
|
-
(0, _isObjectLike.default)(
|
|
134211
|
-
!
|
|
134212
|
-
!
|
|
134213
|
-
this.description =
|
|
134214
|
-
this.extensions =
|
|
134215
|
-
this.astNode =
|
|
134216
|
-
this.extensionASTNodes =
|
|
134217
|
-
this._queryType =
|
|
134218
|
-
this._mutationType =
|
|
134219
|
-
this._subscriptionType =
|
|
134220
|
-
this._directives = (_config$directives =
|
|
134221
|
-
var allReferencedTypes = new Set(
|
|
134222
|
-
if (
|
|
134223
|
-
for (var _i2 = 0, _config$types2 =
|
|
134250
|
+
this.__validationErrors = config42.assumeValid === true ? [] : void 0;
|
|
134251
|
+
(0, _isObjectLike.default)(config42) || (0, _devAssert.default)(0, "Must provide configuration object.");
|
|
134252
|
+
!config42.types || Array.isArray(config42.types) || (0, _devAssert.default)(0, '"types" must be Array if provided but got: '.concat((0, _inspect.default)(config42.types), "."));
|
|
134253
|
+
!config42.directives || Array.isArray(config42.directives) || (0, _devAssert.default)(0, '"directives" must be Array if provided but got: ' + "".concat((0, _inspect.default)(config42.directives), "."));
|
|
134254
|
+
this.description = config42.description;
|
|
134255
|
+
this.extensions = config42.extensions && (0, _toObjMap.default)(config42.extensions);
|
|
134256
|
+
this.astNode = config42.astNode;
|
|
134257
|
+
this.extensionASTNodes = config42.extensionASTNodes;
|
|
134258
|
+
this._queryType = config42.query;
|
|
134259
|
+
this._mutationType = config42.mutation;
|
|
134260
|
+
this._subscriptionType = config42.subscription;
|
|
134261
|
+
this._directives = (_config$directives = config42.directives) !== null && _config$directives !== void 0 ? _config$directives : _directives.specifiedDirectives;
|
|
134262
|
+
var allReferencedTypes = new Set(config42.types);
|
|
134263
|
+
if (config42.types != null) {
|
|
134264
|
+
for (var _i2 = 0, _config$types2 = config42.types; _i2 < _config$types2.length; _i2++) {
|
|
134224
134265
|
var type = _config$types2[_i2];
|
|
134225
134266
|
allReferencedTypes.delete(type);
|
|
134226
134267
|
collectReferencedTypes(type, allReferencedTypes);
|
|
@@ -140410,9 +140451,9 @@ var require_extendSchema2 = __commonJS3({
|
|
|
140410
140451
|
return typeMap[type.name];
|
|
140411
140452
|
}
|
|
140412
140453
|
function replaceDirective(directive) {
|
|
140413
|
-
var
|
|
140414
|
-
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({},
|
|
140415
|
-
args: (0, _mapValue.default)(
|
|
140454
|
+
var config42 = directive.toConfig();
|
|
140455
|
+
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({}, config42), {}, {
|
|
140456
|
+
args: (0, _mapValue.default)(config42.args, extendArg)
|
|
140416
140457
|
}));
|
|
140417
140458
|
}
|
|
140418
140459
|
function extendNamedType(type) {
|
|
@@ -140441,80 +140482,80 @@ var require_extendSchema2 = __commonJS3({
|
|
|
140441
140482
|
}
|
|
140442
140483
|
function extendInputObjectType(type) {
|
|
140443
140484
|
var _typeExtensionsMap$co;
|
|
140444
|
-
var
|
|
140445
|
-
var extensions = (_typeExtensionsMap$co = typeExtensionsMap[
|
|
140446
|
-
return new _definition.GraphQLInputObjectType(_objectSpread(_objectSpread({},
|
|
140485
|
+
var config42 = type.toConfig();
|
|
140486
|
+
var extensions = (_typeExtensionsMap$co = typeExtensionsMap[config42.name]) !== null && _typeExtensionsMap$co !== void 0 ? _typeExtensionsMap$co : [];
|
|
140487
|
+
return new _definition.GraphQLInputObjectType(_objectSpread(_objectSpread({}, config42), {}, {
|
|
140447
140488
|
fields: function fields() {
|
|
140448
|
-
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(
|
|
140489
|
+
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(config42.fields, function(field) {
|
|
140449
140490
|
return _objectSpread(_objectSpread({}, field), {}, {
|
|
140450
140491
|
type: replaceType(field.type)
|
|
140451
140492
|
});
|
|
140452
140493
|
})), buildInputFieldMap(extensions));
|
|
140453
140494
|
},
|
|
140454
|
-
extensionASTNodes:
|
|
140495
|
+
extensionASTNodes: config42.extensionASTNodes.concat(extensions)
|
|
140455
140496
|
}));
|
|
140456
140497
|
}
|
|
140457
140498
|
function extendEnumType(type) {
|
|
140458
140499
|
var _typeExtensionsMap$ty;
|
|
140459
|
-
var
|
|
140500
|
+
var config42 = type.toConfig();
|
|
140460
140501
|
var extensions = (_typeExtensionsMap$ty = typeExtensionsMap[type.name]) !== null && _typeExtensionsMap$ty !== void 0 ? _typeExtensionsMap$ty : [];
|
|
140461
|
-
return new _definition.GraphQLEnumType(_objectSpread(_objectSpread({},
|
|
140462
|
-
values: _objectSpread(_objectSpread({},
|
|
140463
|
-
extensionASTNodes:
|
|
140502
|
+
return new _definition.GraphQLEnumType(_objectSpread(_objectSpread({}, config42), {}, {
|
|
140503
|
+
values: _objectSpread(_objectSpread({}, config42.values), buildEnumValueMap(extensions)),
|
|
140504
|
+
extensionASTNodes: config42.extensionASTNodes.concat(extensions)
|
|
140464
140505
|
}));
|
|
140465
140506
|
}
|
|
140466
140507
|
function extendScalarType(type) {
|
|
140467
140508
|
var _typeExtensionsMap$co2;
|
|
140468
|
-
var
|
|
140469
|
-
var extensions = (_typeExtensionsMap$co2 = typeExtensionsMap[
|
|
140470
|
-
var specifiedByUrl =
|
|
140509
|
+
var config42 = type.toConfig();
|
|
140510
|
+
var extensions = (_typeExtensionsMap$co2 = typeExtensionsMap[config42.name]) !== null && _typeExtensionsMap$co2 !== void 0 ? _typeExtensionsMap$co2 : [];
|
|
140511
|
+
var specifiedByUrl = config42.specifiedByUrl;
|
|
140471
140512
|
for (var _i8 = 0; _i8 < extensions.length; _i8++) {
|
|
140472
140513
|
var _getSpecifiedByUrl;
|
|
140473
140514
|
var extensionNode = extensions[_i8];
|
|
140474
140515
|
specifiedByUrl = (_getSpecifiedByUrl = getSpecifiedByUrl(extensionNode)) !== null && _getSpecifiedByUrl !== void 0 ? _getSpecifiedByUrl : specifiedByUrl;
|
|
140475
140516
|
}
|
|
140476
|
-
return new _definition.GraphQLScalarType(_objectSpread(_objectSpread({},
|
|
140517
|
+
return new _definition.GraphQLScalarType(_objectSpread(_objectSpread({}, config42), {}, {
|
|
140477
140518
|
specifiedByUrl,
|
|
140478
|
-
extensionASTNodes:
|
|
140519
|
+
extensionASTNodes: config42.extensionASTNodes.concat(extensions)
|
|
140479
140520
|
}));
|
|
140480
140521
|
}
|
|
140481
140522
|
function extendObjectType(type) {
|
|
140482
140523
|
var _typeExtensionsMap$co3;
|
|
140483
|
-
var
|
|
140484
|
-
var extensions = (_typeExtensionsMap$co3 = typeExtensionsMap[
|
|
140485
|
-
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({},
|
|
140524
|
+
var config42 = type.toConfig();
|
|
140525
|
+
var extensions = (_typeExtensionsMap$co3 = typeExtensionsMap[config42.name]) !== null && _typeExtensionsMap$co3 !== void 0 ? _typeExtensionsMap$co3 : [];
|
|
140526
|
+
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({}, config42), {}, {
|
|
140486
140527
|
interfaces: function interfaces() {
|
|
140487
140528
|
return [].concat(type.getInterfaces().map(replaceNamedType), buildInterfaces(extensions));
|
|
140488
140529
|
},
|
|
140489
140530
|
fields: function fields() {
|
|
140490
|
-
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(
|
|
140531
|
+
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(config42.fields, extendField)), buildFieldMap(extensions));
|
|
140491
140532
|
},
|
|
140492
|
-
extensionASTNodes:
|
|
140533
|
+
extensionASTNodes: config42.extensionASTNodes.concat(extensions)
|
|
140493
140534
|
}));
|
|
140494
140535
|
}
|
|
140495
140536
|
function extendInterfaceType(type) {
|
|
140496
140537
|
var _typeExtensionsMap$co4;
|
|
140497
|
-
var
|
|
140498
|
-
var extensions = (_typeExtensionsMap$co4 = typeExtensionsMap[
|
|
140499
|
-
return new _definition.GraphQLInterfaceType(_objectSpread(_objectSpread({},
|
|
140538
|
+
var config42 = type.toConfig();
|
|
140539
|
+
var extensions = (_typeExtensionsMap$co4 = typeExtensionsMap[config42.name]) !== null && _typeExtensionsMap$co4 !== void 0 ? _typeExtensionsMap$co4 : [];
|
|
140540
|
+
return new _definition.GraphQLInterfaceType(_objectSpread(_objectSpread({}, config42), {}, {
|
|
140500
140541
|
interfaces: function interfaces() {
|
|
140501
140542
|
return [].concat(type.getInterfaces().map(replaceNamedType), buildInterfaces(extensions));
|
|
140502
140543
|
},
|
|
140503
140544
|
fields: function fields() {
|
|
140504
|
-
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(
|
|
140545
|
+
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(config42.fields, extendField)), buildFieldMap(extensions));
|
|
140505
140546
|
},
|
|
140506
|
-
extensionASTNodes:
|
|
140547
|
+
extensionASTNodes: config42.extensionASTNodes.concat(extensions)
|
|
140507
140548
|
}));
|
|
140508
140549
|
}
|
|
140509
140550
|
function extendUnionType(type) {
|
|
140510
140551
|
var _typeExtensionsMap$co5;
|
|
140511
|
-
var
|
|
140512
|
-
var extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[
|
|
140513
|
-
return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({},
|
|
140552
|
+
var config42 = type.toConfig();
|
|
140553
|
+
var extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[config42.name]) !== null && _typeExtensionsMap$co5 !== void 0 ? _typeExtensionsMap$co5 : [];
|
|
140554
|
+
return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({}, config42), {}, {
|
|
140514
140555
|
types: function types18() {
|
|
140515
140556
|
return [].concat(type.getTypes().map(replaceNamedType), buildUnionTypes(extensions));
|
|
140516
140557
|
},
|
|
140517
|
-
extensionASTNodes:
|
|
140558
|
+
extensionASTNodes: config42.extensionASTNodes.concat(extensions)
|
|
140518
140559
|
}));
|
|
140519
140560
|
}
|
|
140520
140561
|
function extendField(field) {
|
|
@@ -140829,24 +140870,24 @@ var require_buildASTSchema2 = __commonJS3({
|
|
|
140829
140870
|
extensionASTNodes: [],
|
|
140830
140871
|
assumeValid: false
|
|
140831
140872
|
};
|
|
140832
|
-
var
|
|
140833
|
-
if (
|
|
140834
|
-
for (var _i2 = 0, _config$types2 =
|
|
140873
|
+
var config42 = (0, _extendSchema.extendSchemaImpl)(emptySchemaConfig, documentAST, options);
|
|
140874
|
+
if (config42.astNode == null) {
|
|
140875
|
+
for (var _i2 = 0, _config$types2 = config42.types; _i2 < _config$types2.length; _i2++) {
|
|
140835
140876
|
var type = _config$types2[_i2];
|
|
140836
140877
|
switch (type.name) {
|
|
140837
140878
|
case "Query":
|
|
140838
|
-
|
|
140879
|
+
config42.query = type;
|
|
140839
140880
|
break;
|
|
140840
140881
|
case "Mutation":
|
|
140841
|
-
|
|
140882
|
+
config42.mutation = type;
|
|
140842
140883
|
break;
|
|
140843
140884
|
case "Subscription":
|
|
140844
|
-
|
|
140885
|
+
config42.subscription = type;
|
|
140845
140886
|
break;
|
|
140846
140887
|
}
|
|
140847
140888
|
}
|
|
140848
140889
|
}
|
|
140849
|
-
var directives =
|
|
140890
|
+
var directives = config42.directives;
|
|
140850
140891
|
var _loop = function _loop2(_i42) {
|
|
140851
140892
|
var stdDirective = _directives.specifiedDirectives[_i42];
|
|
140852
140893
|
if (directives.every(function(directive) {
|
|
@@ -140858,7 +140899,7 @@ var require_buildASTSchema2 = __commonJS3({
|
|
|
140858
140899
|
for (var _i4 = 0; _i4 < _directives.specifiedDirectives.length; _i4++) {
|
|
140859
140900
|
_loop(_i4);
|
|
140860
140901
|
}
|
|
140861
|
-
return new _schema.GraphQLSchema(
|
|
140902
|
+
return new _schema.GraphQLSchema(config42);
|
|
140862
140903
|
}
|
|
140863
140904
|
function buildSchema4(source, options) {
|
|
140864
140905
|
var document2 = (0, _parser.parse)(source, {
|
|
@@ -140958,12 +140999,12 @@ var require_lexicographicSortSchema2 = __commonJS3({
|
|
|
140958
140999
|
return maybeType && replaceNamedType(maybeType);
|
|
140959
141000
|
}
|
|
140960
141001
|
function sortDirective(directive) {
|
|
140961
|
-
var
|
|
140962
|
-
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({},
|
|
140963
|
-
locations: sortBy(
|
|
141002
|
+
var config42 = directive.toConfig();
|
|
141003
|
+
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({}, config42), {}, {
|
|
141004
|
+
locations: sortBy(config42.locations, function(x22) {
|
|
140964
141005
|
return x22;
|
|
140965
141006
|
}),
|
|
140966
|
-
args: sortArgs(
|
|
141007
|
+
args: sortArgs(config42.args)
|
|
140967
141008
|
}));
|
|
140968
141009
|
}
|
|
140969
141010
|
function sortArgs(args) {
|
|
@@ -140996,13 +141037,13 @@ var require_lexicographicSortSchema2 = __commonJS3({
|
|
|
140996
141037
|
return type;
|
|
140997
141038
|
}
|
|
140998
141039
|
if ((0, _definition.isObjectType)(type)) {
|
|
140999
|
-
var
|
|
141000
|
-
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({},
|
|
141040
|
+
var config42 = type.toConfig();
|
|
141041
|
+
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({}, config42), {}, {
|
|
141001
141042
|
interfaces: function interfaces() {
|
|
141002
|
-
return sortTypes(
|
|
141043
|
+
return sortTypes(config42.interfaces);
|
|
141003
141044
|
},
|
|
141004
141045
|
fields: function fields() {
|
|
141005
|
-
return sortFields(
|
|
141046
|
+
return sortFields(config42.fields);
|
|
141006
141047
|
}
|
|
141007
141048
|
}));
|
|
141008
141049
|
}
|
|
@@ -181616,13 +181657,13 @@ var require_esprima22 = __commonJS3({
|
|
|
181616
181657
|
return Reader2;
|
|
181617
181658
|
}();
|
|
181618
181659
|
var Tokenizer = function() {
|
|
181619
|
-
function Tokenizer2(code,
|
|
181660
|
+
function Tokenizer2(code, config42) {
|
|
181620
181661
|
this.errorHandler = new error_handler_1.ErrorHandler();
|
|
181621
|
-
this.errorHandler.tolerant =
|
|
181662
|
+
this.errorHandler.tolerant = config42 ? typeof config42.tolerant === "boolean" && config42.tolerant : false;
|
|
181622
181663
|
this.scanner = new scanner_1.Scanner(code, this.errorHandler);
|
|
181623
|
-
this.scanner.trackComment =
|
|
181624
|
-
this.trackRange =
|
|
181625
|
-
this.trackLoc =
|
|
181664
|
+
this.scanner.trackComment = config42 ? typeof config42.comment === "boolean" && config42.comment : false;
|
|
181665
|
+
this.trackRange = config42 ? typeof config42.range === "boolean" && config42.range : false;
|
|
181666
|
+
this.trackLoc = config42 ? typeof config42.loc === "boolean" && config42.loc : false;
|
|
181626
181667
|
this.buffer = [];
|
|
181627
181668
|
this.reader = new Reader();
|
|
181628
181669
|
}
|
|
@@ -183773,11 +183814,11 @@ var require_printer22 = __commonJS3({
|
|
|
183773
183814
|
return this.code;
|
|
183774
183815
|
};
|
|
183775
183816
|
var emptyPrintResult = new PrintResult("");
|
|
183776
|
-
var Printer = function Printer2(
|
|
183817
|
+
var Printer = function Printer2(config42) {
|
|
183777
183818
|
assert_1.default.ok(this instanceof Printer2);
|
|
183778
|
-
var explicitTabWidth =
|
|
183779
|
-
|
|
183780
|
-
|
|
183819
|
+
var explicitTabWidth = config42 && config42.tabWidth;
|
|
183820
|
+
config42 = (0, options_1.normalize)(config42);
|
|
183821
|
+
config42.sourceFileName = null;
|
|
183781
183822
|
function makePrintFunctionWith(options, overrides) {
|
|
183782
183823
|
options = Object.assign({}, options, overrides);
|
|
183783
183824
|
return function(path22) {
|
|
@@ -183792,19 +183833,19 @@ var require_printer22 = __commonJS3({
|
|
|
183792
183833
|
includeComments: false
|
|
183793
183834
|
}));
|
|
183794
183835
|
}
|
|
183795
|
-
var oldTabWidth =
|
|
183836
|
+
var oldTabWidth = config42.tabWidth;
|
|
183796
183837
|
if (!explicitTabWidth) {
|
|
183797
183838
|
var loc = path22.getNode().loc;
|
|
183798
183839
|
if (loc && loc.lines && loc.lines.guessTabWidth) {
|
|
183799
|
-
|
|
183840
|
+
config42.tabWidth = loc.lines.guessTabWidth();
|
|
183800
183841
|
}
|
|
183801
183842
|
}
|
|
183802
183843
|
var reprinter = (0, patcher_1.getReprinter)(path22);
|
|
183803
|
-
var lines = reprinter ? reprinter(print9) : genericPrint(path22,
|
|
183844
|
+
var lines = reprinter ? reprinter(print9) : genericPrint(path22, config42, options, makePrintFunctionWith(options, {
|
|
183804
183845
|
includeComments: true,
|
|
183805
183846
|
avoidRootParens: false
|
|
183806
183847
|
}));
|
|
183807
|
-
|
|
183848
|
+
config42.tabWidth = oldTabWidth;
|
|
183808
183849
|
return lines;
|
|
183809
183850
|
}
|
|
183810
183851
|
this.print = function(ast) {
|
|
@@ -183815,7 +183856,7 @@ var require_printer22 = __commonJS3({
|
|
|
183815
183856
|
includeComments: true,
|
|
183816
183857
|
avoidRootParens: false
|
|
183817
183858
|
});
|
|
183818
|
-
return new PrintResult(lines.toString(
|
|
183859
|
+
return new PrintResult(lines.toString(config42), util2.composeSourceMaps(config42.inputSourceMap, lines.getSourceMap(config42.sourceMapName, config42.sourceRoot)));
|
|
183819
183860
|
};
|
|
183820
183861
|
this.printGenerically = function(ast) {
|
|
183821
183862
|
if (!ast) {
|
|
@@ -183823,26 +183864,26 @@ var require_printer22 = __commonJS3({
|
|
|
183823
183864
|
}
|
|
183824
183865
|
function printGenerically(path3) {
|
|
183825
183866
|
return (0, comments_1.printComments)(path3, function(path4) {
|
|
183826
|
-
return genericPrint(path4,
|
|
183867
|
+
return genericPrint(path4, config42, {
|
|
183827
183868
|
includeComments: true,
|
|
183828
183869
|
avoidRootParens: false
|
|
183829
183870
|
}, printGenerically);
|
|
183830
183871
|
});
|
|
183831
183872
|
}
|
|
183832
183873
|
var path22 = fast_path_1.default.from(ast);
|
|
183833
|
-
var oldReuseWhitespace =
|
|
183834
|
-
|
|
183835
|
-
var pr = new PrintResult(printGenerically(path22).toString(
|
|
183836
|
-
|
|
183874
|
+
var oldReuseWhitespace = config42.reuseWhitespace;
|
|
183875
|
+
config42.reuseWhitespace = false;
|
|
183876
|
+
var pr = new PrintResult(printGenerically(path22).toString(config42));
|
|
183877
|
+
config42.reuseWhitespace = oldReuseWhitespace;
|
|
183837
183878
|
return pr;
|
|
183838
183879
|
};
|
|
183839
183880
|
};
|
|
183840
183881
|
exports.Printer = Printer;
|
|
183841
|
-
function genericPrint(path22,
|
|
183882
|
+
function genericPrint(path22, config42, options, printPath) {
|
|
183842
183883
|
assert_1.default.ok(path22 instanceof fast_path_1.default);
|
|
183843
183884
|
var node2 = path22.getValue();
|
|
183844
183885
|
var parts = [];
|
|
183845
|
-
var linesWithoutParens = genericPrintNoParens(path22,
|
|
183886
|
+
var linesWithoutParens = genericPrintNoParens(path22, config42, printPath);
|
|
183846
183887
|
if (!node2 || linesWithoutParens.isEmpty()) {
|
|
183847
183888
|
return linesWithoutParens;
|
|
183848
183889
|
}
|
|
@@ -186057,7 +186098,7 @@ var require_cjs2 = __commonJS3({
|
|
|
186057
186098
|
}
|
|
186058
186099
|
});
|
|
186059
186100
|
var import_minimatch2 = __toESM3(require_minimatch2(), 1);
|
|
186060
|
-
var
|
|
186101
|
+
var config4 = {
|
|
186061
186102
|
reset: {
|
|
186062
186103
|
node: `\x1B[37m\x1B[0m`,
|
|
186063
186104
|
browser: ""
|
|
@@ -186084,7 +186125,7 @@ var config3 = {
|
|
|
186084
186125
|
}
|
|
186085
186126
|
};
|
|
186086
186127
|
function logMagneta(str) {
|
|
186087
|
-
return `${
|
|
186128
|
+
return `${config4.magneta.node}${str}${config4.reset.node}`;
|
|
186088
186129
|
}
|
|
186089
186130
|
var Log = class {
|
|
186090
186131
|
constructor(toolName, options) {
|
|
@@ -186126,16 +186167,16 @@ var Log = class {
|
|
|
186126
186167
|
if (browser) {
|
|
186127
186168
|
let replacedStr = str;
|
|
186128
186169
|
const posToReplace = [];
|
|
186129
|
-
for (const key in
|
|
186130
|
-
const indexes = this.getAllIndexOf(str,
|
|
186170
|
+
for (const key in config4) {
|
|
186171
|
+
const indexes = this.getAllIndexOf(str, config4[key].node);
|
|
186131
186172
|
indexes.forEach((index) => {
|
|
186132
186173
|
posToReplace.push({ index, key });
|
|
186133
186174
|
});
|
|
186134
|
-
replacedStr = replacedStr.replaceAll(
|
|
186175
|
+
replacedStr = replacedStr.replaceAll(config4[key].node, "%c");
|
|
186135
186176
|
}
|
|
186136
186177
|
const colors = [];
|
|
186137
186178
|
posToReplace.sort((a, b) => a.index - b.index).forEach((c2) => {
|
|
186138
|
-
colors.push(
|
|
186179
|
+
colors.push(config4[c2.key].browser);
|
|
186139
186180
|
});
|
|
186140
186181
|
return [replacedStr, ...colors];
|
|
186141
186182
|
}
|
|
@@ -186593,7 +186634,7 @@ async function marshalSelection2({
|
|
|
186593
186634
|
selection,
|
|
186594
186635
|
data: data2
|
|
186595
186636
|
}) {
|
|
186596
|
-
const
|
|
186637
|
+
const config42 = getCurrentConfig2();
|
|
186597
186638
|
if (data2 === null || typeof data2 === "undefined") {
|
|
186598
186639
|
return data2;
|
|
186599
186640
|
}
|
|
@@ -186611,8 +186652,8 @@ async function marshalSelection2({
|
|
|
186611
186652
|
if (selection2) {
|
|
186612
186653
|
return [fieldName, await marshalSelection2({ selection: selection2, data: value2 })];
|
|
186613
186654
|
}
|
|
186614
|
-
if (
|
|
186615
|
-
const marshalFn =
|
|
186655
|
+
if (config42.scalars?.[type]) {
|
|
186656
|
+
const marshalFn = config42.scalars[type].marshal;
|
|
186616
186657
|
if (!marshalFn) {
|
|
186617
186658
|
throw new Error(
|
|
186618
186659
|
`scalar type ${type} is missing a \`marshal\` function. see https://github.com/AlecAivazis/houdini#%EF%B8%8Fcustom-scalars`
|
|
@@ -188772,7 +188813,7 @@ var InMemorySubscriptions2 = class {
|
|
|
188772
188813
|
};
|
|
188773
188814
|
var Cache2 = class {
|
|
188774
188815
|
_internal_unstable;
|
|
188775
|
-
constructor({ disabled, ...
|
|
188816
|
+
constructor({ disabled, ...config42 } = {}) {
|
|
188776
188817
|
this._internal_unstable = new CacheInternal2({
|
|
188777
188818
|
cache: this,
|
|
188778
188819
|
storage: new InMemoryStorage2(),
|
|
@@ -188782,8 +188823,8 @@ var Cache2 = class {
|
|
|
188782
188823
|
staleManager: new StaleManager2(this),
|
|
188783
188824
|
disabled: disabled ?? typeof globalThis.window === "undefined"
|
|
188784
188825
|
});
|
|
188785
|
-
if (Object.keys(
|
|
188786
|
-
this.setConfig(defaultConfigValues2(
|
|
188826
|
+
if (Object.keys(config42).length > 0) {
|
|
188827
|
+
this.setConfig(defaultConfigValues2(config42));
|
|
188787
188828
|
}
|
|
188788
188829
|
}
|
|
188789
188830
|
write({
|
|
@@ -188837,8 +188878,8 @@ var Cache2 = class {
|
|
|
188837
188878
|
this._internal_unstable.lists.removeIDFromAllLists(id2, layer);
|
|
188838
188879
|
this._internal_unstable.storage.delete(id2, layer);
|
|
188839
188880
|
}
|
|
188840
|
-
setConfig(
|
|
188841
|
-
this._internal_unstable.setConfig(
|
|
188881
|
+
setConfig(config42) {
|
|
188882
|
+
this._internal_unstable.setConfig(config42);
|
|
188842
188883
|
}
|
|
188843
188884
|
markTypeStale(options) {
|
|
188844
188885
|
if (!options) {
|
|
@@ -188963,7 +189004,7 @@ var CacheInternal2 = class {
|
|
|
188963
189004
|
lifetimes,
|
|
188964
189005
|
staleManager,
|
|
188965
189006
|
disabled,
|
|
188966
|
-
config:
|
|
189007
|
+
config: config42
|
|
188967
189008
|
}) {
|
|
188968
189009
|
this.storage = storage;
|
|
188969
189010
|
this.subscriptions = subscriptions;
|
|
@@ -188971,7 +189012,7 @@ var CacheInternal2 = class {
|
|
|
188971
189012
|
this.cache = cache;
|
|
188972
189013
|
this.lifetimes = lifetimes;
|
|
188973
189014
|
this.staleManager = staleManager;
|
|
188974
|
-
this._config =
|
|
189015
|
+
this._config = config42;
|
|
188975
189016
|
this._disabled = disabled;
|
|
188976
189017
|
try {
|
|
188977
189018
|
if (process.env.HOUDINI_TEST === "true") {
|
|
@@ -188983,8 +189024,8 @@ var CacheInternal2 = class {
|
|
|
188983
189024
|
get config() {
|
|
188984
189025
|
return this._config ?? getCurrentConfig2();
|
|
188985
189026
|
}
|
|
188986
|
-
setConfig(
|
|
188987
|
-
this._config =
|
|
189027
|
+
setConfig(config42) {
|
|
189028
|
+
this._config = config42;
|
|
188988
189029
|
}
|
|
188989
189030
|
writeSelection({
|
|
188990
189031
|
data: data2,
|
|
@@ -190031,7 +190072,7 @@ function find_exported_fn(body, name) {
|
|
|
190031
190072
|
var recast15 = __toESM3(require_main22(), 1);
|
|
190032
190073
|
var AST15 = recast15.types.builders;
|
|
190033
190074
|
function ensure_imports({
|
|
190034
|
-
config:
|
|
190075
|
+
config: config42,
|
|
190035
190076
|
script,
|
|
190036
190077
|
import: importID,
|
|
190037
190078
|
sourceModule,
|
|
@@ -190080,15 +190121,15 @@ function ensure_imports({
|
|
|
190080
190121
|
};
|
|
190081
190122
|
}
|
|
190082
190123
|
function artifact_import({
|
|
190083
|
-
config:
|
|
190124
|
+
config: config42,
|
|
190084
190125
|
script,
|
|
190085
190126
|
artifact,
|
|
190086
190127
|
local
|
|
190087
190128
|
}) {
|
|
190088
190129
|
const { ids, added } = ensure_imports({
|
|
190089
|
-
config:
|
|
190130
|
+
config: config42,
|
|
190090
190131
|
script,
|
|
190091
|
-
sourceModule:
|
|
190132
|
+
sourceModule: config42.artifactImportPath(artifact.name),
|
|
190092
190133
|
import: local || `_${artifact.name}Artifact`
|
|
190093
190134
|
});
|
|
190094
190135
|
return { id: ids, added };
|
|
@@ -190111,7 +190152,7 @@ var houdini_afterLoad_fn = "_houdini_afterLoad";
|
|
|
190111
190152
|
var houdini_on_error_fn = "_houdini_onError";
|
|
190112
190153
|
|
|
190113
190154
|
// src/plugin/extractLoadFunction.ts
|
|
190114
|
-
async function extract_load_function(
|
|
190155
|
+
async function extract_load_function(config5, filepath, mockArtifacts) {
|
|
190115
190156
|
const nil = {
|
|
190116
190157
|
houdini_load: [],
|
|
190117
190158
|
exports: []
|
|
@@ -190131,7 +190172,7 @@ async function extract_load_function(config4, filepath, mockArtifacts) {
|
|
|
190131
190172
|
if (!parsed) {
|
|
190132
190173
|
return nil;
|
|
190133
190174
|
}
|
|
190134
|
-
const { exports, load } = await processScript(
|
|
190175
|
+
const { exports, load } = await processScript(config5, filepath, parsed, mockArtifacts);
|
|
190135
190176
|
return {
|
|
190136
190177
|
exports,
|
|
190137
190178
|
houdini_load: load.map(
|
|
@@ -190139,7 +190180,7 @@ async function extract_load_function(config4, filepath, mockArtifacts) {
|
|
|
190139
190180
|
)
|
|
190140
190181
|
};
|
|
190141
190182
|
}
|
|
190142
|
-
async function processScript(
|
|
190183
|
+
async function processScript(config5, filepath, program, mockArtifacts) {
|
|
190143
190184
|
const exports = [];
|
|
190144
190185
|
const globalImports = {};
|
|
190145
190186
|
let houdiniLoad = null;
|
|
@@ -190152,13 +190193,13 @@ async function processScript(config4, filepath, program, mockArtifacts) {
|
|
|
190152
190193
|
for (const specifier of statement.specifiers ?? []) {
|
|
190153
190194
|
let name = specifier.local?.name || "";
|
|
190154
190195
|
let query3 = "";
|
|
190155
|
-
if (name.endsWith(store_suffix(
|
|
190156
|
-
query3 = name.substring(0, name.length - store_suffix(
|
|
190196
|
+
if (name.endsWith(store_suffix(config5))) {
|
|
190197
|
+
query3 = name.substring(0, name.length - store_suffix(config5).length);
|
|
190157
190198
|
} else if (source.startsWith("$houdini/" + stores_directory_name()) && specifier.type === "ImportDefaultSpecifier") {
|
|
190158
190199
|
query3 = source.substring(`$houdini/${stores_directory_name()}`.length - 1);
|
|
190159
190200
|
}
|
|
190160
190201
|
if (query3) {
|
|
190161
|
-
const artifact = mockArtifacts?.[query3] || (await import(path_exports.importPath(path_exports.join(
|
|
190202
|
+
const artifact = mockArtifacts?.[query3] || (await import(path_exports.importPath(path_exports.join(config5.artifactDirectory, query3 + ".js")))).default;
|
|
190162
190203
|
globalImports[name] = artifact.raw;
|
|
190163
190204
|
}
|
|
190164
190205
|
}
|
|
@@ -190225,7 +190266,7 @@ filepath: ${filepath}`
|
|
|
190225
190266
|
}
|
|
190226
190267
|
load.push(documentString);
|
|
190227
190268
|
} else if (element.type === "NewExpression") {
|
|
190228
|
-
const suffix = store_suffix(
|
|
190269
|
+
const suffix = store_suffix(config5);
|
|
190229
190270
|
if (element && element.callee.type === "Identifier" && element.callee.name.endsWith(suffix)) {
|
|
190230
190271
|
load.push(globalImports[element.callee.name]);
|
|
190231
190272
|
} else {
|
|
@@ -190278,17 +190319,17 @@ function identifyQueryReference(imports, statement) {
|
|
|
190278
190319
|
}
|
|
190279
190320
|
|
|
190280
190321
|
// src/plugin/kit.ts
|
|
190281
|
-
function is_route(
|
|
190322
|
+
function is_route(config5, framework, filepath) {
|
|
190282
190323
|
if (framework === "svelte") {
|
|
190283
190324
|
return false;
|
|
190284
190325
|
}
|
|
190285
|
-
if (!filepath.startsWith(
|
|
190326
|
+
if (!filepath.startsWith(config5.routesDir) && !filepath.startsWith(path_exports.join(config5.projectRoot, config5.routesDir))) {
|
|
190286
190327
|
return false;
|
|
190287
190328
|
}
|
|
190288
190329
|
return ["+layout.svelte", "+page.svelte"].includes(path_exports.parse(filepath).base);
|
|
190289
190330
|
}
|
|
190290
|
-
function route_data_path(
|
|
190291
|
-
return resolve_relative(
|
|
190331
|
+
function route_data_path(config5, filename) {
|
|
190332
|
+
return resolve_relative(config5, filename).replace(".svelte", ".js");
|
|
190292
190333
|
}
|
|
190293
190334
|
function is_route_script(framework, filename) {
|
|
190294
190335
|
return is_page_script(framework, filename) || is_layout_script(framework, filename);
|
|
@@ -190299,14 +190340,14 @@ function is_page_script(framework, filename) {
|
|
|
190299
190340
|
function is_layout_script(framework, filename) {
|
|
190300
190341
|
return framework === "kit" && (filename.endsWith("+layout.js") || filename.endsWith("+layout.ts"));
|
|
190301
190342
|
}
|
|
190302
|
-
function is_root_layout(
|
|
190303
|
-
return resolve_relative(
|
|
190343
|
+
function is_root_layout(config5, filename) {
|
|
190344
|
+
return resolve_relative(config5, filename).replace(config5.projectRoot, "") === path_exports.sep + path_exports.join("src", "routes", "+layout.svelte");
|
|
190304
190345
|
}
|
|
190305
|
-
function is_root_layout_server(
|
|
190306
|
-
return resolve_relative(
|
|
190346
|
+
function is_root_layout_server(config5, filename) {
|
|
190347
|
+
return resolve_relative(config5, filename).replace(config5.projectRoot, "").replace(".ts", ".js") === path_exports.sep + path_exports.join("src", "routes", "+layout.server.js");
|
|
190307
190348
|
}
|
|
190308
|
-
function is_root_layout_script(
|
|
190309
|
-
return resolve_relative(
|
|
190349
|
+
function is_root_layout_script(config5, filename) {
|
|
190350
|
+
return resolve_relative(config5, filename).replace(config5.projectRoot, "").replace(".ts", ".js") === path_exports.sep + path_exports.join("src", "routes", "+layout.js");
|
|
190310
190351
|
}
|
|
190311
190352
|
function is_layout_component(framework, filename) {
|
|
190312
190353
|
return framework === "kit" && filename.endsWith("+layout.svelte");
|
|
@@ -190314,45 +190355,45 @@ function is_layout_component(framework, filename) {
|
|
|
190314
190355
|
function is_layout(framework, filename) {
|
|
190315
190356
|
return is_layout_script(framework, filename) || is_layout_component(framework, filename);
|
|
190316
190357
|
}
|
|
190317
|
-
function is_component(
|
|
190318
|
-
return framework === "svelte" || filename.endsWith(".svelte") && !is_route_script(framework, filename) && !is_route(
|
|
190358
|
+
function is_component(config5, framework, filename) {
|
|
190359
|
+
return framework === "svelte" || filename.endsWith(".svelte") && !is_route_script(framework, filename) && !is_route(config5, framework, filename);
|
|
190319
190360
|
}
|
|
190320
|
-
function page_query_path(
|
|
190361
|
+
function page_query_path(config5, filename) {
|
|
190321
190362
|
return path_exports.join(
|
|
190322
|
-
path_exports.dirname(resolve_relative(
|
|
190323
|
-
plugin_config(
|
|
190363
|
+
path_exports.dirname(resolve_relative(config5, filename)),
|
|
190364
|
+
plugin_config(config5).pageQueryFilename
|
|
190324
190365
|
);
|
|
190325
190366
|
}
|
|
190326
|
-
function layout_query_path(
|
|
190367
|
+
function layout_query_path(config5, filename) {
|
|
190327
190368
|
return path_exports.join(
|
|
190328
|
-
path_exports.dirname(resolve_relative(
|
|
190329
|
-
plugin_config(
|
|
190369
|
+
path_exports.dirname(resolve_relative(config5, filename)),
|
|
190370
|
+
plugin_config(config5).layoutQueryFilename
|
|
190330
190371
|
);
|
|
190331
190372
|
}
|
|
190332
|
-
function resolve_relative(
|
|
190373
|
+
function resolve_relative(config5, filename) {
|
|
190333
190374
|
const match = filename.match("^((../)+)src/routes");
|
|
190334
190375
|
if (match) {
|
|
190335
|
-
filename = path_exports.join(
|
|
190376
|
+
filename = path_exports.join(config5.projectRoot, filename.substring(match[1].length));
|
|
190336
190377
|
}
|
|
190337
190378
|
return filename;
|
|
190338
190379
|
}
|
|
190339
|
-
function route_page_path(
|
|
190340
|
-
return resolve_relative(
|
|
190380
|
+
function route_page_path(config5, filename) {
|
|
190381
|
+
return resolve_relative(config5, filename).replace(".js", ".svelte").replace(".ts", ".svelte");
|
|
190341
190382
|
}
|
|
190342
190383
|
function stores_directory_name() {
|
|
190343
190384
|
return "stores";
|
|
190344
190385
|
}
|
|
190345
|
-
function store_import_path({ config:
|
|
190386
|
+
function store_import_path({ config: config5, name }) {
|
|
190346
190387
|
return `$houdini/plugins/houdini-svelte/${stores_directory_name()}/${name}`;
|
|
190347
190388
|
}
|
|
190348
|
-
function store_suffix(
|
|
190389
|
+
function store_suffix(config5) {
|
|
190349
190390
|
return "Store";
|
|
190350
190391
|
}
|
|
190351
|
-
function store_name({ config:
|
|
190352
|
-
return name + store_suffix(
|
|
190392
|
+
function store_name({ config: config5, name }) {
|
|
190393
|
+
return name + store_suffix(config5);
|
|
190353
190394
|
}
|
|
190354
|
-
function plugin_config(
|
|
190355
|
-
const cfg =
|
|
190395
|
+
function plugin_config(config5) {
|
|
190396
|
+
const cfg = config5.pluginConfig("houdini-svelte");
|
|
190356
190397
|
return {
|
|
190357
190398
|
client: "./src/client",
|
|
190358
190399
|
defaultRouteBlocking: false,
|
|
@@ -190394,8 +190435,8 @@ function store_import({
|
|
|
190394
190435
|
|
|
190395
190436
|
// src/plugin/transforms/componentQuery.ts
|
|
190396
190437
|
var AST16 = recast16.types.builders;
|
|
190397
|
-
async function QueryProcessor(
|
|
190398
|
-
if (!is_component(
|
|
190438
|
+
async function QueryProcessor(config5, page2) {
|
|
190439
|
+
if (!is_component(config5, page2.framework, page2.filepath)) {
|
|
190399
190440
|
return;
|
|
190400
190441
|
}
|
|
190401
190442
|
const store_id = (name) => {
|
|
@@ -190444,7 +190485,7 @@ async function QueryProcessor(config4, page2) {
|
|
|
190444
190485
|
script: page2.script,
|
|
190445
190486
|
config: page2.config,
|
|
190446
190487
|
import: [`${query3.name.value}Store`],
|
|
190447
|
-
sourceModule: store_import_path({ config:
|
|
190488
|
+
sourceModule: store_import_path({ config: config5, name: query3.name.value })
|
|
190448
190489
|
}).ids[0];
|
|
190449
190490
|
page2.script.body.splice(
|
|
190450
190491
|
find_insert_index(page2.script),
|
|
@@ -191265,7 +191306,7 @@ function modify_load(page2, cb) {
|
|
|
191265
191306
|
}
|
|
191266
191307
|
|
|
191267
191308
|
// src/plugin/transforms/kit/index.ts
|
|
191268
|
-
async function SvelteKitProcessor(
|
|
191309
|
+
async function SvelteKitProcessor(config5, page2) {
|
|
191269
191310
|
if (page2.framework !== "kit") {
|
|
191270
191311
|
return;
|
|
191271
191312
|
}
|
|
@@ -191276,12 +191317,12 @@ async function SvelteKitProcessor(config4, page2) {
|
|
|
191276
191317
|
// src/plugin/transforms/tags.ts
|
|
191277
191318
|
var recast20 = __toESM(require_main4(), 1);
|
|
191278
191319
|
var AST20 = recast20.types.builders;
|
|
191279
|
-
async function GraphQLTagProcessor(
|
|
191280
|
-
await find_graphql(
|
|
191320
|
+
async function GraphQLTagProcessor(config5, page2) {
|
|
191321
|
+
await find_graphql(config5, page2.script, {
|
|
191281
191322
|
dependency: page2.watch_file,
|
|
191282
191323
|
tag(tag2) {
|
|
191283
191324
|
const { node: node2, parsedDocument } = tag2;
|
|
191284
|
-
const operation =
|
|
191325
|
+
const operation = config5.extractDefinition(parsedDocument);
|
|
191285
191326
|
const { id: id2 } = store_import({ page: page2, artifact: { name: operation.name.value } });
|
|
191286
191327
|
node2.replaceWith(AST20.newExpression(id2, []));
|
|
191287
191328
|
}
|
|
@@ -191340,10 +191381,10 @@ var replace_between = (origin, startIndex, endIndex, insertion) => origin.substr
|
|
|
191340
191381
|
function houdiniPreprocessor(extraConfig) {
|
|
191341
191382
|
return {
|
|
191342
191383
|
async markup({ content, filename }) {
|
|
191343
|
-
const
|
|
191384
|
+
const config5 = await getConfig(extraConfig);
|
|
191344
191385
|
const page2 = {
|
|
191345
191386
|
content,
|
|
191346
|
-
config:
|
|
191387
|
+
config: config5,
|
|
191347
191388
|
filepath: filename,
|
|
191348
191389
|
watch_file: () => {
|
|
191349
191390
|
}
|