houdini-react 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-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
|
@@ -50538,25 +50538,25 @@ var require_definition = __commonJS2({
|
|
|
50538
50538
|
return arr && arr.length > 0 ? arr : void 0;
|
|
50539
50539
|
}
|
|
50540
50540
|
var GraphQLScalarType4 = /* @__PURE__ */ function() {
|
|
50541
|
-
function GraphQLScalarType5(
|
|
50541
|
+
function GraphQLScalarType5(config2) {
|
|
50542
50542
|
var _config$parseValue, _config$serialize, _config$parseLiteral;
|
|
50543
|
-
var parseValue = (_config$parseValue =
|
|
50544
|
-
this.name =
|
|
50545
|
-
this.description =
|
|
50546
|
-
this.specifiedByUrl =
|
|
50547
|
-
this.serialize = (_config$serialize =
|
|
50543
|
+
var parseValue = (_config$parseValue = config2.parseValue) !== null && _config$parseValue !== void 0 ? _config$parseValue : _identityFunc.default;
|
|
50544
|
+
this.name = config2.name;
|
|
50545
|
+
this.description = config2.description;
|
|
50546
|
+
this.specifiedByUrl = config2.specifiedByUrl;
|
|
50547
|
+
this.serialize = (_config$serialize = config2.serialize) !== null && _config$serialize !== void 0 ? _config$serialize : _identityFunc.default;
|
|
50548
50548
|
this.parseValue = parseValue;
|
|
50549
|
-
this.parseLiteral = (_config$parseLiteral =
|
|
50549
|
+
this.parseLiteral = (_config$parseLiteral = config2.parseLiteral) !== null && _config$parseLiteral !== void 0 ? _config$parseLiteral : function(node, variables) {
|
|
50550
50550
|
return parseValue((0, _valueFromASTUntyped.valueFromASTUntyped)(node, variables));
|
|
50551
50551
|
};
|
|
50552
|
-
this.extensions =
|
|
50553
|
-
this.astNode =
|
|
50554
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
50555
|
-
typeof
|
|
50556
|
-
|
|
50557
|
-
|
|
50558
|
-
if (
|
|
50559
|
-
typeof
|
|
50552
|
+
this.extensions = config2.extensions && (0, _toObjMap.default)(config2.extensions);
|
|
50553
|
+
this.astNode = config2.astNode;
|
|
50554
|
+
this.extensionASTNodes = undefineIfEmpty(config2.extensionASTNodes);
|
|
50555
|
+
typeof config2.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
50556
|
+
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), "."));
|
|
50557
|
+
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.'));
|
|
50558
|
+
if (config2.parseLiteral) {
|
|
50559
|
+
typeof config2.parseValue === "function" && typeof config2.parseLiteral === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide both "parseValue" and "parseLiteral" functions.'));
|
|
50560
50560
|
}
|
|
50561
50561
|
}
|
|
50562
50562
|
var _proto = GraphQLScalarType5.prototype;
|
|
@@ -50591,17 +50591,17 @@ var require_definition = __commonJS2({
|
|
|
50591
50591
|
exports.GraphQLScalarType = GraphQLScalarType4;
|
|
50592
50592
|
(0, _defineInspect.default)(GraphQLScalarType4);
|
|
50593
50593
|
var GraphQLObjectType5 = /* @__PURE__ */ function() {
|
|
50594
|
-
function GraphQLObjectType6(
|
|
50595
|
-
this.name =
|
|
50596
|
-
this.description =
|
|
50597
|
-
this.isTypeOf =
|
|
50598
|
-
this.extensions =
|
|
50599
|
-
this.astNode =
|
|
50600
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
50601
|
-
this._fields = defineFieldMap.bind(void 0,
|
|
50602
|
-
this._interfaces = defineInterfaces.bind(void 0,
|
|
50603
|
-
typeof
|
|
50604
|
-
|
|
50594
|
+
function GraphQLObjectType6(config2) {
|
|
50595
|
+
this.name = config2.name;
|
|
50596
|
+
this.description = config2.description;
|
|
50597
|
+
this.isTypeOf = config2.isTypeOf;
|
|
50598
|
+
this.extensions = config2.extensions && (0, _toObjMap.default)(config2.extensions);
|
|
50599
|
+
this.astNode = config2.astNode;
|
|
50600
|
+
this.extensionASTNodes = undefineIfEmpty(config2.extensionASTNodes);
|
|
50601
|
+
this._fields = defineFieldMap.bind(void 0, config2);
|
|
50602
|
+
this._interfaces = defineInterfaces.bind(void 0, config2);
|
|
50603
|
+
typeof config2.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
50604
|
+
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), "."));
|
|
50605
50605
|
}
|
|
50606
50606
|
var _proto2 = GraphQLObjectType6.prototype;
|
|
50607
50607
|
_proto2.getFields = function getFields() {
|
|
@@ -50644,22 +50644,22 @@ var require_definition = __commonJS2({
|
|
|
50644
50644
|
}();
|
|
50645
50645
|
exports.GraphQLObjectType = GraphQLObjectType5;
|
|
50646
50646
|
(0, _defineInspect.default)(GraphQLObjectType5);
|
|
50647
|
-
function defineInterfaces(
|
|
50647
|
+
function defineInterfaces(config2) {
|
|
50648
50648
|
var _resolveThunk;
|
|
50649
|
-
var interfaces = (_resolveThunk = resolveThunk(
|
|
50650
|
-
Array.isArray(interfaces) || (0, _devAssert.default)(0, "".concat(
|
|
50649
|
+
var interfaces = (_resolveThunk = resolveThunk(config2.interfaces)) !== null && _resolveThunk !== void 0 ? _resolveThunk : [];
|
|
50650
|
+
Array.isArray(interfaces) || (0, _devAssert.default)(0, "".concat(config2.name, " interfaces must be an Array or a function which returns an Array."));
|
|
50651
50651
|
return interfaces;
|
|
50652
50652
|
}
|
|
50653
|
-
function defineFieldMap(
|
|
50654
|
-
var fieldMap = resolveThunk(
|
|
50655
|
-
isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(
|
|
50653
|
+
function defineFieldMap(config2) {
|
|
50654
|
+
var fieldMap = resolveThunk(config2.fields);
|
|
50655
|
+
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."));
|
|
50656
50656
|
return (0, _mapValue.default)(fieldMap, function(fieldConfig, fieldName) {
|
|
50657
50657
|
var _fieldConfig$args;
|
|
50658
|
-
isPlainObj(fieldConfig) || (0, _devAssert.default)(0, "".concat(
|
|
50659
|
-
!("isDeprecated" in fieldConfig) || (0, _devAssert.default)(0, "".concat(
|
|
50660
|
-
fieldConfig.resolve == null || typeof fieldConfig.resolve === "function" || (0, _devAssert.default)(0, "".concat(
|
|
50658
|
+
isPlainObj(fieldConfig) || (0, _devAssert.default)(0, "".concat(config2.name, ".").concat(fieldName, " field config must be an object."));
|
|
50659
|
+
!("isDeprecated" in fieldConfig) || (0, _devAssert.default)(0, "".concat(config2.name, ".").concat(fieldName, ' should provide "deprecationReason" instead of "isDeprecated".'));
|
|
50660
|
+
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), "."));
|
|
50661
50661
|
var argsConfig = (_fieldConfig$args = fieldConfig.args) !== null && _fieldConfig$args !== void 0 ? _fieldConfig$args : {};
|
|
50662
|
-
isPlainObj(argsConfig) || (0, _devAssert.default)(0, "".concat(
|
|
50662
|
+
isPlainObj(argsConfig) || (0, _devAssert.default)(0, "".concat(config2.name, ".").concat(fieldName, " args must be an object with argument names as keys."));
|
|
50663
50663
|
var args = (0, _objectEntries.default)(argsConfig).map(function(_ref) {
|
|
50664
50664
|
var argName = _ref[0], argConfig = _ref[1];
|
|
50665
50665
|
return {
|
|
@@ -50721,17 +50721,17 @@ var require_definition = __commonJS2({
|
|
|
50721
50721
|
return isNonNullType6(arg.type) && arg.defaultValue === void 0;
|
|
50722
50722
|
}
|
|
50723
50723
|
var GraphQLInterfaceType5 = /* @__PURE__ */ function() {
|
|
50724
|
-
function GraphQLInterfaceType6(
|
|
50725
|
-
this.name =
|
|
50726
|
-
this.description =
|
|
50727
|
-
this.resolveType =
|
|
50728
|
-
this.extensions =
|
|
50729
|
-
this.astNode =
|
|
50730
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
50731
|
-
this._fields = defineFieldMap.bind(void 0,
|
|
50732
|
-
this._interfaces = defineInterfaces.bind(void 0,
|
|
50733
|
-
typeof
|
|
50734
|
-
|
|
50724
|
+
function GraphQLInterfaceType6(config2) {
|
|
50725
|
+
this.name = config2.name;
|
|
50726
|
+
this.description = config2.description;
|
|
50727
|
+
this.resolveType = config2.resolveType;
|
|
50728
|
+
this.extensions = config2.extensions && (0, _toObjMap.default)(config2.extensions);
|
|
50729
|
+
this.astNode = config2.astNode;
|
|
50730
|
+
this.extensionASTNodes = undefineIfEmpty(config2.extensionASTNodes);
|
|
50731
|
+
this._fields = defineFieldMap.bind(void 0, config2);
|
|
50732
|
+
this._interfaces = defineInterfaces.bind(void 0, config2);
|
|
50733
|
+
typeof config2.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
50734
|
+
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), "."));
|
|
50735
50735
|
}
|
|
50736
50736
|
var _proto3 = GraphQLInterfaceType6.prototype;
|
|
50737
50737
|
_proto3.getFields = function getFields() {
|
|
@@ -50776,16 +50776,16 @@ var require_definition = __commonJS2({
|
|
|
50776
50776
|
exports.GraphQLInterfaceType = GraphQLInterfaceType5;
|
|
50777
50777
|
(0, _defineInspect.default)(GraphQLInterfaceType5);
|
|
50778
50778
|
var GraphQLUnionType3 = /* @__PURE__ */ function() {
|
|
50779
|
-
function GraphQLUnionType4(
|
|
50780
|
-
this.name =
|
|
50781
|
-
this.description =
|
|
50782
|
-
this.resolveType =
|
|
50783
|
-
this.extensions =
|
|
50784
|
-
this.astNode =
|
|
50785
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
50786
|
-
this._types = defineTypes.bind(void 0,
|
|
50787
|
-
typeof
|
|
50788
|
-
|
|
50779
|
+
function GraphQLUnionType4(config2) {
|
|
50780
|
+
this.name = config2.name;
|
|
50781
|
+
this.description = config2.description;
|
|
50782
|
+
this.resolveType = config2.resolveType;
|
|
50783
|
+
this.extensions = config2.extensions && (0, _toObjMap.default)(config2.extensions);
|
|
50784
|
+
this.astNode = config2.astNode;
|
|
50785
|
+
this.extensionASTNodes = undefineIfEmpty(config2.extensionASTNodes);
|
|
50786
|
+
this._types = defineTypes.bind(void 0, config2);
|
|
50787
|
+
typeof config2.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
50788
|
+
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), "."));
|
|
50789
50789
|
}
|
|
50790
50790
|
var _proto4 = GraphQLUnionType4.prototype;
|
|
50791
50791
|
_proto4.getTypes = function getTypes() {
|
|
@@ -50822,26 +50822,26 @@ var require_definition = __commonJS2({
|
|
|
50822
50822
|
}();
|
|
50823
50823
|
exports.GraphQLUnionType = GraphQLUnionType3;
|
|
50824
50824
|
(0, _defineInspect.default)(GraphQLUnionType3);
|
|
50825
|
-
function defineTypes(
|
|
50826
|
-
var types4 = resolveThunk(
|
|
50827
|
-
Array.isArray(types4) || (0, _devAssert.default)(0, "Must provide Array of types or a function which returns such an array for Union ".concat(
|
|
50825
|
+
function defineTypes(config2) {
|
|
50826
|
+
var types4 = resolveThunk(config2.types);
|
|
50827
|
+
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, "."));
|
|
50828
50828
|
return types4;
|
|
50829
50829
|
}
|
|
50830
50830
|
var GraphQLEnumType4 = /* @__PURE__ */ function() {
|
|
50831
|
-
function GraphQLEnumType5(
|
|
50832
|
-
this.name =
|
|
50833
|
-
this.description =
|
|
50834
|
-
this.extensions =
|
|
50835
|
-
this.astNode =
|
|
50836
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
50837
|
-
this._values = defineEnumValues(this.name,
|
|
50831
|
+
function GraphQLEnumType5(config2) {
|
|
50832
|
+
this.name = config2.name;
|
|
50833
|
+
this.description = config2.description;
|
|
50834
|
+
this.extensions = config2.extensions && (0, _toObjMap.default)(config2.extensions);
|
|
50835
|
+
this.astNode = config2.astNode;
|
|
50836
|
+
this.extensionASTNodes = undefineIfEmpty(config2.extensionASTNodes);
|
|
50837
|
+
this._values = defineEnumValues(this.name, config2.values);
|
|
50838
50838
|
this._valueLookup = new Map(this._values.map(function(enumValue) {
|
|
50839
50839
|
return [enumValue.value, enumValue];
|
|
50840
50840
|
}));
|
|
50841
50841
|
this._nameLookup = (0, _keyMap.default)(this._values, function(value) {
|
|
50842
50842
|
return value.name;
|
|
50843
50843
|
});
|
|
50844
|
-
typeof
|
|
50844
|
+
typeof config2.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
50845
50845
|
}
|
|
50846
50846
|
var _proto5 = GraphQLEnumType5.prototype;
|
|
50847
50847
|
_proto5.getValues = function getValues() {
|
|
@@ -50943,14 +50943,14 @@ var require_definition = __commonJS2({
|
|
|
50943
50943
|
});
|
|
50944
50944
|
}
|
|
50945
50945
|
var GraphQLInputObjectType4 = /* @__PURE__ */ function() {
|
|
50946
|
-
function GraphQLInputObjectType5(
|
|
50947
|
-
this.name =
|
|
50948
|
-
this.description =
|
|
50949
|
-
this.extensions =
|
|
50950
|
-
this.astNode =
|
|
50951
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
50952
|
-
this._fields = defineInputFieldMap.bind(void 0,
|
|
50953
|
-
typeof
|
|
50946
|
+
function GraphQLInputObjectType5(config2) {
|
|
50947
|
+
this.name = config2.name;
|
|
50948
|
+
this.description = config2.description;
|
|
50949
|
+
this.extensions = config2.extensions && (0, _toObjMap.default)(config2.extensions);
|
|
50950
|
+
this.astNode = config2.astNode;
|
|
50951
|
+
this.extensionASTNodes = undefineIfEmpty(config2.extensionASTNodes);
|
|
50952
|
+
this._fields = defineInputFieldMap.bind(void 0, config2);
|
|
50953
|
+
typeof config2.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
50954
50954
|
}
|
|
50955
50955
|
var _proto6 = GraphQLInputObjectType5.prototype;
|
|
50956
50956
|
_proto6.getFields = function getFields() {
|
|
@@ -50996,11 +50996,11 @@ var require_definition = __commonJS2({
|
|
|
50996
50996
|
}();
|
|
50997
50997
|
exports.GraphQLInputObjectType = GraphQLInputObjectType4;
|
|
50998
50998
|
(0, _defineInspect.default)(GraphQLInputObjectType4);
|
|
50999
|
-
function defineInputFieldMap(
|
|
51000
|
-
var fieldMap = resolveThunk(
|
|
51001
|
-
isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(
|
|
50999
|
+
function defineInputFieldMap(config2) {
|
|
51000
|
+
var fieldMap = resolveThunk(config2.fields);
|
|
51001
|
+
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."));
|
|
51002
51002
|
return (0, _mapValue.default)(fieldMap, function(fieldConfig, fieldName) {
|
|
51003
|
-
!("resolve" in fieldConfig) || (0, _devAssert.default)(0, "".concat(
|
|
51003
|
+
!("resolve" in fieldConfig) || (0, _devAssert.default)(0, "".concat(config2.name, ".").concat(fieldName, " field has a resolve property, but Input Types cannot define resolvers."));
|
|
51004
51004
|
return {
|
|
51005
51005
|
name: fieldName,
|
|
51006
51006
|
description: fieldConfig.description,
|
|
@@ -52179,18 +52179,18 @@ var require_directives = __commonJS2({
|
|
|
52179
52179
|
return directive;
|
|
52180
52180
|
}
|
|
52181
52181
|
var GraphQLDirective2 = /* @__PURE__ */ function() {
|
|
52182
|
-
function GraphQLDirective3(
|
|
52182
|
+
function GraphQLDirective3(config2) {
|
|
52183
52183
|
var _config$isRepeatable, _config$args;
|
|
52184
|
-
this.name =
|
|
52185
|
-
this.description =
|
|
52186
|
-
this.locations =
|
|
52187
|
-
this.isRepeatable = (_config$isRepeatable =
|
|
52188
|
-
this.extensions =
|
|
52189
|
-
this.astNode =
|
|
52190
|
-
|
|
52191
|
-
Array.isArray(
|
|
52192
|
-
var args = (_config$args =
|
|
52193
|
-
(0, _isObjectLike.default)(args) && !Array.isArray(args) || (0, _devAssert.default)(0, "@".concat(
|
|
52184
|
+
this.name = config2.name;
|
|
52185
|
+
this.description = config2.description;
|
|
52186
|
+
this.locations = config2.locations;
|
|
52187
|
+
this.isRepeatable = (_config$isRepeatable = config2.isRepeatable) !== null && _config$isRepeatable !== void 0 ? _config$isRepeatable : false;
|
|
52188
|
+
this.extensions = config2.extensions && (0, _toObjMap.default)(config2.extensions);
|
|
52189
|
+
this.astNode = config2.astNode;
|
|
52190
|
+
config2.name || (0, _devAssert.default)(0, "Directive must be named.");
|
|
52191
|
+
Array.isArray(config2.locations) || (0, _devAssert.default)(0, "@".concat(config2.name, " locations must be an Array."));
|
|
52192
|
+
var args = (_config$args = config2.args) !== null && _config$args !== void 0 ? _config$args : {};
|
|
52193
|
+
(0, _isObjectLike.default)(args) && !Array.isArray(args) || (0, _devAssert.default)(0, "@".concat(config2.name, " args must be an object with argument names as keys."));
|
|
52194
52194
|
this.args = (0, _objectEntries.default)(args).map(function(_ref) {
|
|
52195
52195
|
var argName = _ref[0], argConfig = _ref[1];
|
|
52196
52196
|
return {
|
|
@@ -52344,23 +52344,23 @@ var require_schema = __commonJS2({
|
|
|
52344
52344
|
return schema;
|
|
52345
52345
|
}
|
|
52346
52346
|
var GraphQLSchema2 = /* @__PURE__ */ function() {
|
|
52347
|
-
function GraphQLSchema3(
|
|
52347
|
+
function GraphQLSchema3(config2) {
|
|
52348
52348
|
var _config$directives;
|
|
52349
|
-
this.__validationErrors =
|
|
52350
|
-
(0, _isObjectLike.default)(
|
|
52351
|
-
!
|
|
52352
|
-
!
|
|
52353
|
-
this.description =
|
|
52354
|
-
this.extensions =
|
|
52355
|
-
this.astNode =
|
|
52356
|
-
this.extensionASTNodes =
|
|
52357
|
-
this._queryType =
|
|
52358
|
-
this._mutationType =
|
|
52359
|
-
this._subscriptionType =
|
|
52360
|
-
this._directives = (_config$directives =
|
|
52361
|
-
var allReferencedTypes = new Set(
|
|
52362
|
-
if (
|
|
52363
|
-
for (var _i2 = 0, _config$types2 =
|
|
52349
|
+
this.__validationErrors = config2.assumeValid === true ? [] : void 0;
|
|
52350
|
+
(0, _isObjectLike.default)(config2) || (0, _devAssert.default)(0, "Must provide configuration object.");
|
|
52351
|
+
!config2.types || Array.isArray(config2.types) || (0, _devAssert.default)(0, '"types" must be Array if provided but got: '.concat((0, _inspect.default)(config2.types), "."));
|
|
52352
|
+
!config2.directives || Array.isArray(config2.directives) || (0, _devAssert.default)(0, '"directives" must be Array if provided but got: ' + "".concat((0, _inspect.default)(config2.directives), "."));
|
|
52353
|
+
this.description = config2.description;
|
|
52354
|
+
this.extensions = config2.extensions && (0, _toObjMap.default)(config2.extensions);
|
|
52355
|
+
this.astNode = config2.astNode;
|
|
52356
|
+
this.extensionASTNodes = config2.extensionASTNodes;
|
|
52357
|
+
this._queryType = config2.query;
|
|
52358
|
+
this._mutationType = config2.mutation;
|
|
52359
|
+
this._subscriptionType = config2.subscription;
|
|
52360
|
+
this._directives = (_config$directives = config2.directives) !== null && _config$directives !== void 0 ? _config$directives : _directives.specifiedDirectives;
|
|
52361
|
+
var allReferencedTypes = new Set(config2.types);
|
|
52362
|
+
if (config2.types != null) {
|
|
52363
|
+
for (var _i2 = 0, _config$types2 = config2.types; _i2 < _config$types2.length; _i2++) {
|
|
52364
52364
|
var type = _config$types2[_i2];
|
|
52365
52365
|
allReferencedTypes.delete(type);
|
|
52366
52366
|
collectReferencedTypes(type, allReferencedTypes);
|
|
@@ -58550,9 +58550,9 @@ var require_extendSchema = __commonJS2({
|
|
|
58550
58550
|
return typeMap[type.name];
|
|
58551
58551
|
}
|
|
58552
58552
|
function replaceDirective(directive) {
|
|
58553
|
-
var
|
|
58554
|
-
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({},
|
|
58555
|
-
args: (0, _mapValue.default)(
|
|
58553
|
+
var config2 = directive.toConfig();
|
|
58554
|
+
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({}, config2), {}, {
|
|
58555
|
+
args: (0, _mapValue.default)(config2.args, extendArg)
|
|
58556
58556
|
}));
|
|
58557
58557
|
}
|
|
58558
58558
|
function extendNamedType(type) {
|
|
@@ -58581,80 +58581,80 @@ var require_extendSchema = __commonJS2({
|
|
|
58581
58581
|
}
|
|
58582
58582
|
function extendInputObjectType(type) {
|
|
58583
58583
|
var _typeExtensionsMap$co;
|
|
58584
|
-
var
|
|
58585
|
-
var extensions = (_typeExtensionsMap$co = typeExtensionsMap[
|
|
58586
|
-
return new _definition.GraphQLInputObjectType(_objectSpread(_objectSpread({},
|
|
58584
|
+
var config2 = type.toConfig();
|
|
58585
|
+
var extensions = (_typeExtensionsMap$co = typeExtensionsMap[config2.name]) !== null && _typeExtensionsMap$co !== void 0 ? _typeExtensionsMap$co : [];
|
|
58586
|
+
return new _definition.GraphQLInputObjectType(_objectSpread(_objectSpread({}, config2), {}, {
|
|
58587
58587
|
fields: function fields() {
|
|
58588
|
-
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(
|
|
58588
|
+
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(config2.fields, function(field) {
|
|
58589
58589
|
return _objectSpread(_objectSpread({}, field), {}, {
|
|
58590
58590
|
type: replaceType(field.type)
|
|
58591
58591
|
});
|
|
58592
58592
|
})), buildInputFieldMap(extensions));
|
|
58593
58593
|
},
|
|
58594
|
-
extensionASTNodes:
|
|
58594
|
+
extensionASTNodes: config2.extensionASTNodes.concat(extensions)
|
|
58595
58595
|
}));
|
|
58596
58596
|
}
|
|
58597
58597
|
function extendEnumType(type) {
|
|
58598
58598
|
var _typeExtensionsMap$ty;
|
|
58599
|
-
var
|
|
58599
|
+
var config2 = type.toConfig();
|
|
58600
58600
|
var extensions = (_typeExtensionsMap$ty = typeExtensionsMap[type.name]) !== null && _typeExtensionsMap$ty !== void 0 ? _typeExtensionsMap$ty : [];
|
|
58601
|
-
return new _definition.GraphQLEnumType(_objectSpread(_objectSpread({},
|
|
58602
|
-
values: _objectSpread(_objectSpread({},
|
|
58603
|
-
extensionASTNodes:
|
|
58601
|
+
return new _definition.GraphQLEnumType(_objectSpread(_objectSpread({}, config2), {}, {
|
|
58602
|
+
values: _objectSpread(_objectSpread({}, config2.values), buildEnumValueMap(extensions)),
|
|
58603
|
+
extensionASTNodes: config2.extensionASTNodes.concat(extensions)
|
|
58604
58604
|
}));
|
|
58605
58605
|
}
|
|
58606
58606
|
function extendScalarType(type) {
|
|
58607
58607
|
var _typeExtensionsMap$co2;
|
|
58608
|
-
var
|
|
58609
|
-
var extensions = (_typeExtensionsMap$co2 = typeExtensionsMap[
|
|
58610
|
-
var specifiedByUrl =
|
|
58608
|
+
var config2 = type.toConfig();
|
|
58609
|
+
var extensions = (_typeExtensionsMap$co2 = typeExtensionsMap[config2.name]) !== null && _typeExtensionsMap$co2 !== void 0 ? _typeExtensionsMap$co2 : [];
|
|
58610
|
+
var specifiedByUrl = config2.specifiedByUrl;
|
|
58611
58611
|
for (var _i8 = 0; _i8 < extensions.length; _i8++) {
|
|
58612
58612
|
var _getSpecifiedByUrl;
|
|
58613
58613
|
var extensionNode = extensions[_i8];
|
|
58614
58614
|
specifiedByUrl = (_getSpecifiedByUrl = getSpecifiedByUrl(extensionNode)) !== null && _getSpecifiedByUrl !== void 0 ? _getSpecifiedByUrl : specifiedByUrl;
|
|
58615
58615
|
}
|
|
58616
|
-
return new _definition.GraphQLScalarType(_objectSpread(_objectSpread({},
|
|
58616
|
+
return new _definition.GraphQLScalarType(_objectSpread(_objectSpread({}, config2), {}, {
|
|
58617
58617
|
specifiedByUrl,
|
|
58618
|
-
extensionASTNodes:
|
|
58618
|
+
extensionASTNodes: config2.extensionASTNodes.concat(extensions)
|
|
58619
58619
|
}));
|
|
58620
58620
|
}
|
|
58621
58621
|
function extendObjectType(type) {
|
|
58622
58622
|
var _typeExtensionsMap$co3;
|
|
58623
|
-
var
|
|
58624
|
-
var extensions = (_typeExtensionsMap$co3 = typeExtensionsMap[
|
|
58625
|
-
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({},
|
|
58623
|
+
var config2 = type.toConfig();
|
|
58624
|
+
var extensions = (_typeExtensionsMap$co3 = typeExtensionsMap[config2.name]) !== null && _typeExtensionsMap$co3 !== void 0 ? _typeExtensionsMap$co3 : [];
|
|
58625
|
+
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({}, config2), {}, {
|
|
58626
58626
|
interfaces: function interfaces() {
|
|
58627
58627
|
return [].concat(type.getInterfaces().map(replaceNamedType), buildInterfaces(extensions));
|
|
58628
58628
|
},
|
|
58629
58629
|
fields: function fields() {
|
|
58630
|
-
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(
|
|
58630
|
+
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(config2.fields, extendField)), buildFieldMap(extensions));
|
|
58631
58631
|
},
|
|
58632
|
-
extensionASTNodes:
|
|
58632
|
+
extensionASTNodes: config2.extensionASTNodes.concat(extensions)
|
|
58633
58633
|
}));
|
|
58634
58634
|
}
|
|
58635
58635
|
function extendInterfaceType(type) {
|
|
58636
58636
|
var _typeExtensionsMap$co4;
|
|
58637
|
-
var
|
|
58638
|
-
var extensions = (_typeExtensionsMap$co4 = typeExtensionsMap[
|
|
58639
|
-
return new _definition.GraphQLInterfaceType(_objectSpread(_objectSpread({},
|
|
58637
|
+
var config2 = type.toConfig();
|
|
58638
|
+
var extensions = (_typeExtensionsMap$co4 = typeExtensionsMap[config2.name]) !== null && _typeExtensionsMap$co4 !== void 0 ? _typeExtensionsMap$co4 : [];
|
|
58639
|
+
return new _definition.GraphQLInterfaceType(_objectSpread(_objectSpread({}, config2), {}, {
|
|
58640
58640
|
interfaces: function interfaces() {
|
|
58641
58641
|
return [].concat(type.getInterfaces().map(replaceNamedType), buildInterfaces(extensions));
|
|
58642
58642
|
},
|
|
58643
58643
|
fields: function fields() {
|
|
58644
|
-
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(
|
|
58644
|
+
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(config2.fields, extendField)), buildFieldMap(extensions));
|
|
58645
58645
|
},
|
|
58646
|
-
extensionASTNodes:
|
|
58646
|
+
extensionASTNodes: config2.extensionASTNodes.concat(extensions)
|
|
58647
58647
|
}));
|
|
58648
58648
|
}
|
|
58649
58649
|
function extendUnionType(type) {
|
|
58650
58650
|
var _typeExtensionsMap$co5;
|
|
58651
|
-
var
|
|
58652
|
-
var extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[
|
|
58653
|
-
return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({},
|
|
58651
|
+
var config2 = type.toConfig();
|
|
58652
|
+
var extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[config2.name]) !== null && _typeExtensionsMap$co5 !== void 0 ? _typeExtensionsMap$co5 : [];
|
|
58653
|
+
return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({}, config2), {}, {
|
|
58654
58654
|
types: function types4() {
|
|
58655
58655
|
return [].concat(type.getTypes().map(replaceNamedType), buildUnionTypes(extensions));
|
|
58656
58656
|
},
|
|
58657
|
-
extensionASTNodes:
|
|
58657
|
+
extensionASTNodes: config2.extensionASTNodes.concat(extensions)
|
|
58658
58658
|
}));
|
|
58659
58659
|
}
|
|
58660
58660
|
function extendField(field) {
|
|
@@ -58969,24 +58969,24 @@ var require_buildASTSchema = __commonJS2({
|
|
|
58969
58969
|
extensionASTNodes: [],
|
|
58970
58970
|
assumeValid: false
|
|
58971
58971
|
};
|
|
58972
|
-
var
|
|
58973
|
-
if (
|
|
58974
|
-
for (var _i2 = 0, _config$types2 =
|
|
58972
|
+
var config2 = (0, _extendSchema.extendSchemaImpl)(emptySchemaConfig, documentAST, options);
|
|
58973
|
+
if (config2.astNode == null) {
|
|
58974
|
+
for (var _i2 = 0, _config$types2 = config2.types; _i2 < _config$types2.length; _i2++) {
|
|
58975
58975
|
var type = _config$types2[_i2];
|
|
58976
58976
|
switch (type.name) {
|
|
58977
58977
|
case "Query":
|
|
58978
|
-
|
|
58978
|
+
config2.query = type;
|
|
58979
58979
|
break;
|
|
58980
58980
|
case "Mutation":
|
|
58981
|
-
|
|
58981
|
+
config2.mutation = type;
|
|
58982
58982
|
break;
|
|
58983
58983
|
case "Subscription":
|
|
58984
|
-
|
|
58984
|
+
config2.subscription = type;
|
|
58985
58985
|
break;
|
|
58986
58986
|
}
|
|
58987
58987
|
}
|
|
58988
58988
|
}
|
|
58989
|
-
var directives =
|
|
58989
|
+
var directives = config2.directives;
|
|
58990
58990
|
var _loop = function _loop2(_i42) {
|
|
58991
58991
|
var stdDirective = _directives.specifiedDirectives[_i42];
|
|
58992
58992
|
if (directives.every(function(directive) {
|
|
@@ -58998,7 +58998,7 @@ var require_buildASTSchema = __commonJS2({
|
|
|
58998
58998
|
for (var _i4 = 0; _i4 < _directives.specifiedDirectives.length; _i4++) {
|
|
58999
58999
|
_loop(_i4);
|
|
59000
59000
|
}
|
|
59001
|
-
return new _schema.GraphQLSchema(
|
|
59001
|
+
return new _schema.GraphQLSchema(config2);
|
|
59002
59002
|
}
|
|
59003
59003
|
function buildSchema3(source, options) {
|
|
59004
59004
|
var document = (0, _parser.parse)(source, {
|
|
@@ -59098,12 +59098,12 @@ var require_lexicographicSortSchema = __commonJS2({
|
|
|
59098
59098
|
return maybeType && replaceNamedType(maybeType);
|
|
59099
59099
|
}
|
|
59100
59100
|
function sortDirective(directive) {
|
|
59101
|
-
var
|
|
59102
|
-
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({},
|
|
59103
|
-
locations: sortBy(
|
|
59101
|
+
var config2 = directive.toConfig();
|
|
59102
|
+
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({}, config2), {}, {
|
|
59103
|
+
locations: sortBy(config2.locations, function(x2) {
|
|
59104
59104
|
return x2;
|
|
59105
59105
|
}),
|
|
59106
|
-
args: sortArgs(
|
|
59106
|
+
args: sortArgs(config2.args)
|
|
59107
59107
|
}));
|
|
59108
59108
|
}
|
|
59109
59109
|
function sortArgs(args) {
|
|
@@ -59136,13 +59136,13 @@ var require_lexicographicSortSchema = __commonJS2({
|
|
|
59136
59136
|
return type;
|
|
59137
59137
|
}
|
|
59138
59138
|
if ((0, _definition.isObjectType)(type)) {
|
|
59139
|
-
var
|
|
59140
|
-
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({},
|
|
59139
|
+
var config2 = type.toConfig();
|
|
59140
|
+
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({}, config2), {}, {
|
|
59141
59141
|
interfaces: function interfaces() {
|
|
59142
|
-
return sortTypes(
|
|
59142
|
+
return sortTypes(config2.interfaces);
|
|
59143
59143
|
},
|
|
59144
59144
|
fields: function fields() {
|
|
59145
|
-
return sortFields(
|
|
59145
|
+
return sortFields(config2.fields);
|
|
59146
59146
|
}
|
|
59147
59147
|
}));
|
|
59148
59148
|
}
|
|
@@ -100511,13 +100511,13 @@ var require_esprima2 = __commonJS2({
|
|
|
100511
100511
|
return Reader2;
|
|
100512
100512
|
}();
|
|
100513
100513
|
var Tokenizer = function() {
|
|
100514
|
-
function Tokenizer2(code,
|
|
100514
|
+
function Tokenizer2(code, config2) {
|
|
100515
100515
|
this.errorHandler = new error_handler_1.ErrorHandler();
|
|
100516
|
-
this.errorHandler.tolerant =
|
|
100516
|
+
this.errorHandler.tolerant = config2 ? typeof config2.tolerant === "boolean" && config2.tolerant : false;
|
|
100517
100517
|
this.scanner = new scanner_1.Scanner(code, this.errorHandler);
|
|
100518
|
-
this.scanner.trackComment =
|
|
100519
|
-
this.trackRange =
|
|
100520
|
-
this.trackLoc =
|
|
100518
|
+
this.scanner.trackComment = config2 ? typeof config2.comment === "boolean" && config2.comment : false;
|
|
100519
|
+
this.trackRange = config2 ? typeof config2.range === "boolean" && config2.range : false;
|
|
100520
|
+
this.trackLoc = config2 ? typeof config2.loc === "boolean" && config2.loc : false;
|
|
100521
100521
|
this.buffer = [];
|
|
100522
100522
|
this.reader = new Reader();
|
|
100523
100523
|
}
|
|
@@ -102668,11 +102668,11 @@ var require_printer2 = __commonJS2({
|
|
|
102668
102668
|
return this.code;
|
|
102669
102669
|
};
|
|
102670
102670
|
var emptyPrintResult = new PrintResult("");
|
|
102671
|
-
var Printer = function Printer2(
|
|
102671
|
+
var Printer = function Printer2(config2) {
|
|
102672
102672
|
assert_1.default.ok(this instanceof Printer2);
|
|
102673
|
-
var explicitTabWidth =
|
|
102674
|
-
|
|
102675
|
-
|
|
102673
|
+
var explicitTabWidth = config2 && config2.tabWidth;
|
|
102674
|
+
config2 = (0, options_1.normalize)(config2);
|
|
102675
|
+
config2.sourceFileName = null;
|
|
102676
102676
|
function makePrintFunctionWith(options, overrides) {
|
|
102677
102677
|
options = Object.assign({}, options, overrides);
|
|
102678
102678
|
return function(path22) {
|
|
@@ -102687,19 +102687,19 @@ var require_printer2 = __commonJS2({
|
|
|
102687
102687
|
includeComments: false
|
|
102688
102688
|
}));
|
|
102689
102689
|
}
|
|
102690
|
-
var oldTabWidth =
|
|
102690
|
+
var oldTabWidth = config2.tabWidth;
|
|
102691
102691
|
if (!explicitTabWidth) {
|
|
102692
102692
|
var loc = path22.getNode().loc;
|
|
102693
102693
|
if (loc && loc.lines && loc.lines.guessTabWidth) {
|
|
102694
|
-
|
|
102694
|
+
config2.tabWidth = loc.lines.guessTabWidth();
|
|
102695
102695
|
}
|
|
102696
102696
|
}
|
|
102697
102697
|
var reprinter = (0, patcher_1.getReprinter)(path22);
|
|
102698
|
-
var lines = reprinter ? reprinter(print5) : genericPrint(path22,
|
|
102698
|
+
var lines = reprinter ? reprinter(print5) : genericPrint(path22, config2, options, makePrintFunctionWith(options, {
|
|
102699
102699
|
includeComments: true,
|
|
102700
102700
|
avoidRootParens: false
|
|
102701
102701
|
}));
|
|
102702
|
-
|
|
102702
|
+
config2.tabWidth = oldTabWidth;
|
|
102703
102703
|
return lines;
|
|
102704
102704
|
}
|
|
102705
102705
|
this.print = function(ast) {
|
|
@@ -102710,7 +102710,7 @@ var require_printer2 = __commonJS2({
|
|
|
102710
102710
|
includeComments: true,
|
|
102711
102711
|
avoidRootParens: false
|
|
102712
102712
|
});
|
|
102713
|
-
return new PrintResult(lines.toString(
|
|
102713
|
+
return new PrintResult(lines.toString(config2), util.composeSourceMaps(config2.inputSourceMap, lines.getSourceMap(config2.sourceMapName, config2.sourceRoot)));
|
|
102714
102714
|
};
|
|
102715
102715
|
this.printGenerically = function(ast) {
|
|
102716
102716
|
if (!ast) {
|
|
@@ -102718,26 +102718,26 @@ var require_printer2 = __commonJS2({
|
|
|
102718
102718
|
}
|
|
102719
102719
|
function printGenerically(path32) {
|
|
102720
102720
|
return (0, comments_1.printComments)(path32, function(path4) {
|
|
102721
|
-
return genericPrint(path4,
|
|
102721
|
+
return genericPrint(path4, config2, {
|
|
102722
102722
|
includeComments: true,
|
|
102723
102723
|
avoidRootParens: false
|
|
102724
102724
|
}, printGenerically);
|
|
102725
102725
|
});
|
|
102726
102726
|
}
|
|
102727
102727
|
var path22 = fast_path_1.default.from(ast);
|
|
102728
|
-
var oldReuseWhitespace =
|
|
102729
|
-
|
|
102730
|
-
var pr = new PrintResult(printGenerically(path22).toString(
|
|
102731
|
-
|
|
102728
|
+
var oldReuseWhitespace = config2.reuseWhitespace;
|
|
102729
|
+
config2.reuseWhitespace = false;
|
|
102730
|
+
var pr = new PrintResult(printGenerically(path22).toString(config2));
|
|
102731
|
+
config2.reuseWhitespace = oldReuseWhitespace;
|
|
102732
102732
|
return pr;
|
|
102733
102733
|
};
|
|
102734
102734
|
};
|
|
102735
102735
|
exports.Printer = Printer;
|
|
102736
|
-
function genericPrint(path22,
|
|
102736
|
+
function genericPrint(path22, config2, options, printPath) {
|
|
102737
102737
|
assert_1.default.ok(path22 instanceof fast_path_1.default);
|
|
102738
102738
|
var node = path22.getValue();
|
|
102739
102739
|
var parts = [];
|
|
102740
|
-
var linesWithoutParens = genericPrintNoParens(path22,
|
|
102740
|
+
var linesWithoutParens = genericPrintNoParens(path22, config2, printPath);
|
|
102741
102741
|
if (!node || linesWithoutParens.isEmpty()) {
|
|
102742
102742
|
return linesWithoutParens;
|
|
102743
102743
|
}
|
|
@@ -105359,7 +105359,7 @@ async function marshalSelection({
|
|
|
105359
105359
|
selection,
|
|
105360
105360
|
data
|
|
105361
105361
|
}) {
|
|
105362
|
-
const
|
|
105362
|
+
const config2 = getCurrentConfig();
|
|
105363
105363
|
if (data === null || typeof data === "undefined") {
|
|
105364
105364
|
return data;
|
|
105365
105365
|
}
|
|
@@ -105377,8 +105377,8 @@ async function marshalSelection({
|
|
|
105377
105377
|
if (selection2) {
|
|
105378
105378
|
return [fieldName, await marshalSelection({ selection: selection2, data: value })];
|
|
105379
105379
|
}
|
|
105380
|
-
if (
|
|
105381
|
-
const marshalFn =
|
|
105380
|
+
if (config2.scalars?.[type]) {
|
|
105381
|
+
const marshalFn = config2.scalars[type].marshal;
|
|
105382
105382
|
if (!marshalFn) {
|
|
105383
105383
|
throw new Error(
|
|
105384
105384
|
`scalar type ${type} is missing a \`marshal\` function. see https://github.com/AlecAivazis/houdini#%EF%B8%8Fcustom-scalars`
|
|
@@ -106354,10 +106354,10 @@ function plugin(name, hooks2) {
|
|
|
106354
106354
|
name,
|
|
106355
106355
|
plugin: hooks2,
|
|
106356
106356
|
__plugin_init__: true,
|
|
106357
|
-
with(
|
|
106357
|
+
with(config2) {
|
|
106358
106358
|
return {
|
|
106359
106359
|
...data,
|
|
106360
|
-
config
|
|
106360
|
+
config: config2
|
|
106361
106361
|
};
|
|
106362
106362
|
}
|
|
106363
106363
|
};
|
|
@@ -107568,7 +107568,7 @@ var InMemorySubscriptions = class {
|
|
|
107568
107568
|
};
|
|
107569
107569
|
var Cache = class {
|
|
107570
107570
|
_internal_unstable;
|
|
107571
|
-
constructor({ disabled, ...
|
|
107571
|
+
constructor({ disabled, ...config2 } = {}) {
|
|
107572
107572
|
this._internal_unstable = new CacheInternal({
|
|
107573
107573
|
cache: this,
|
|
107574
107574
|
storage: new InMemoryStorage(),
|
|
@@ -107578,8 +107578,8 @@ var Cache = class {
|
|
|
107578
107578
|
staleManager: new StaleManager(this),
|
|
107579
107579
|
disabled: disabled ?? typeof globalThis.window === "undefined"
|
|
107580
107580
|
});
|
|
107581
|
-
if (Object.keys(
|
|
107582
|
-
this.setConfig(defaultConfigValues(
|
|
107581
|
+
if (Object.keys(config2).length > 0) {
|
|
107582
|
+
this.setConfig(defaultConfigValues(config2));
|
|
107583
107583
|
}
|
|
107584
107584
|
}
|
|
107585
107585
|
write({
|
|
@@ -107633,8 +107633,8 @@ var Cache = class {
|
|
|
107633
107633
|
this._internal_unstable.lists.removeIDFromAllLists(id, layer);
|
|
107634
107634
|
this._internal_unstable.storage.delete(id, layer);
|
|
107635
107635
|
}
|
|
107636
|
-
setConfig(
|
|
107637
|
-
this._internal_unstable.setConfig(
|
|
107636
|
+
setConfig(config2) {
|
|
107637
|
+
this._internal_unstable.setConfig(config2);
|
|
107638
107638
|
}
|
|
107639
107639
|
markTypeStale(options) {
|
|
107640
107640
|
if (!options) {
|
|
@@ -107759,7 +107759,7 @@ var CacheInternal = class {
|
|
|
107759
107759
|
lifetimes,
|
|
107760
107760
|
staleManager,
|
|
107761
107761
|
disabled,
|
|
107762
|
-
config
|
|
107762
|
+
config: config2
|
|
107763
107763
|
}) {
|
|
107764
107764
|
this.storage = storage;
|
|
107765
107765
|
this.subscriptions = subscriptions;
|
|
@@ -107767,7 +107767,7 @@ var CacheInternal = class {
|
|
|
107767
107767
|
this.cache = cache;
|
|
107768
107768
|
this.lifetimes = lifetimes;
|
|
107769
107769
|
this.staleManager = staleManager;
|
|
107770
|
-
this._config =
|
|
107770
|
+
this._config = config2;
|
|
107771
107771
|
this._disabled = disabled;
|
|
107772
107772
|
try {
|
|
107773
107773
|
if (process.env.HOUDINI_TEST === "true") {
|
|
@@ -107779,8 +107779,8 @@ var CacheInternal = class {
|
|
|
107779
107779
|
get config() {
|
|
107780
107780
|
return this._config ?? getCurrentConfig();
|
|
107781
107781
|
}
|
|
107782
|
-
setConfig(
|
|
107783
|
-
this._config =
|
|
107782
|
+
setConfig(config2) {
|
|
107783
|
+
this._config = config2;
|
|
107784
107784
|
}
|
|
107785
107785
|
writeSelection({
|
|
107786
107786
|
data,
|
|
@@ -108643,12 +108643,12 @@ function deepMerge2(filepath, ...targets) {
|
|
|
108643
108643
|
});
|
|
108644
108644
|
}
|
|
108645
108645
|
}
|
|
108646
|
-
function parseJS(str,
|
|
108646
|
+
function parseJS(str, config2) {
|
|
108647
108647
|
const defaultConfig = {
|
|
108648
|
-
plugins: ["typescript", "importAssertions", "decorators"],
|
|
108648
|
+
plugins: ["typescript", "importAssertions", "decorators-legacy"],
|
|
108649
108649
|
sourceType: "module"
|
|
108650
108650
|
};
|
|
108651
|
-
return (0, import_parser.parse)(str || "",
|
|
108651
|
+
return (0, import_parser.parse)(str || "", config2 ? deepMerge2("", defaultConfig, config2) : defaultConfig).program;
|
|
108652
108652
|
}
|
|
108653
108653
|
async function printJS(script, options) {
|
|
108654
108654
|
if (options?.pretty) {
|
|
@@ -108660,21 +108660,21 @@ async function printJS(script, options) {
|
|
|
108660
108660
|
var recast = __toESM2(require_main2(), 1);
|
|
108661
108661
|
var AST = recast.types.builders;
|
|
108662
108662
|
function ensureArtifactImport({
|
|
108663
|
-
config,
|
|
108663
|
+
config: config2,
|
|
108664
108664
|
artifact,
|
|
108665
108665
|
body,
|
|
108666
108666
|
local,
|
|
108667
108667
|
withExtension
|
|
108668
108668
|
}) {
|
|
108669
108669
|
return ensureImports({
|
|
108670
|
-
config,
|
|
108670
|
+
config: config2,
|
|
108671
108671
|
body,
|
|
108672
|
-
sourceModule:
|
|
108672
|
+
sourceModule: config2.artifactImportPath(artifact.name) + (withExtension ? ".js" : ""),
|
|
108673
108673
|
import: local || `_${artifact.name}Artifact`
|
|
108674
108674
|
});
|
|
108675
108675
|
}
|
|
108676
108676
|
function ensureImports({
|
|
108677
|
-
config,
|
|
108677
|
+
config: config2,
|
|
108678
108678
|
body,
|
|
108679
108679
|
import: importID,
|
|
108680
108680
|
sourceModule,
|
|
@@ -108807,7 +108807,7 @@ async function asyncWalk(ast, { enter, leave }) {
|
|
|
108807
108807
|
return await instance.visit(ast, null);
|
|
108808
108808
|
}
|
|
108809
108809
|
var graphql4 = __toESM2(require_graphql2(), 1);
|
|
108810
|
-
async function find_graphql(
|
|
108810
|
+
async function find_graphql(config2, parsedScript, walker) {
|
|
108811
108811
|
await asyncWalk(parsedScript, {
|
|
108812
108812
|
async enter(node, parent2) {
|
|
108813
108813
|
if (node.type !== "TaggedTemplateExpression" && node.type !== "CallExpression") {
|
|
@@ -108840,7 +108840,7 @@ async function find_graphql(config, parsedScript, walker) {
|
|
|
108840
108840
|
if (walker.where && !walker.where(parsedTag, { node, parent: parent2 })) {
|
|
108841
108841
|
return;
|
|
108842
108842
|
}
|
|
108843
|
-
const definition =
|
|
108843
|
+
const definition = config2.extractDefinition(parsedTag);
|
|
108844
108844
|
const name = definition.name?.value;
|
|
108845
108845
|
if (!name) {
|
|
108846
108846
|
throw new Error("Could not find definition name");
|
|
@@ -108857,7 +108857,7 @@ async function find_graphql(config, parsedScript, walker) {
|
|
|
108857
108857
|
kind = CompiledSubscriptionKind;
|
|
108858
108858
|
}
|
|
108859
108859
|
}
|
|
108860
|
-
walker.dependency?.(
|
|
108860
|
+
walker.dependency?.(config2.artifactPath(parsedTag));
|
|
108861
108861
|
await walker.tag({
|
|
108862
108862
|
parsedDocument: parsedTag,
|
|
108863
108863
|
node: {
|
|
@@ -166317,7 +166317,11 @@ function get_session(req, secrets) {
|
|
|
166317
166317
|
if (!parsed) {
|
|
166318
166318
|
return {};
|
|
166319
166319
|
}
|
|
166320
|
-
|
|
166320
|
+
const houdini_session_cookie = parsed.split(";").map((s2) => s2.trim().split("=")).filter((s2) => s2[0] === session_cookie_name);
|
|
166321
|
+
if (houdini_session_cookie.length === 1) {
|
|
166322
|
+
return JSON.parse(houdini_session_cookie[0][1]);
|
|
166323
|
+
}
|
|
166324
|
+
return {};
|
|
166321
166325
|
}
|
|
166322
166326
|
|
|
166323
166327
|
// src/server/index.ts
|