houdini-react 1.2.8 → 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-cjs/index.js +204 -200
- package/build/plugin-esm/index.js +204 -200
- package/build/server-cjs/index.js +204 -200
- package/build/server-esm/index.js +204 -200
- package/package.json +2 -2
|
@@ -50546,25 +50546,25 @@ var require_definition = __commonJS2({
|
|
|
50546
50546
|
return arr && arr.length > 0 ? arr : void 0;
|
|
50547
50547
|
}
|
|
50548
50548
|
var GraphQLScalarType4 = /* @__PURE__ */ function() {
|
|
50549
|
-
function GraphQLScalarType5(
|
|
50549
|
+
function GraphQLScalarType5(config2) {
|
|
50550
50550
|
var _config$parseValue, _config$serialize, _config$parseLiteral;
|
|
50551
|
-
var parseValue = (_config$parseValue =
|
|
50552
|
-
this.name =
|
|
50553
|
-
this.description =
|
|
50554
|
-
this.specifiedByUrl =
|
|
50555
|
-
this.serialize = (_config$serialize =
|
|
50551
|
+
var parseValue = (_config$parseValue = config2.parseValue) !== null && _config$parseValue !== void 0 ? _config$parseValue : _identityFunc.default;
|
|
50552
|
+
this.name = config2.name;
|
|
50553
|
+
this.description = config2.description;
|
|
50554
|
+
this.specifiedByUrl = config2.specifiedByUrl;
|
|
50555
|
+
this.serialize = (_config$serialize = config2.serialize) !== null && _config$serialize !== void 0 ? _config$serialize : _identityFunc.default;
|
|
50556
50556
|
this.parseValue = parseValue;
|
|
50557
|
-
this.parseLiteral = (_config$parseLiteral =
|
|
50557
|
+
this.parseLiteral = (_config$parseLiteral = config2.parseLiteral) !== null && _config$parseLiteral !== void 0 ? _config$parseLiteral : function(node, variables) {
|
|
50558
50558
|
return parseValue((0, _valueFromASTUntyped.valueFromASTUntyped)(node, variables));
|
|
50559
50559
|
};
|
|
50560
|
-
this.extensions =
|
|
50561
|
-
this.astNode =
|
|
50562
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
50563
|
-
typeof
|
|
50564
|
-
|
|
50565
|
-
|
|
50566
|
-
if (
|
|
50567
|
-
typeof
|
|
50560
|
+
this.extensions = config2.extensions && (0, _toObjMap.default)(config2.extensions);
|
|
50561
|
+
this.astNode = config2.astNode;
|
|
50562
|
+
this.extensionASTNodes = undefineIfEmpty(config2.extensionASTNodes);
|
|
50563
|
+
typeof config2.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
50564
|
+
config2.specifiedByUrl == null || typeof config2.specifiedByUrl === "string" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide "specifiedByUrl" as a string, ') + "but got: ".concat((0, _inspect.default)(config2.specifiedByUrl), "."));
|
|
50565
|
+
config2.serialize == null || typeof config2.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.'));
|
|
50566
|
+
if (config2.parseLiteral) {
|
|
50567
|
+
typeof config2.parseValue === "function" && typeof config2.parseLiteral === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide both "parseValue" and "parseLiteral" functions.'));
|
|
50568
50568
|
}
|
|
50569
50569
|
}
|
|
50570
50570
|
var _proto = GraphQLScalarType5.prototype;
|
|
@@ -50599,17 +50599,17 @@ var require_definition = __commonJS2({
|
|
|
50599
50599
|
exports.GraphQLScalarType = GraphQLScalarType4;
|
|
50600
50600
|
(0, _defineInspect.default)(GraphQLScalarType4);
|
|
50601
50601
|
var GraphQLObjectType5 = /* @__PURE__ */ function() {
|
|
50602
|
-
function GraphQLObjectType6(
|
|
50603
|
-
this.name =
|
|
50604
|
-
this.description =
|
|
50605
|
-
this.isTypeOf =
|
|
50606
|
-
this.extensions =
|
|
50607
|
-
this.astNode =
|
|
50608
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
50609
|
-
this._fields = defineFieldMap.bind(void 0,
|
|
50610
|
-
this._interfaces = defineInterfaces.bind(void 0,
|
|
50611
|
-
typeof
|
|
50612
|
-
|
|
50602
|
+
function GraphQLObjectType6(config2) {
|
|
50603
|
+
this.name = config2.name;
|
|
50604
|
+
this.description = config2.description;
|
|
50605
|
+
this.isTypeOf = config2.isTypeOf;
|
|
50606
|
+
this.extensions = config2.extensions && (0, _toObjMap.default)(config2.extensions);
|
|
50607
|
+
this.astNode = config2.astNode;
|
|
50608
|
+
this.extensionASTNodes = undefineIfEmpty(config2.extensionASTNodes);
|
|
50609
|
+
this._fields = defineFieldMap.bind(void 0, config2);
|
|
50610
|
+
this._interfaces = defineInterfaces.bind(void 0, config2);
|
|
50611
|
+
typeof config2.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
50612
|
+
config2.isTypeOf == null || typeof config2.isTypeOf === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide "isTypeOf" as a function, ') + "but got: ".concat((0, _inspect.default)(config2.isTypeOf), "."));
|
|
50613
50613
|
}
|
|
50614
50614
|
var _proto2 = GraphQLObjectType6.prototype;
|
|
50615
50615
|
_proto2.getFields = function getFields() {
|
|
@@ -50652,22 +50652,22 @@ var require_definition = __commonJS2({
|
|
|
50652
50652
|
}();
|
|
50653
50653
|
exports.GraphQLObjectType = GraphQLObjectType5;
|
|
50654
50654
|
(0, _defineInspect.default)(GraphQLObjectType5);
|
|
50655
|
-
function defineInterfaces(
|
|
50655
|
+
function defineInterfaces(config2) {
|
|
50656
50656
|
var _resolveThunk;
|
|
50657
|
-
var interfaces = (_resolveThunk = resolveThunk(
|
|
50658
|
-
Array.isArray(interfaces) || (0, _devAssert.default)(0, "".concat(
|
|
50657
|
+
var interfaces = (_resolveThunk = resolveThunk(config2.interfaces)) !== null && _resolveThunk !== void 0 ? _resolveThunk : [];
|
|
50658
|
+
Array.isArray(interfaces) || (0, _devAssert.default)(0, "".concat(config2.name, " interfaces must be an Array or a function which returns an Array."));
|
|
50659
50659
|
return interfaces;
|
|
50660
50660
|
}
|
|
50661
|
-
function defineFieldMap(
|
|
50662
|
-
var fieldMap = resolveThunk(
|
|
50663
|
-
isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(
|
|
50661
|
+
function defineFieldMap(config2) {
|
|
50662
|
+
var fieldMap = resolveThunk(config2.fields);
|
|
50663
|
+
isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(config2.name, " fields must be an object with field names as keys or a function which returns such an object."));
|
|
50664
50664
|
return (0, _mapValue.default)(fieldMap, function(fieldConfig, fieldName) {
|
|
50665
50665
|
var _fieldConfig$args;
|
|
50666
|
-
isPlainObj(fieldConfig) || (0, _devAssert.default)(0, "".concat(
|
|
50667
|
-
!("isDeprecated" in fieldConfig) || (0, _devAssert.default)(0, "".concat(
|
|
50668
|
-
fieldConfig.resolve == null || typeof fieldConfig.resolve === "function" || (0, _devAssert.default)(0, "".concat(
|
|
50666
|
+
isPlainObj(fieldConfig) || (0, _devAssert.default)(0, "".concat(config2.name, ".").concat(fieldName, " field config must be an object."));
|
|
50667
|
+
!("isDeprecated" in fieldConfig) || (0, _devAssert.default)(0, "".concat(config2.name, ".").concat(fieldName, ' should provide "deprecationReason" instead of "isDeprecated".'));
|
|
50668
|
+
fieldConfig.resolve == null || typeof fieldConfig.resolve === "function" || (0, _devAssert.default)(0, "".concat(config2.name, ".").concat(fieldName, " field resolver must be a function if ") + "provided, but got: ".concat((0, _inspect.default)(fieldConfig.resolve), "."));
|
|
50669
50669
|
var argsConfig = (_fieldConfig$args = fieldConfig.args) !== null && _fieldConfig$args !== void 0 ? _fieldConfig$args : {};
|
|
50670
|
-
isPlainObj(argsConfig) || (0, _devAssert.default)(0, "".concat(
|
|
50670
|
+
isPlainObj(argsConfig) || (0, _devAssert.default)(0, "".concat(config2.name, ".").concat(fieldName, " args must be an object with argument names as keys."));
|
|
50671
50671
|
var args = (0, _objectEntries.default)(argsConfig).map(function(_ref) {
|
|
50672
50672
|
var argName = _ref[0], argConfig = _ref[1];
|
|
50673
50673
|
return {
|
|
@@ -50729,17 +50729,17 @@ var require_definition = __commonJS2({
|
|
|
50729
50729
|
return isNonNullType6(arg.type) && arg.defaultValue === void 0;
|
|
50730
50730
|
}
|
|
50731
50731
|
var GraphQLInterfaceType5 = /* @__PURE__ */ function() {
|
|
50732
|
-
function GraphQLInterfaceType6(
|
|
50733
|
-
this.name =
|
|
50734
|
-
this.description =
|
|
50735
|
-
this.resolveType =
|
|
50736
|
-
this.extensions =
|
|
50737
|
-
this.astNode =
|
|
50738
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
50739
|
-
this._fields = defineFieldMap.bind(void 0,
|
|
50740
|
-
this._interfaces = defineInterfaces.bind(void 0,
|
|
50741
|
-
typeof
|
|
50742
|
-
|
|
50732
|
+
function GraphQLInterfaceType6(config2) {
|
|
50733
|
+
this.name = config2.name;
|
|
50734
|
+
this.description = config2.description;
|
|
50735
|
+
this.resolveType = config2.resolveType;
|
|
50736
|
+
this.extensions = config2.extensions && (0, _toObjMap.default)(config2.extensions);
|
|
50737
|
+
this.astNode = config2.astNode;
|
|
50738
|
+
this.extensionASTNodes = undefineIfEmpty(config2.extensionASTNodes);
|
|
50739
|
+
this._fields = defineFieldMap.bind(void 0, config2);
|
|
50740
|
+
this._interfaces = defineInterfaces.bind(void 0, config2);
|
|
50741
|
+
typeof config2.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
50742
|
+
config2.resolveType == null || typeof config2.resolveType === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide "resolveType" as a function, ') + "but got: ".concat((0, _inspect.default)(config2.resolveType), "."));
|
|
50743
50743
|
}
|
|
50744
50744
|
var _proto3 = GraphQLInterfaceType6.prototype;
|
|
50745
50745
|
_proto3.getFields = function getFields() {
|
|
@@ -50784,16 +50784,16 @@ var require_definition = __commonJS2({
|
|
|
50784
50784
|
exports.GraphQLInterfaceType = GraphQLInterfaceType5;
|
|
50785
50785
|
(0, _defineInspect.default)(GraphQLInterfaceType5);
|
|
50786
50786
|
var GraphQLUnionType3 = /* @__PURE__ */ function() {
|
|
50787
|
-
function GraphQLUnionType4(
|
|
50788
|
-
this.name =
|
|
50789
|
-
this.description =
|
|
50790
|
-
this.resolveType =
|
|
50791
|
-
this.extensions =
|
|
50792
|
-
this.astNode =
|
|
50793
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
50794
|
-
this._types = defineTypes.bind(void 0,
|
|
50795
|
-
typeof
|
|
50796
|
-
|
|
50787
|
+
function GraphQLUnionType4(config2) {
|
|
50788
|
+
this.name = config2.name;
|
|
50789
|
+
this.description = config2.description;
|
|
50790
|
+
this.resolveType = config2.resolveType;
|
|
50791
|
+
this.extensions = config2.extensions && (0, _toObjMap.default)(config2.extensions);
|
|
50792
|
+
this.astNode = config2.astNode;
|
|
50793
|
+
this.extensionASTNodes = undefineIfEmpty(config2.extensionASTNodes);
|
|
50794
|
+
this._types = defineTypes.bind(void 0, config2);
|
|
50795
|
+
typeof config2.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
50796
|
+
config2.resolveType == null || typeof config2.resolveType === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide "resolveType" as a function, ') + "but got: ".concat((0, _inspect.default)(config2.resolveType), "."));
|
|
50797
50797
|
}
|
|
50798
50798
|
var _proto4 = GraphQLUnionType4.prototype;
|
|
50799
50799
|
_proto4.getTypes = function getTypes() {
|
|
@@ -50830,26 +50830,26 @@ var require_definition = __commonJS2({
|
|
|
50830
50830
|
}();
|
|
50831
50831
|
exports.GraphQLUnionType = GraphQLUnionType3;
|
|
50832
50832
|
(0, _defineInspect.default)(GraphQLUnionType3);
|
|
50833
|
-
function defineTypes(
|
|
50834
|
-
var types4 = resolveThunk(
|
|
50835
|
-
Array.isArray(types4) || (0, _devAssert.default)(0, "Must provide Array of types or a function which returns such an array for Union ".concat(
|
|
50833
|
+
function defineTypes(config2) {
|
|
50834
|
+
var types4 = resolveThunk(config2.types);
|
|
50835
|
+
Array.isArray(types4) || (0, _devAssert.default)(0, "Must provide Array of types or a function which returns such an array for Union ".concat(config2.name, "."));
|
|
50836
50836
|
return types4;
|
|
50837
50837
|
}
|
|
50838
50838
|
var GraphQLEnumType4 = /* @__PURE__ */ function() {
|
|
50839
|
-
function GraphQLEnumType5(
|
|
50840
|
-
this.name =
|
|
50841
|
-
this.description =
|
|
50842
|
-
this.extensions =
|
|
50843
|
-
this.astNode =
|
|
50844
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
50845
|
-
this._values = defineEnumValues(this.name,
|
|
50839
|
+
function GraphQLEnumType5(config2) {
|
|
50840
|
+
this.name = config2.name;
|
|
50841
|
+
this.description = config2.description;
|
|
50842
|
+
this.extensions = config2.extensions && (0, _toObjMap.default)(config2.extensions);
|
|
50843
|
+
this.astNode = config2.astNode;
|
|
50844
|
+
this.extensionASTNodes = undefineIfEmpty(config2.extensionASTNodes);
|
|
50845
|
+
this._values = defineEnumValues(this.name, config2.values);
|
|
50846
50846
|
this._valueLookup = new Map(this._values.map(function(enumValue) {
|
|
50847
50847
|
return [enumValue.value, enumValue];
|
|
50848
50848
|
}));
|
|
50849
50849
|
this._nameLookup = (0, _keyMap.default)(this._values, function(value) {
|
|
50850
50850
|
return value.name;
|
|
50851
50851
|
});
|
|
50852
|
-
typeof
|
|
50852
|
+
typeof config2.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
50853
50853
|
}
|
|
50854
50854
|
var _proto5 = GraphQLEnumType5.prototype;
|
|
50855
50855
|
_proto5.getValues = function getValues() {
|
|
@@ -50951,14 +50951,14 @@ var require_definition = __commonJS2({
|
|
|
50951
50951
|
});
|
|
50952
50952
|
}
|
|
50953
50953
|
var GraphQLInputObjectType4 = /* @__PURE__ */ function() {
|
|
50954
|
-
function GraphQLInputObjectType5(
|
|
50955
|
-
this.name =
|
|
50956
|
-
this.description =
|
|
50957
|
-
this.extensions =
|
|
50958
|
-
this.astNode =
|
|
50959
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
50960
|
-
this._fields = defineInputFieldMap.bind(void 0,
|
|
50961
|
-
typeof
|
|
50954
|
+
function GraphQLInputObjectType5(config2) {
|
|
50955
|
+
this.name = config2.name;
|
|
50956
|
+
this.description = config2.description;
|
|
50957
|
+
this.extensions = config2.extensions && (0, _toObjMap.default)(config2.extensions);
|
|
50958
|
+
this.astNode = config2.astNode;
|
|
50959
|
+
this.extensionASTNodes = undefineIfEmpty(config2.extensionASTNodes);
|
|
50960
|
+
this._fields = defineInputFieldMap.bind(void 0, config2);
|
|
50961
|
+
typeof config2.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
50962
50962
|
}
|
|
50963
50963
|
var _proto6 = GraphQLInputObjectType5.prototype;
|
|
50964
50964
|
_proto6.getFields = function getFields() {
|
|
@@ -51004,11 +51004,11 @@ var require_definition = __commonJS2({
|
|
|
51004
51004
|
}();
|
|
51005
51005
|
exports.GraphQLInputObjectType = GraphQLInputObjectType4;
|
|
51006
51006
|
(0, _defineInspect.default)(GraphQLInputObjectType4);
|
|
51007
|
-
function defineInputFieldMap(
|
|
51008
|
-
var fieldMap = resolveThunk(
|
|
51009
|
-
isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(
|
|
51007
|
+
function defineInputFieldMap(config2) {
|
|
51008
|
+
var fieldMap = resolveThunk(config2.fields);
|
|
51009
|
+
isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(config2.name, " fields must be an object with field names as keys or a function which returns such an object."));
|
|
51010
51010
|
return (0, _mapValue.default)(fieldMap, function(fieldConfig, fieldName) {
|
|
51011
|
-
!("resolve" in fieldConfig) || (0, _devAssert.default)(0, "".concat(
|
|
51011
|
+
!("resolve" in fieldConfig) || (0, _devAssert.default)(0, "".concat(config2.name, ".").concat(fieldName, " field has a resolve property, but Input Types cannot define resolvers."));
|
|
51012
51012
|
return {
|
|
51013
51013
|
name: fieldName,
|
|
51014
51014
|
description: fieldConfig.description,
|
|
@@ -52187,18 +52187,18 @@ var require_directives = __commonJS2({
|
|
|
52187
52187
|
return directive;
|
|
52188
52188
|
}
|
|
52189
52189
|
var GraphQLDirective2 = /* @__PURE__ */ function() {
|
|
52190
|
-
function GraphQLDirective3(
|
|
52190
|
+
function GraphQLDirective3(config2) {
|
|
52191
52191
|
var _config$isRepeatable, _config$args;
|
|
52192
|
-
this.name =
|
|
52193
|
-
this.description =
|
|
52194
|
-
this.locations =
|
|
52195
|
-
this.isRepeatable = (_config$isRepeatable =
|
|
52196
|
-
this.extensions =
|
|
52197
|
-
this.astNode =
|
|
52198
|
-
|
|
52199
|
-
Array.isArray(
|
|
52200
|
-
var args = (_config$args =
|
|
52201
|
-
(0, _isObjectLike.default)(args) && !Array.isArray(args) || (0, _devAssert.default)(0, "@".concat(
|
|
52192
|
+
this.name = config2.name;
|
|
52193
|
+
this.description = config2.description;
|
|
52194
|
+
this.locations = config2.locations;
|
|
52195
|
+
this.isRepeatable = (_config$isRepeatable = config2.isRepeatable) !== null && _config$isRepeatable !== void 0 ? _config$isRepeatable : false;
|
|
52196
|
+
this.extensions = config2.extensions && (0, _toObjMap.default)(config2.extensions);
|
|
52197
|
+
this.astNode = config2.astNode;
|
|
52198
|
+
config2.name || (0, _devAssert.default)(0, "Directive must be named.");
|
|
52199
|
+
Array.isArray(config2.locations) || (0, _devAssert.default)(0, "@".concat(config2.name, " locations must be an Array."));
|
|
52200
|
+
var args = (_config$args = config2.args) !== null && _config$args !== void 0 ? _config$args : {};
|
|
52201
|
+
(0, _isObjectLike.default)(args) && !Array.isArray(args) || (0, _devAssert.default)(0, "@".concat(config2.name, " args must be an object with argument names as keys."));
|
|
52202
52202
|
this.args = (0, _objectEntries.default)(args).map(function(_ref) {
|
|
52203
52203
|
var argName = _ref[0], argConfig = _ref[1];
|
|
52204
52204
|
return {
|
|
@@ -52352,23 +52352,23 @@ var require_schema = __commonJS2({
|
|
|
52352
52352
|
return schema;
|
|
52353
52353
|
}
|
|
52354
52354
|
var GraphQLSchema2 = /* @__PURE__ */ function() {
|
|
52355
|
-
function GraphQLSchema3(
|
|
52355
|
+
function GraphQLSchema3(config2) {
|
|
52356
52356
|
var _config$directives;
|
|
52357
|
-
this.__validationErrors =
|
|
52358
|
-
(0, _isObjectLike.default)(
|
|
52359
|
-
!
|
|
52360
|
-
!
|
|
52361
|
-
this.description =
|
|
52362
|
-
this.extensions =
|
|
52363
|
-
this.astNode =
|
|
52364
|
-
this.extensionASTNodes =
|
|
52365
|
-
this._queryType =
|
|
52366
|
-
this._mutationType =
|
|
52367
|
-
this._subscriptionType =
|
|
52368
|
-
this._directives = (_config$directives =
|
|
52369
|
-
var allReferencedTypes = new Set(
|
|
52370
|
-
if (
|
|
52371
|
-
for (var _i2 = 0, _config$types2 =
|
|
52357
|
+
this.__validationErrors = config2.assumeValid === true ? [] : void 0;
|
|
52358
|
+
(0, _isObjectLike.default)(config2) || (0, _devAssert.default)(0, "Must provide configuration object.");
|
|
52359
|
+
!config2.types || Array.isArray(config2.types) || (0, _devAssert.default)(0, '"types" must be Array if provided but got: '.concat((0, _inspect.default)(config2.types), "."));
|
|
52360
|
+
!config2.directives || Array.isArray(config2.directives) || (0, _devAssert.default)(0, '"directives" must be Array if provided but got: ' + "".concat((0, _inspect.default)(config2.directives), "."));
|
|
52361
|
+
this.description = config2.description;
|
|
52362
|
+
this.extensions = config2.extensions && (0, _toObjMap.default)(config2.extensions);
|
|
52363
|
+
this.astNode = config2.astNode;
|
|
52364
|
+
this.extensionASTNodes = config2.extensionASTNodes;
|
|
52365
|
+
this._queryType = config2.query;
|
|
52366
|
+
this._mutationType = config2.mutation;
|
|
52367
|
+
this._subscriptionType = config2.subscription;
|
|
52368
|
+
this._directives = (_config$directives = config2.directives) !== null && _config$directives !== void 0 ? _config$directives : _directives.specifiedDirectives;
|
|
52369
|
+
var allReferencedTypes = new Set(config2.types);
|
|
52370
|
+
if (config2.types != null) {
|
|
52371
|
+
for (var _i2 = 0, _config$types2 = config2.types; _i2 < _config$types2.length; _i2++) {
|
|
52372
52372
|
var type = _config$types2[_i2];
|
|
52373
52373
|
allReferencedTypes.delete(type);
|
|
52374
52374
|
collectReferencedTypes(type, allReferencedTypes);
|
|
@@ -58558,9 +58558,9 @@ var require_extendSchema = __commonJS2({
|
|
|
58558
58558
|
return typeMap[type.name];
|
|
58559
58559
|
}
|
|
58560
58560
|
function replaceDirective(directive) {
|
|
58561
|
-
var
|
|
58562
|
-
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({},
|
|
58563
|
-
args: (0, _mapValue.default)(
|
|
58561
|
+
var config2 = directive.toConfig();
|
|
58562
|
+
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({}, config2), {}, {
|
|
58563
|
+
args: (0, _mapValue.default)(config2.args, extendArg)
|
|
58564
58564
|
}));
|
|
58565
58565
|
}
|
|
58566
58566
|
function extendNamedType(type) {
|
|
@@ -58589,80 +58589,80 @@ var require_extendSchema = __commonJS2({
|
|
|
58589
58589
|
}
|
|
58590
58590
|
function extendInputObjectType(type) {
|
|
58591
58591
|
var _typeExtensionsMap$co;
|
|
58592
|
-
var
|
|
58593
|
-
var extensions = (_typeExtensionsMap$co = typeExtensionsMap[
|
|
58594
|
-
return new _definition.GraphQLInputObjectType(_objectSpread(_objectSpread({},
|
|
58592
|
+
var config2 = type.toConfig();
|
|
58593
|
+
var extensions = (_typeExtensionsMap$co = typeExtensionsMap[config2.name]) !== null && _typeExtensionsMap$co !== void 0 ? _typeExtensionsMap$co : [];
|
|
58594
|
+
return new _definition.GraphQLInputObjectType(_objectSpread(_objectSpread({}, config2), {}, {
|
|
58595
58595
|
fields: function fields() {
|
|
58596
|
-
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(
|
|
58596
|
+
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(config2.fields, function(field) {
|
|
58597
58597
|
return _objectSpread(_objectSpread({}, field), {}, {
|
|
58598
58598
|
type: replaceType(field.type)
|
|
58599
58599
|
});
|
|
58600
58600
|
})), buildInputFieldMap(extensions));
|
|
58601
58601
|
},
|
|
58602
|
-
extensionASTNodes:
|
|
58602
|
+
extensionASTNodes: config2.extensionASTNodes.concat(extensions)
|
|
58603
58603
|
}));
|
|
58604
58604
|
}
|
|
58605
58605
|
function extendEnumType(type) {
|
|
58606
58606
|
var _typeExtensionsMap$ty;
|
|
58607
|
-
var
|
|
58607
|
+
var config2 = type.toConfig();
|
|
58608
58608
|
var extensions = (_typeExtensionsMap$ty = typeExtensionsMap[type.name]) !== null && _typeExtensionsMap$ty !== void 0 ? _typeExtensionsMap$ty : [];
|
|
58609
|
-
return new _definition.GraphQLEnumType(_objectSpread(_objectSpread({},
|
|
58610
|
-
values: _objectSpread(_objectSpread({},
|
|
58611
|
-
extensionASTNodes:
|
|
58609
|
+
return new _definition.GraphQLEnumType(_objectSpread(_objectSpread({}, config2), {}, {
|
|
58610
|
+
values: _objectSpread(_objectSpread({}, config2.values), buildEnumValueMap(extensions)),
|
|
58611
|
+
extensionASTNodes: config2.extensionASTNodes.concat(extensions)
|
|
58612
58612
|
}));
|
|
58613
58613
|
}
|
|
58614
58614
|
function extendScalarType(type) {
|
|
58615
58615
|
var _typeExtensionsMap$co2;
|
|
58616
|
-
var
|
|
58617
|
-
var extensions = (_typeExtensionsMap$co2 = typeExtensionsMap[
|
|
58618
|
-
var specifiedByUrl =
|
|
58616
|
+
var config2 = type.toConfig();
|
|
58617
|
+
var extensions = (_typeExtensionsMap$co2 = typeExtensionsMap[config2.name]) !== null && _typeExtensionsMap$co2 !== void 0 ? _typeExtensionsMap$co2 : [];
|
|
58618
|
+
var specifiedByUrl = config2.specifiedByUrl;
|
|
58619
58619
|
for (var _i8 = 0; _i8 < extensions.length; _i8++) {
|
|
58620
58620
|
var _getSpecifiedByUrl;
|
|
58621
58621
|
var extensionNode = extensions[_i8];
|
|
58622
58622
|
specifiedByUrl = (_getSpecifiedByUrl = getSpecifiedByUrl(extensionNode)) !== null && _getSpecifiedByUrl !== void 0 ? _getSpecifiedByUrl : specifiedByUrl;
|
|
58623
58623
|
}
|
|
58624
|
-
return new _definition.GraphQLScalarType(_objectSpread(_objectSpread({},
|
|
58624
|
+
return new _definition.GraphQLScalarType(_objectSpread(_objectSpread({}, config2), {}, {
|
|
58625
58625
|
specifiedByUrl,
|
|
58626
|
-
extensionASTNodes:
|
|
58626
|
+
extensionASTNodes: config2.extensionASTNodes.concat(extensions)
|
|
58627
58627
|
}));
|
|
58628
58628
|
}
|
|
58629
58629
|
function extendObjectType(type) {
|
|
58630
58630
|
var _typeExtensionsMap$co3;
|
|
58631
|
-
var
|
|
58632
|
-
var extensions = (_typeExtensionsMap$co3 = typeExtensionsMap[
|
|
58633
|
-
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({},
|
|
58631
|
+
var config2 = type.toConfig();
|
|
58632
|
+
var extensions = (_typeExtensionsMap$co3 = typeExtensionsMap[config2.name]) !== null && _typeExtensionsMap$co3 !== void 0 ? _typeExtensionsMap$co3 : [];
|
|
58633
|
+
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({}, config2), {}, {
|
|
58634
58634
|
interfaces: function interfaces() {
|
|
58635
58635
|
return [].concat(type.getInterfaces().map(replaceNamedType), buildInterfaces(extensions));
|
|
58636
58636
|
},
|
|
58637
58637
|
fields: function fields() {
|
|
58638
|
-
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(
|
|
58638
|
+
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(config2.fields, extendField)), buildFieldMap(extensions));
|
|
58639
58639
|
},
|
|
58640
|
-
extensionASTNodes:
|
|
58640
|
+
extensionASTNodes: config2.extensionASTNodes.concat(extensions)
|
|
58641
58641
|
}));
|
|
58642
58642
|
}
|
|
58643
58643
|
function extendInterfaceType(type) {
|
|
58644
58644
|
var _typeExtensionsMap$co4;
|
|
58645
|
-
var
|
|
58646
|
-
var extensions = (_typeExtensionsMap$co4 = typeExtensionsMap[
|
|
58647
|
-
return new _definition.GraphQLInterfaceType(_objectSpread(_objectSpread({},
|
|
58645
|
+
var config2 = type.toConfig();
|
|
58646
|
+
var extensions = (_typeExtensionsMap$co4 = typeExtensionsMap[config2.name]) !== null && _typeExtensionsMap$co4 !== void 0 ? _typeExtensionsMap$co4 : [];
|
|
58647
|
+
return new _definition.GraphQLInterfaceType(_objectSpread(_objectSpread({}, config2), {}, {
|
|
58648
58648
|
interfaces: function interfaces() {
|
|
58649
58649
|
return [].concat(type.getInterfaces().map(replaceNamedType), buildInterfaces(extensions));
|
|
58650
58650
|
},
|
|
58651
58651
|
fields: function fields() {
|
|
58652
|
-
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(
|
|
58652
|
+
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(config2.fields, extendField)), buildFieldMap(extensions));
|
|
58653
58653
|
},
|
|
58654
|
-
extensionASTNodes:
|
|
58654
|
+
extensionASTNodes: config2.extensionASTNodes.concat(extensions)
|
|
58655
58655
|
}));
|
|
58656
58656
|
}
|
|
58657
58657
|
function extendUnionType(type) {
|
|
58658
58658
|
var _typeExtensionsMap$co5;
|
|
58659
|
-
var
|
|
58660
|
-
var extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[
|
|
58661
|
-
return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({},
|
|
58659
|
+
var config2 = type.toConfig();
|
|
58660
|
+
var extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[config2.name]) !== null && _typeExtensionsMap$co5 !== void 0 ? _typeExtensionsMap$co5 : [];
|
|
58661
|
+
return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({}, config2), {}, {
|
|
58662
58662
|
types: function types4() {
|
|
58663
58663
|
return [].concat(type.getTypes().map(replaceNamedType), buildUnionTypes(extensions));
|
|
58664
58664
|
},
|
|
58665
|
-
extensionASTNodes:
|
|
58665
|
+
extensionASTNodes: config2.extensionASTNodes.concat(extensions)
|
|
58666
58666
|
}));
|
|
58667
58667
|
}
|
|
58668
58668
|
function extendField(field) {
|
|
@@ -58977,24 +58977,24 @@ var require_buildASTSchema = __commonJS2({
|
|
|
58977
58977
|
extensionASTNodes: [],
|
|
58978
58978
|
assumeValid: false
|
|
58979
58979
|
};
|
|
58980
|
-
var
|
|
58981
|
-
if (
|
|
58982
|
-
for (var _i2 = 0, _config$types2 =
|
|
58980
|
+
var config2 = (0, _extendSchema.extendSchemaImpl)(emptySchemaConfig, documentAST, options);
|
|
58981
|
+
if (config2.astNode == null) {
|
|
58982
|
+
for (var _i2 = 0, _config$types2 = config2.types; _i2 < _config$types2.length; _i2++) {
|
|
58983
58983
|
var type = _config$types2[_i2];
|
|
58984
58984
|
switch (type.name) {
|
|
58985
58985
|
case "Query":
|
|
58986
|
-
|
|
58986
|
+
config2.query = type;
|
|
58987
58987
|
break;
|
|
58988
58988
|
case "Mutation":
|
|
58989
|
-
|
|
58989
|
+
config2.mutation = type;
|
|
58990
58990
|
break;
|
|
58991
58991
|
case "Subscription":
|
|
58992
|
-
|
|
58992
|
+
config2.subscription = type;
|
|
58993
58993
|
break;
|
|
58994
58994
|
}
|
|
58995
58995
|
}
|
|
58996
58996
|
}
|
|
58997
|
-
var directives =
|
|
58997
|
+
var directives = config2.directives;
|
|
58998
58998
|
var _loop = function _loop2(_i42) {
|
|
58999
58999
|
var stdDirective = _directives.specifiedDirectives[_i42];
|
|
59000
59000
|
if (directives.every(function(directive) {
|
|
@@ -59006,7 +59006,7 @@ var require_buildASTSchema = __commonJS2({
|
|
|
59006
59006
|
for (var _i4 = 0; _i4 < _directives.specifiedDirectives.length; _i4++) {
|
|
59007
59007
|
_loop(_i4);
|
|
59008
59008
|
}
|
|
59009
|
-
return new _schema.GraphQLSchema(
|
|
59009
|
+
return new _schema.GraphQLSchema(config2);
|
|
59010
59010
|
}
|
|
59011
59011
|
function buildSchema3(source, options) {
|
|
59012
59012
|
var document = (0, _parser.parse)(source, {
|
|
@@ -59106,12 +59106,12 @@ var require_lexicographicSortSchema = __commonJS2({
|
|
|
59106
59106
|
return maybeType && replaceNamedType(maybeType);
|
|
59107
59107
|
}
|
|
59108
59108
|
function sortDirective(directive) {
|
|
59109
|
-
var
|
|
59110
|
-
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({},
|
|
59111
|
-
locations: sortBy(
|
|
59109
|
+
var config2 = directive.toConfig();
|
|
59110
|
+
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({}, config2), {}, {
|
|
59111
|
+
locations: sortBy(config2.locations, function(x2) {
|
|
59112
59112
|
return x2;
|
|
59113
59113
|
}),
|
|
59114
|
-
args: sortArgs(
|
|
59114
|
+
args: sortArgs(config2.args)
|
|
59115
59115
|
}));
|
|
59116
59116
|
}
|
|
59117
59117
|
function sortArgs(args) {
|
|
@@ -59144,13 +59144,13 @@ var require_lexicographicSortSchema = __commonJS2({
|
|
|
59144
59144
|
return type;
|
|
59145
59145
|
}
|
|
59146
59146
|
if ((0, _definition.isObjectType)(type)) {
|
|
59147
|
-
var
|
|
59148
|
-
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({},
|
|
59147
|
+
var config2 = type.toConfig();
|
|
59148
|
+
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({}, config2), {}, {
|
|
59149
59149
|
interfaces: function interfaces() {
|
|
59150
|
-
return sortTypes(
|
|
59150
|
+
return sortTypes(config2.interfaces);
|
|
59151
59151
|
},
|
|
59152
59152
|
fields: function fields() {
|
|
59153
|
-
return sortFields(
|
|
59153
|
+
return sortFields(config2.fields);
|
|
59154
59154
|
}
|
|
59155
59155
|
}));
|
|
59156
59156
|
}
|
|
@@ -100519,13 +100519,13 @@ var require_esprima2 = __commonJS2({
|
|
|
100519
100519
|
return Reader2;
|
|
100520
100520
|
}();
|
|
100521
100521
|
var Tokenizer = function() {
|
|
100522
|
-
function Tokenizer2(code,
|
|
100522
|
+
function Tokenizer2(code, config2) {
|
|
100523
100523
|
this.errorHandler = new error_handler_1.ErrorHandler();
|
|
100524
|
-
this.errorHandler.tolerant =
|
|
100524
|
+
this.errorHandler.tolerant = config2 ? typeof config2.tolerant === "boolean" && config2.tolerant : false;
|
|
100525
100525
|
this.scanner = new scanner_1.Scanner(code, this.errorHandler);
|
|
100526
|
-
this.scanner.trackComment =
|
|
100527
|
-
this.trackRange =
|
|
100528
|
-
this.trackLoc =
|
|
100526
|
+
this.scanner.trackComment = config2 ? typeof config2.comment === "boolean" && config2.comment : false;
|
|
100527
|
+
this.trackRange = config2 ? typeof config2.range === "boolean" && config2.range : false;
|
|
100528
|
+
this.trackLoc = config2 ? typeof config2.loc === "boolean" && config2.loc : false;
|
|
100529
100529
|
this.buffer = [];
|
|
100530
100530
|
this.reader = new Reader();
|
|
100531
100531
|
}
|
|
@@ -102676,11 +102676,11 @@ var require_printer2 = __commonJS2({
|
|
|
102676
102676
|
return this.code;
|
|
102677
102677
|
};
|
|
102678
102678
|
var emptyPrintResult = new PrintResult("");
|
|
102679
|
-
var Printer = function Printer2(
|
|
102679
|
+
var Printer = function Printer2(config2) {
|
|
102680
102680
|
assert_1.default.ok(this instanceof Printer2);
|
|
102681
|
-
var explicitTabWidth =
|
|
102682
|
-
|
|
102683
|
-
|
|
102681
|
+
var explicitTabWidth = config2 && config2.tabWidth;
|
|
102682
|
+
config2 = (0, options_1.normalize)(config2);
|
|
102683
|
+
config2.sourceFileName = null;
|
|
102684
102684
|
function makePrintFunctionWith(options, overrides) {
|
|
102685
102685
|
options = Object.assign({}, options, overrides);
|
|
102686
102686
|
return function(path22) {
|
|
@@ -102695,19 +102695,19 @@ var require_printer2 = __commonJS2({
|
|
|
102695
102695
|
includeComments: false
|
|
102696
102696
|
}));
|
|
102697
102697
|
}
|
|
102698
|
-
var oldTabWidth =
|
|
102698
|
+
var oldTabWidth = config2.tabWidth;
|
|
102699
102699
|
if (!explicitTabWidth) {
|
|
102700
102700
|
var loc = path22.getNode().loc;
|
|
102701
102701
|
if (loc && loc.lines && loc.lines.guessTabWidth) {
|
|
102702
|
-
|
|
102702
|
+
config2.tabWidth = loc.lines.guessTabWidth();
|
|
102703
102703
|
}
|
|
102704
102704
|
}
|
|
102705
102705
|
var reprinter = (0, patcher_1.getReprinter)(path22);
|
|
102706
|
-
var lines = reprinter ? reprinter(print5) : genericPrint(path22,
|
|
102706
|
+
var lines = reprinter ? reprinter(print5) : genericPrint(path22, config2, options, makePrintFunctionWith(options, {
|
|
102707
102707
|
includeComments: true,
|
|
102708
102708
|
avoidRootParens: false
|
|
102709
102709
|
}));
|
|
102710
|
-
|
|
102710
|
+
config2.tabWidth = oldTabWidth;
|
|
102711
102711
|
return lines;
|
|
102712
102712
|
}
|
|
102713
102713
|
this.print = function(ast) {
|
|
@@ -102718,7 +102718,7 @@ var require_printer2 = __commonJS2({
|
|
|
102718
102718
|
includeComments: true,
|
|
102719
102719
|
avoidRootParens: false
|
|
102720
102720
|
});
|
|
102721
|
-
return new PrintResult(lines.toString(
|
|
102721
|
+
return new PrintResult(lines.toString(config2), util.composeSourceMaps(config2.inputSourceMap, lines.getSourceMap(config2.sourceMapName, config2.sourceRoot)));
|
|
102722
102722
|
};
|
|
102723
102723
|
this.printGenerically = function(ast) {
|
|
102724
102724
|
if (!ast) {
|
|
@@ -102726,26 +102726,26 @@ var require_printer2 = __commonJS2({
|
|
|
102726
102726
|
}
|
|
102727
102727
|
function printGenerically(path32) {
|
|
102728
102728
|
return (0, comments_1.printComments)(path32, function(path4) {
|
|
102729
|
-
return genericPrint(path4,
|
|
102729
|
+
return genericPrint(path4, config2, {
|
|
102730
102730
|
includeComments: true,
|
|
102731
102731
|
avoidRootParens: false
|
|
102732
102732
|
}, printGenerically);
|
|
102733
102733
|
});
|
|
102734
102734
|
}
|
|
102735
102735
|
var path22 = fast_path_1.default.from(ast);
|
|
102736
|
-
var oldReuseWhitespace =
|
|
102737
|
-
|
|
102738
|
-
var pr = new PrintResult(printGenerically(path22).toString(
|
|
102739
|
-
|
|
102736
|
+
var oldReuseWhitespace = config2.reuseWhitespace;
|
|
102737
|
+
config2.reuseWhitespace = false;
|
|
102738
|
+
var pr = new PrintResult(printGenerically(path22).toString(config2));
|
|
102739
|
+
config2.reuseWhitespace = oldReuseWhitespace;
|
|
102740
102740
|
return pr;
|
|
102741
102741
|
};
|
|
102742
102742
|
};
|
|
102743
102743
|
exports.Printer = Printer;
|
|
102744
|
-
function genericPrint(path22,
|
|
102744
|
+
function genericPrint(path22, config2, options, printPath) {
|
|
102745
102745
|
assert_1.default.ok(path22 instanceof fast_path_1.default);
|
|
102746
102746
|
var node = path22.getValue();
|
|
102747
102747
|
var parts = [];
|
|
102748
|
-
var linesWithoutParens = genericPrintNoParens(path22,
|
|
102748
|
+
var linesWithoutParens = genericPrintNoParens(path22, config2, printPath);
|
|
102749
102749
|
if (!node || linesWithoutParens.isEmpty()) {
|
|
102750
102750
|
return linesWithoutParens;
|
|
102751
102751
|
}
|
|
@@ -105367,7 +105367,7 @@ async function marshalSelection({
|
|
|
105367
105367
|
selection,
|
|
105368
105368
|
data
|
|
105369
105369
|
}) {
|
|
105370
|
-
const
|
|
105370
|
+
const config2 = getCurrentConfig();
|
|
105371
105371
|
if (data === null || typeof data === "undefined") {
|
|
105372
105372
|
return data;
|
|
105373
105373
|
}
|
|
@@ -105385,8 +105385,8 @@ async function marshalSelection({
|
|
|
105385
105385
|
if (selection2) {
|
|
105386
105386
|
return [fieldName, await marshalSelection({ selection: selection2, data: value })];
|
|
105387
105387
|
}
|
|
105388
|
-
if (
|
|
105389
|
-
const marshalFn =
|
|
105388
|
+
if (config2.scalars?.[type]) {
|
|
105389
|
+
const marshalFn = config2.scalars[type].marshal;
|
|
105390
105390
|
if (!marshalFn) {
|
|
105391
105391
|
throw new Error(
|
|
105392
105392
|
`scalar type ${type} is missing a \`marshal\` function. see https://github.com/AlecAivazis/houdini#%EF%B8%8Fcustom-scalars`
|
|
@@ -106362,10 +106362,10 @@ function plugin(name, hooks2) {
|
|
|
106362
106362
|
name,
|
|
106363
106363
|
plugin: hooks2,
|
|
106364
106364
|
__plugin_init__: true,
|
|
106365
|
-
with(
|
|
106365
|
+
with(config2) {
|
|
106366
106366
|
return {
|
|
106367
106367
|
...data,
|
|
106368
|
-
config
|
|
106368
|
+
config: config2
|
|
106369
106369
|
};
|
|
106370
106370
|
}
|
|
106371
106371
|
};
|
|
@@ -107576,7 +107576,7 @@ var InMemorySubscriptions = class {
|
|
|
107576
107576
|
};
|
|
107577
107577
|
var Cache = class {
|
|
107578
107578
|
_internal_unstable;
|
|
107579
|
-
constructor({ disabled, ...
|
|
107579
|
+
constructor({ disabled, ...config2 } = {}) {
|
|
107580
107580
|
this._internal_unstable = new CacheInternal({
|
|
107581
107581
|
cache: this,
|
|
107582
107582
|
storage: new InMemoryStorage(),
|
|
@@ -107586,8 +107586,8 @@ var Cache = class {
|
|
|
107586
107586
|
staleManager: new StaleManager(this),
|
|
107587
107587
|
disabled: disabled ?? typeof globalThis.window === "undefined"
|
|
107588
107588
|
});
|
|
107589
|
-
if (Object.keys(
|
|
107590
|
-
this.setConfig(defaultConfigValues(
|
|
107589
|
+
if (Object.keys(config2).length > 0) {
|
|
107590
|
+
this.setConfig(defaultConfigValues(config2));
|
|
107591
107591
|
}
|
|
107592
107592
|
}
|
|
107593
107593
|
write({
|
|
@@ -107641,8 +107641,8 @@ var Cache = class {
|
|
|
107641
107641
|
this._internal_unstable.lists.removeIDFromAllLists(id, layer);
|
|
107642
107642
|
this._internal_unstable.storage.delete(id, layer);
|
|
107643
107643
|
}
|
|
107644
|
-
setConfig(
|
|
107645
|
-
this._internal_unstable.setConfig(
|
|
107644
|
+
setConfig(config2) {
|
|
107645
|
+
this._internal_unstable.setConfig(config2);
|
|
107646
107646
|
}
|
|
107647
107647
|
markTypeStale(options) {
|
|
107648
107648
|
if (!options) {
|
|
@@ -107767,7 +107767,7 @@ var CacheInternal = class {
|
|
|
107767
107767
|
lifetimes,
|
|
107768
107768
|
staleManager,
|
|
107769
107769
|
disabled,
|
|
107770
|
-
config
|
|
107770
|
+
config: config2
|
|
107771
107771
|
}) {
|
|
107772
107772
|
this.storage = storage;
|
|
107773
107773
|
this.subscriptions = subscriptions;
|
|
@@ -107775,7 +107775,7 @@ var CacheInternal = class {
|
|
|
107775
107775
|
this.cache = cache;
|
|
107776
107776
|
this.lifetimes = lifetimes;
|
|
107777
107777
|
this.staleManager = staleManager;
|
|
107778
|
-
this._config =
|
|
107778
|
+
this._config = config2;
|
|
107779
107779
|
this._disabled = disabled;
|
|
107780
107780
|
try {
|
|
107781
107781
|
if (process.env.HOUDINI_TEST === "true") {
|
|
@@ -107787,8 +107787,8 @@ var CacheInternal = class {
|
|
|
107787
107787
|
get config() {
|
|
107788
107788
|
return this._config ?? getCurrentConfig();
|
|
107789
107789
|
}
|
|
107790
|
-
setConfig(
|
|
107791
|
-
this._config =
|
|
107790
|
+
setConfig(config2) {
|
|
107791
|
+
this._config = config2;
|
|
107792
107792
|
}
|
|
107793
107793
|
writeSelection({
|
|
107794
107794
|
data,
|
|
@@ -108651,12 +108651,12 @@ function deepMerge2(filepath, ...targets) {
|
|
|
108651
108651
|
});
|
|
108652
108652
|
}
|
|
108653
108653
|
}
|
|
108654
|
-
function parseJS(str,
|
|
108654
|
+
function parseJS(str, config2) {
|
|
108655
108655
|
const defaultConfig = {
|
|
108656
|
-
plugins: ["typescript", "importAssertions", "decorators"],
|
|
108656
|
+
plugins: ["typescript", "importAssertions", "decorators-legacy"],
|
|
108657
108657
|
sourceType: "module"
|
|
108658
108658
|
};
|
|
108659
|
-
return (0, import_parser.parse)(str || "",
|
|
108659
|
+
return (0, import_parser.parse)(str || "", config2 ? deepMerge2("", defaultConfig, config2) : defaultConfig).program;
|
|
108660
108660
|
}
|
|
108661
108661
|
async function printJS(script, options) {
|
|
108662
108662
|
if (options?.pretty) {
|
|
@@ -108668,21 +108668,21 @@ async function printJS(script, options) {
|
|
|
108668
108668
|
var recast = __toESM2(require_main2(), 1);
|
|
108669
108669
|
var AST = recast.types.builders;
|
|
108670
108670
|
function ensureArtifactImport({
|
|
108671
|
-
config,
|
|
108671
|
+
config: config2,
|
|
108672
108672
|
artifact,
|
|
108673
108673
|
body,
|
|
108674
108674
|
local,
|
|
108675
108675
|
withExtension
|
|
108676
108676
|
}) {
|
|
108677
108677
|
return ensureImports({
|
|
108678
|
-
config,
|
|
108678
|
+
config: config2,
|
|
108679
108679
|
body,
|
|
108680
|
-
sourceModule:
|
|
108680
|
+
sourceModule: config2.artifactImportPath(artifact.name) + (withExtension ? ".js" : ""),
|
|
108681
108681
|
import: local || `_${artifact.name}Artifact`
|
|
108682
108682
|
});
|
|
108683
108683
|
}
|
|
108684
108684
|
function ensureImports({
|
|
108685
|
-
config,
|
|
108685
|
+
config: config2,
|
|
108686
108686
|
body,
|
|
108687
108687
|
import: importID,
|
|
108688
108688
|
sourceModule,
|
|
@@ -108815,7 +108815,7 @@ async function asyncWalk(ast, { enter, leave }) {
|
|
|
108815
108815
|
return await instance.visit(ast, null);
|
|
108816
108816
|
}
|
|
108817
108817
|
var graphql4 = __toESM2(require_graphql2(), 1);
|
|
108818
|
-
async function find_graphql(
|
|
108818
|
+
async function find_graphql(config2, parsedScript, walker) {
|
|
108819
108819
|
await asyncWalk(parsedScript, {
|
|
108820
108820
|
async enter(node, parent2) {
|
|
108821
108821
|
if (node.type !== "TaggedTemplateExpression" && node.type !== "CallExpression") {
|
|
@@ -108848,7 +108848,7 @@ async function find_graphql(config, parsedScript, walker) {
|
|
|
108848
108848
|
if (walker.where && !walker.where(parsedTag, { node, parent: parent2 })) {
|
|
108849
108849
|
return;
|
|
108850
108850
|
}
|
|
108851
|
-
const definition =
|
|
108851
|
+
const definition = config2.extractDefinition(parsedTag);
|
|
108852
108852
|
const name = definition.name?.value;
|
|
108853
108853
|
if (!name) {
|
|
108854
108854
|
throw new Error("Could not find definition name");
|
|
@@ -108865,7 +108865,7 @@ async function find_graphql(config, parsedScript, walker) {
|
|
|
108865
108865
|
kind = CompiledSubscriptionKind;
|
|
108866
108866
|
}
|
|
108867
108867
|
}
|
|
108868
|
-
walker.dependency?.(
|
|
108868
|
+
walker.dependency?.(config2.artifactPath(parsedTag));
|
|
108869
108869
|
await walker.tag({
|
|
108870
108870
|
parsedDocument: parsedTag,
|
|
108871
108871
|
node: {
|
|
@@ -166326,7 +166326,11 @@ function get_session(req, secrets) {
|
|
|
166326
166326
|
if (!parsed) {
|
|
166327
166327
|
return {};
|
|
166328
166328
|
}
|
|
166329
|
-
|
|
166329
|
+
const houdini_session_cookie = parsed.split(";").map((s2) => s2.trim().split("=")).filter((s2) => s2[0] === session_cookie_name);
|
|
166330
|
+
if (houdini_session_cookie.length === 1) {
|
|
166331
|
+
return JSON.parse(houdini_session_cookie[0][1]);
|
|
166332
|
+
}
|
|
166333
|
+
return {};
|
|
166330
166334
|
}
|
|
166331
166335
|
|
|
166332
166336
|
// src/server/index.ts
|