houdini-svelte 1.1.3 → 1.2.0-react.1

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.
Files changed (46) hide show
  1. package/build/plugin-cjs/index.js +261 -225
  2. package/build/plugin-esm/index.js +261 -225
  3. package/build/preprocess-cjs/index.js +272 -225
  4. package/build/preprocess-esm/index.js +272 -225
  5. package/build/runtime/stores/index.d.ts +1 -1
  6. package/build/runtime/stores/pagination/fragment.d.ts +4 -7
  7. package/build/runtime/stores/pagination/query.d.ts +3 -4
  8. package/build/runtime/stores/query.d.ts +2 -54
  9. package/build/runtime/types.d.ts +40 -28
  10. package/build/runtime-cjs/stores/index.d.ts +1 -1
  11. package/build/runtime-cjs/stores/pagination/fragment.d.ts +4 -7
  12. package/build/runtime-cjs/stores/pagination/fragment.js +6 -9
  13. package/build/runtime-cjs/stores/pagination/query.d.ts +3 -4
  14. package/build/runtime-cjs/stores/pagination/query.js +10 -9
  15. package/build/runtime-cjs/stores/query.d.ts +2 -54
  16. package/build/runtime-cjs/types.d.ts +40 -28
  17. package/build/runtime-esm/stores/index.d.ts +1 -1
  18. package/build/runtime-esm/stores/pagination/fragment.d.ts +4 -7
  19. package/build/runtime-esm/stores/pagination/fragment.js +4 -7
  20. package/build/runtime-esm/stores/pagination/query.d.ts +3 -4
  21. package/build/runtime-esm/stores/pagination/query.js +5 -4
  22. package/build/runtime-esm/stores/query.d.ts +2 -54
  23. package/build/runtime-esm/types.d.ts +40 -28
  24. package/build/test-cjs/index.js +601 -491
  25. package/build/test-esm/index.js +601 -491
  26. package/package.json +2 -2
  27. package/build/runtime/stores/pagination/cursor.d.ts +0 -13
  28. package/build/runtime/stores/pagination/fetch.d.ts +0 -3
  29. package/build/runtime/stores/pagination/offset.d.ts +0 -20
  30. package/build/runtime/stores/pagination/pageInfo.d.ts +0 -13
  31. package/build/runtime-cjs/stores/pagination/cursor.d.ts +0 -13
  32. package/build/runtime-cjs/stores/pagination/cursor.js +0 -191
  33. package/build/runtime-cjs/stores/pagination/fetch.d.ts +0 -3
  34. package/build/runtime-cjs/stores/pagination/fetch.js +0 -16
  35. package/build/runtime-cjs/stores/pagination/offset.d.ts +0 -20
  36. package/build/runtime-cjs/stores/pagination/offset.js +0 -89
  37. package/build/runtime-cjs/stores/pagination/pageInfo.d.ts +0 -13
  38. package/build/runtime-cjs/stores/pagination/pageInfo.js +0 -79
  39. package/build/runtime-esm/stores/pagination/cursor.d.ts +0 -13
  40. package/build/runtime-esm/stores/pagination/cursor.js +0 -167
  41. package/build/runtime-esm/stores/pagination/fetch.d.ts +0 -3
  42. package/build/runtime-esm/stores/pagination/fetch.js +0 -0
  43. package/build/runtime-esm/stores/pagination/offset.d.ts +0 -20
  44. package/build/runtime-esm/stores/pagination/offset.js +0 -65
  45. package/build/runtime-esm/stores/pagination/pageInfo.d.ts +0 -13
  46. package/build/runtime-esm/stores/pagination/pageInfo.js +0 -52
@@ -33425,7 +33425,7 @@ var require_visitor = __commonJS2({
33425
33425
  Object.defineProperty(exports, "__esModule", {
33426
33426
  value: true
33427
33427
  });
33428
- exports.visit = visit2;
33428
+ exports.visit = visit3;
33429
33429
  exports.visitInParallel = visitInParallel;
33430
33430
  exports.getVisitFn = getVisitFn;
33431
33431
  exports.BREAK = exports.QueryDocumentKeys = void 0;
@@ -33488,7 +33488,7 @@ var require_visitor = __commonJS2({
33488
33488
  exports.QueryDocumentKeys = QueryDocumentKeys;
33489
33489
  var BREAK = Object.freeze({});
33490
33490
  exports.BREAK = BREAK;
33491
- function visit2(root, visitor) {
33491
+ function visit3(root, visitor) {
33492
33492
  var visitorKeys = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : QueryDocumentKeys;
33493
33493
  var stack = void 0;
33494
33494
  var inArray = Array.isArray(root);
@@ -72714,6 +72714,107 @@ var require_lib3 = __commonJS2({
72714
72714
  exports.tokTypes = tokTypes;
72715
72715
  }
72716
72716
  });
72717
+ var require_cjs = __commonJS2({
72718
+ "../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module) {
72719
+ "use strict";
72720
+ var isMergeableObject = function isMergeableObject2(value2) {
72721
+ return isNonNullObject(value2) && !isSpecial(value2);
72722
+ };
72723
+ function isNonNullObject(value2) {
72724
+ return !!value2 && typeof value2 === "object";
72725
+ }
72726
+ function isSpecial(value2) {
72727
+ var stringValue = Object.prototype.toString.call(value2);
72728
+ return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value2);
72729
+ }
72730
+ var canUseSymbol = typeof Symbol === "function" && Symbol.for;
72731
+ var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
72732
+ function isReactElement(value2) {
72733
+ return value2.$$typeof === REACT_ELEMENT_TYPE;
72734
+ }
72735
+ function emptyTarget(val) {
72736
+ return Array.isArray(val) ? [] : {};
72737
+ }
72738
+ function cloneUnlessOtherwiseSpecified(value2, options) {
72739
+ return options.clone !== false && options.isMergeableObject(value2) ? deepmerge(emptyTarget(value2), value2, options) : value2;
72740
+ }
72741
+ function defaultArrayMerge(target, source, options) {
72742
+ return target.concat(source).map(function(element) {
72743
+ return cloneUnlessOtherwiseSpecified(element, options);
72744
+ });
72745
+ }
72746
+ function getMergeFunction(key, options) {
72747
+ if (!options.customMerge) {
72748
+ return deepmerge;
72749
+ }
72750
+ var customMerge = options.customMerge(key);
72751
+ return typeof customMerge === "function" ? customMerge : deepmerge;
72752
+ }
72753
+ function getEnumerableOwnPropertySymbols(target) {
72754
+ return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
72755
+ return target.propertyIsEnumerable(symbol);
72756
+ }) : [];
72757
+ }
72758
+ function getKeys(target) {
72759
+ return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
72760
+ }
72761
+ function propertyIsOnObject(object, property) {
72762
+ try {
72763
+ return property in object;
72764
+ } catch (_) {
72765
+ return false;
72766
+ }
72767
+ }
72768
+ function propertyIsUnsafe(target, key) {
72769
+ return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
72770
+ }
72771
+ function mergeObject(target, source, options) {
72772
+ var destination = {};
72773
+ if (options.isMergeableObject(target)) {
72774
+ getKeys(target).forEach(function(key) {
72775
+ destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
72776
+ });
72777
+ }
72778
+ getKeys(source).forEach(function(key) {
72779
+ if (propertyIsUnsafe(target, key)) {
72780
+ return;
72781
+ }
72782
+ if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
72783
+ destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
72784
+ } else {
72785
+ destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
72786
+ }
72787
+ });
72788
+ return destination;
72789
+ }
72790
+ function deepmerge(target, source, options) {
72791
+ options = options || {};
72792
+ options.arrayMerge = options.arrayMerge || defaultArrayMerge;
72793
+ options.isMergeableObject = options.isMergeableObject || isMergeableObject;
72794
+ options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
72795
+ var sourceIsArray = Array.isArray(source);
72796
+ var targetIsArray = Array.isArray(target);
72797
+ var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
72798
+ if (!sourceAndTargetTypesMatch) {
72799
+ return cloneUnlessOtherwiseSpecified(source, options);
72800
+ } else if (sourceIsArray) {
72801
+ return options.arrayMerge(target, source, options);
72802
+ } else {
72803
+ return mergeObject(target, source, options);
72804
+ }
72805
+ }
72806
+ deepmerge.all = function deepmergeAll(array, options) {
72807
+ if (!Array.isArray(array)) {
72808
+ throw new Error("first argument should be an array");
72809
+ }
72810
+ return array.reduce(function(prev, next) {
72811
+ return deepmerge(prev, next, options);
72812
+ }, {});
72813
+ };
72814
+ var deepmerge_1 = deepmerge;
72815
+ module.exports = deepmerge_1;
72816
+ }
72817
+ });
72717
72818
  var require_tslib = __commonJS2({
72718
72819
  "../../node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.js"(exports, module) {
72719
72820
  var __extends;
@@ -74970,7 +75071,7 @@ var require_path_visitor = __commonJS2({
74970
75071
  }
74971
75072
  return target;
74972
75073
  }
74973
- PathVisitor.visit = function visit2(node2, methods) {
75074
+ PathVisitor.visit = function visit3(node2, methods) {
74974
75075
  return PathVisitor.fromMethodsObject(methods).visit(node2);
74975
75076
  };
74976
75077
  var PVp = PathVisitor.prototype;
@@ -75161,7 +75262,7 @@ var require_path_visitor = __commonJS2({
75161
75262
  this.needToCallTraverse = false;
75162
75263
  return visitChildren(path22, PathVisitor.fromMethodsObject(newVisitor || this.visitor));
75163
75264
  };
75164
- sharedContextProtoMethods.visit = function visit2(path22, newVisitor) {
75265
+ sharedContextProtoMethods.visit = function visit3(path22, newVisitor) {
75165
75266
  if (!(this instanceof this.Context)) {
75166
75267
  throw new Error("");
75167
75268
  }
@@ -76504,7 +76605,7 @@ var require_main = __commonJS2({
76504
76605
  var someField = _a.someField;
76505
76606
  var Type = _a.Type;
76506
76607
  var use = _a.use;
76507
- var visit2 = _a.visit;
76608
+ var visit3 = _a.visit;
76508
76609
  exports.astNodesAreEquivalent = astNodesAreEquivalent;
76509
76610
  exports.builders = builders;
76510
76611
  exports.builtInTypes = builtInTypes;
@@ -76521,7 +76622,7 @@ var require_main = __commonJS2({
76521
76622
  exports.someField = someField;
76522
76623
  exports.Type = Type;
76523
76624
  exports.use = use;
76524
- exports.visit = visit2;
76625
+ exports.visit = visit3;
76525
76626
  Object.assign(namedTypes_1.namedTypes, n);
76526
76627
  }
76527
76628
  });
@@ -88936,107 +89037,6 @@ var require_main2 = __commonJS2({
88936
89037
  }
88937
89038
  }
88938
89039
  });
88939
- var require_cjs = __commonJS2({
88940
- "../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module) {
88941
- "use strict";
88942
- var isMergeableObject = function isMergeableObject2(value2) {
88943
- return isNonNullObject(value2) && !isSpecial(value2);
88944
- };
88945
- function isNonNullObject(value2) {
88946
- return !!value2 && typeof value2 === "object";
88947
- }
88948
- function isSpecial(value2) {
88949
- var stringValue = Object.prototype.toString.call(value2);
88950
- return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value2);
88951
- }
88952
- var canUseSymbol = typeof Symbol === "function" && Symbol.for;
88953
- var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
88954
- function isReactElement(value2) {
88955
- return value2.$$typeof === REACT_ELEMENT_TYPE;
88956
- }
88957
- function emptyTarget(val) {
88958
- return Array.isArray(val) ? [] : {};
88959
- }
88960
- function cloneUnlessOtherwiseSpecified(value2, options) {
88961
- return options.clone !== false && options.isMergeableObject(value2) ? deepmerge(emptyTarget(value2), value2, options) : value2;
88962
- }
88963
- function defaultArrayMerge(target, source, options) {
88964
- return target.concat(source).map(function(element) {
88965
- return cloneUnlessOtherwiseSpecified(element, options);
88966
- });
88967
- }
88968
- function getMergeFunction(key, options) {
88969
- if (!options.customMerge) {
88970
- return deepmerge;
88971
- }
88972
- var customMerge = options.customMerge(key);
88973
- return typeof customMerge === "function" ? customMerge : deepmerge;
88974
- }
88975
- function getEnumerableOwnPropertySymbols(target) {
88976
- return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
88977
- return target.propertyIsEnumerable(symbol);
88978
- }) : [];
88979
- }
88980
- function getKeys(target) {
88981
- return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
88982
- }
88983
- function propertyIsOnObject(object, property) {
88984
- try {
88985
- return property in object;
88986
- } catch (_) {
88987
- return false;
88988
- }
88989
- }
88990
- function propertyIsUnsafe(target, key) {
88991
- return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
88992
- }
88993
- function mergeObject(target, source, options) {
88994
- var destination = {};
88995
- if (options.isMergeableObject(target)) {
88996
- getKeys(target).forEach(function(key) {
88997
- destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
88998
- });
88999
- }
89000
- getKeys(source).forEach(function(key) {
89001
- if (propertyIsUnsafe(target, key)) {
89002
- return;
89003
- }
89004
- if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
89005
- destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
89006
- } else {
89007
- destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
89008
- }
89009
- });
89010
- return destination;
89011
- }
89012
- function deepmerge(target, source, options) {
89013
- options = options || {};
89014
- options.arrayMerge = options.arrayMerge || defaultArrayMerge;
89015
- options.isMergeableObject = options.isMergeableObject || isMergeableObject;
89016
- options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
89017
- var sourceIsArray = Array.isArray(source);
89018
- var targetIsArray = Array.isArray(target);
89019
- var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
89020
- if (!sourceAndTargetTypesMatch) {
89021
- return cloneUnlessOtherwiseSpecified(source, options);
89022
- } else if (sourceIsArray) {
89023
- return options.arrayMerge(target, source, options);
89024
- } else {
89025
- return mergeObject(target, source, options);
89026
- }
89027
- }
89028
- deepmerge.all = function deepmergeAll(array, options) {
89029
- if (!Array.isArray(array)) {
89030
- throw new Error("first argument should be an array");
89031
- }
89032
- return array.reduce(function(prev, next) {
89033
- return deepmerge(prev, next, options);
89034
- }, {});
89035
- };
89036
- var deepmerge_1 = deepmerge;
89037
- module.exports = deepmerge_1;
89038
- }
89039
- });
89040
89040
  async function runPipeline(config4, pipeline22, target) {
89041
89041
  for (const transform of pipeline22) {
89042
89042
  await transform?.(config4, target);
@@ -95692,10 +95692,11 @@ var query = documentPlugin(ArtifactKind.Query, function() {
95692
95692
  cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
95693
95693
  }
95694
95694
  lastVariables = { ...marshalVariables2(ctx) };
95695
+ const variables = lastVariables;
95695
95696
  subscriptionSpec = {
95696
95697
  rootType: ctx.artifact.rootType,
95697
95698
  selection: ctx.artifact.selection,
95698
- variables: () => lastVariables,
95699
+ variables: () => variables,
95699
95700
  set: (newValue) => {
95700
95701
  resolve22(ctx, {
95701
95702
  data: newValue,
@@ -95722,12 +95723,17 @@ var query = documentPlugin(ArtifactKind.Query, function() {
95722
95723
  });
95723
95724
  var fragment = documentPlugin(ArtifactKind.Fragment, function() {
95724
95725
  let subscriptionSpec = null;
95726
+ let lastReference = null;
95725
95727
  return {
95726
95728
  start(ctx, { next, resolve: resolve22, variablesChanged: variablesChanged2, marshalVariables: marshalVariables2 }) {
95727
95729
  if (!ctx.stuff.parentID) {
95728
95730
  return next(ctx);
95729
95731
  }
95730
- if (variablesChanged2(ctx) && !ctx.cacheParams?.disableSubscriptions) {
95732
+ const currentReference = {
95733
+ parent: ctx.stuff.parentID,
95734
+ variables: marshalVariables2(ctx)
95735
+ };
95736
+ if (!ctx.cacheParams?.disableSubscriptions && (!deepEquals(lastReference, currentReference) || variablesChanged2(ctx))) {
95731
95737
  if (subscriptionSpec) {
95732
95738
  cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
95733
95739
  }
@@ -95750,6 +95756,7 @@ var fragment = documentPlugin(ArtifactKind.Fragment, function() {
95750
95756
  }
95751
95757
  };
95752
95758
  cache_default.subscribe(subscriptionSpec, variables);
95759
+ lastReference = currentReference;
95753
95760
  }
95754
95761
  next(ctx);
95755
95762
  },
@@ -96251,6 +96258,17 @@ var Config = class {
96251
96258
  }, []) ?? [];
96252
96259
  return !defaultDirectives.includes(name) && (internalDirectives.includes(name) || this.isDeleteDirective(name));
96253
96260
  }
96261
+ needsRefetchArtifact(document2) {
96262
+ let needsArtifact = false;
96263
+ graphql2.visit(document2, {
96264
+ Directive: (node2) => {
96265
+ if ([this.paginateDirective].includes(node2.name.value)) {
96266
+ needsArtifact = true;
96267
+ }
96268
+ }
96269
+ });
96270
+ return needsArtifact;
96271
+ }
96254
96272
  #fragmentVariableMaps;
96255
96273
  registerFragmentVariablesHash({
96256
96274
  hash,
@@ -96621,19 +96639,41 @@ var TypeWrapper = /* @__PURE__ */ ((TypeWrapper2) => {
96621
96639
  return TypeWrapper2;
96622
96640
  })(TypeWrapper || {});
96623
96641
  var import_parser = __toESM2(require_lib3(), 1);
96624
- async function parseJS(str) {
96642
+ var import_deepmerge = __toESM2(require_cjs(), 1);
96643
+ function deepMerge(filepath, ...targets) {
96644
+ try {
96645
+ if (targets.length === 1) {
96646
+ return targets[0];
96647
+ } else if (targets.length === 2) {
96648
+ return (0, import_deepmerge.default)(targets[0], targets[1], {
96649
+ arrayMerge: (source, update) => [...new Set(source.concat(update))]
96650
+ });
96651
+ }
96652
+ return deepMerge(filepath, targets[0], deepMerge(filepath, ...targets.slice(1)));
96653
+ } catch (e22) {
96654
+ throw new HoudiniError({
96655
+ filepath,
96656
+ message: "could not merge: " + JSON.stringify(targets, null, 4),
96657
+ description: e22.message
96658
+ });
96659
+ }
96660
+ }
96661
+ async function parseJS(str, config4) {
96662
+ const defaultConfig = {
96663
+ plugins: ["typescript"],
96664
+ sourceType: "module"
96665
+ };
96625
96666
  return {
96626
96667
  start: 0,
96627
- script: (0, import_parser.parse)(str || "", {
96628
- plugins: ["typescript"],
96629
- sourceType: "module"
96630
- }).program,
96668
+ script: (0, import_parser.parse)(
96669
+ str || "",
96670
+ config4 ? deepMerge("", defaultConfig, config4) : defaultConfig
96671
+ ).program,
96631
96672
  end: str.length
96632
96673
  };
96633
96674
  }
96634
96675
  var recast = __toESM2(require_main2(), 1);
96635
96676
  var AST = recast.types.builders;
96636
- var import_deepmerge = __toESM2(require_cjs(), 1);
96637
96677
  var WalkerBase = class {
96638
96678
  constructor() {
96639
96679
  this.should_skip = false;
@@ -130936,7 +130976,7 @@ var require_visitor2 = __commonJS3({
130936
130976
  Object.defineProperty(exports, "__esModule", {
130937
130977
  value: true
130938
130978
  });
130939
- exports.visit = visit13;
130979
+ exports.visit = visit14;
130940
130980
  exports.visitInParallel = visitInParallel;
130941
130981
  exports.getVisitFn = getVisitFn;
130942
130982
  exports.BREAK = exports.QueryDocumentKeys = void 0;
@@ -130999,7 +131039,7 @@ var require_visitor2 = __commonJS3({
130999
131039
  exports.QueryDocumentKeys = QueryDocumentKeys;
131000
131040
  var BREAK = Object.freeze({});
131001
131041
  exports.BREAK = BREAK;
131002
- function visit13(root, visitor) {
131042
+ function visit14(root, visitor) {
131003
131043
  var visitorKeys = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : QueryDocumentKeys;
131004
131044
  var stack = void 0;
131005
131045
  var inArray = Array.isArray(root);
@@ -169470,6 +169510,107 @@ var require_lib32 = __commonJS3({
169470
169510
  exports.tokTypes = tokTypes;
169471
169511
  }
169472
169512
  });
169513
+ var require_cjs2 = __commonJS3({
169514
+ "../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module) {
169515
+ "use strict";
169516
+ var isMergeableObject = function isMergeableObject2(value2) {
169517
+ return isNonNullObject(value2) && !isSpecial(value2);
169518
+ };
169519
+ function isNonNullObject(value2) {
169520
+ return !!value2 && typeof value2 === "object";
169521
+ }
169522
+ function isSpecial(value2) {
169523
+ var stringValue = Object.prototype.toString.call(value2);
169524
+ return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value2);
169525
+ }
169526
+ var canUseSymbol = typeof Symbol === "function" && Symbol.for;
169527
+ var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
169528
+ function isReactElement(value2) {
169529
+ return value2.$$typeof === REACT_ELEMENT_TYPE;
169530
+ }
169531
+ function emptyTarget(val) {
169532
+ return Array.isArray(val) ? [] : {};
169533
+ }
169534
+ function cloneUnlessOtherwiseSpecified(value2, options) {
169535
+ return options.clone !== false && options.isMergeableObject(value2) ? deepmerge(emptyTarget(value2), value2, options) : value2;
169536
+ }
169537
+ function defaultArrayMerge(target, source, options) {
169538
+ return target.concat(source).map(function(element) {
169539
+ return cloneUnlessOtherwiseSpecified(element, options);
169540
+ });
169541
+ }
169542
+ function getMergeFunction(key, options) {
169543
+ if (!options.customMerge) {
169544
+ return deepmerge;
169545
+ }
169546
+ var customMerge = options.customMerge(key);
169547
+ return typeof customMerge === "function" ? customMerge : deepmerge;
169548
+ }
169549
+ function getEnumerableOwnPropertySymbols(target) {
169550
+ return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
169551
+ return target.propertyIsEnumerable(symbol);
169552
+ }) : [];
169553
+ }
169554
+ function getKeys(target) {
169555
+ return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
169556
+ }
169557
+ function propertyIsOnObject(object, property) {
169558
+ try {
169559
+ return property in object;
169560
+ } catch (_) {
169561
+ return false;
169562
+ }
169563
+ }
169564
+ function propertyIsUnsafe(target, key) {
169565
+ return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
169566
+ }
169567
+ function mergeObject(target, source, options) {
169568
+ var destination = {};
169569
+ if (options.isMergeableObject(target)) {
169570
+ getKeys(target).forEach(function(key) {
169571
+ destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
169572
+ });
169573
+ }
169574
+ getKeys(source).forEach(function(key) {
169575
+ if (propertyIsUnsafe(target, key)) {
169576
+ return;
169577
+ }
169578
+ if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
169579
+ destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
169580
+ } else {
169581
+ destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
169582
+ }
169583
+ });
169584
+ return destination;
169585
+ }
169586
+ function deepmerge(target, source, options) {
169587
+ options = options || {};
169588
+ options.arrayMerge = options.arrayMerge || defaultArrayMerge;
169589
+ options.isMergeableObject = options.isMergeableObject || isMergeableObject;
169590
+ options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
169591
+ var sourceIsArray = Array.isArray(source);
169592
+ var targetIsArray = Array.isArray(target);
169593
+ var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
169594
+ if (!sourceAndTargetTypesMatch) {
169595
+ return cloneUnlessOtherwiseSpecified(source, options);
169596
+ } else if (sourceIsArray) {
169597
+ return options.arrayMerge(target, source, options);
169598
+ } else {
169599
+ return mergeObject(target, source, options);
169600
+ }
169601
+ }
169602
+ deepmerge.all = function deepmergeAll(array, options) {
169603
+ if (!Array.isArray(array)) {
169604
+ throw new Error("first argument should be an array");
169605
+ }
169606
+ return array.reduce(function(prev, next) {
169607
+ return deepmerge(prev, next, options);
169608
+ }, {});
169609
+ };
169610
+ var deepmerge_1 = deepmerge;
169611
+ module.exports = deepmerge_1;
169612
+ }
169613
+ });
169473
169614
  var require_tslib3 = __commonJS3({
169474
169615
  "../../node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.js"(exports, module) {
169475
169616
  var __extends;
@@ -171726,7 +171867,7 @@ var require_path_visitor3 = __commonJS3({
171726
171867
  }
171727
171868
  return target;
171728
171869
  }
171729
- PathVisitor.visit = function visit13(node2, methods) {
171870
+ PathVisitor.visit = function visit14(node2, methods) {
171730
171871
  return PathVisitor.fromMethodsObject(methods).visit(node2);
171731
171872
  };
171732
171873
  var PVp = PathVisitor.prototype;
@@ -171917,7 +172058,7 @@ var require_path_visitor3 = __commonJS3({
171917
172058
  this.needToCallTraverse = false;
171918
172059
  return visitChildren(path22, PathVisitor.fromMethodsObject(newVisitor || this.visitor));
171919
172060
  };
171920
- sharedContextProtoMethods.visit = function visit13(path22, newVisitor) {
172061
+ sharedContextProtoMethods.visit = function visit14(path22, newVisitor) {
171921
172062
  if (!(this instanceof this.Context)) {
171922
172063
  throw new Error("");
171923
172064
  }
@@ -173260,7 +173401,7 @@ var require_main5 = __commonJS3({
173260
173401
  var someField = _a.someField;
173261
173402
  var Type = _a.Type;
173262
173403
  var use = _a.use;
173263
- var visit13 = _a.visit;
173404
+ var visit14 = _a.visit;
173264
173405
  exports.astNodesAreEquivalent = astNodesAreEquivalent;
173265
173406
  exports.builders = builders;
173266
173407
  exports.builtInTypes = builtInTypes;
@@ -173277,7 +173418,7 @@ var require_main5 = __commonJS3({
173277
173418
  exports.someField = someField;
173278
173419
  exports.Type = Type;
173279
173420
  exports.use = use;
173280
- exports.visit = visit13;
173421
+ exports.visit = visit14;
173281
173422
  Object.assign(namedTypes_1.namedTypes, n);
173282
173423
  }
173283
173424
  });
@@ -185692,107 +185833,6 @@ var require_main22 = __commonJS3({
185692
185833
  }
185693
185834
  }
185694
185835
  });
185695
- var require_cjs2 = __commonJS3({
185696
- "../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module) {
185697
- "use strict";
185698
- var isMergeableObject = function isMergeableObject2(value2) {
185699
- return isNonNullObject(value2) && !isSpecial(value2);
185700
- };
185701
- function isNonNullObject(value2) {
185702
- return !!value2 && typeof value2 === "object";
185703
- }
185704
- function isSpecial(value2) {
185705
- var stringValue = Object.prototype.toString.call(value2);
185706
- return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value2);
185707
- }
185708
- var canUseSymbol = typeof Symbol === "function" && Symbol.for;
185709
- var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
185710
- function isReactElement(value2) {
185711
- return value2.$$typeof === REACT_ELEMENT_TYPE;
185712
- }
185713
- function emptyTarget(val) {
185714
- return Array.isArray(val) ? [] : {};
185715
- }
185716
- function cloneUnlessOtherwiseSpecified(value2, options) {
185717
- return options.clone !== false && options.isMergeableObject(value2) ? deepmerge(emptyTarget(value2), value2, options) : value2;
185718
- }
185719
- function defaultArrayMerge(target, source, options) {
185720
- return target.concat(source).map(function(element) {
185721
- return cloneUnlessOtherwiseSpecified(element, options);
185722
- });
185723
- }
185724
- function getMergeFunction(key, options) {
185725
- if (!options.customMerge) {
185726
- return deepmerge;
185727
- }
185728
- var customMerge = options.customMerge(key);
185729
- return typeof customMerge === "function" ? customMerge : deepmerge;
185730
- }
185731
- function getEnumerableOwnPropertySymbols(target) {
185732
- return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
185733
- return target.propertyIsEnumerable(symbol);
185734
- }) : [];
185735
- }
185736
- function getKeys(target) {
185737
- return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
185738
- }
185739
- function propertyIsOnObject(object, property) {
185740
- try {
185741
- return property in object;
185742
- } catch (_) {
185743
- return false;
185744
- }
185745
- }
185746
- function propertyIsUnsafe(target, key) {
185747
- return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
185748
- }
185749
- function mergeObject(target, source, options) {
185750
- var destination = {};
185751
- if (options.isMergeableObject(target)) {
185752
- getKeys(target).forEach(function(key) {
185753
- destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
185754
- });
185755
- }
185756
- getKeys(source).forEach(function(key) {
185757
- if (propertyIsUnsafe(target, key)) {
185758
- return;
185759
- }
185760
- if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
185761
- destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
185762
- } else {
185763
- destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
185764
- }
185765
- });
185766
- return destination;
185767
- }
185768
- function deepmerge(target, source, options) {
185769
- options = options || {};
185770
- options.arrayMerge = options.arrayMerge || defaultArrayMerge;
185771
- options.isMergeableObject = options.isMergeableObject || isMergeableObject;
185772
- options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
185773
- var sourceIsArray = Array.isArray(source);
185774
- var targetIsArray = Array.isArray(target);
185775
- var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
185776
- if (!sourceAndTargetTypesMatch) {
185777
- return cloneUnlessOtherwiseSpecified(source, options);
185778
- } else if (sourceIsArray) {
185779
- return options.arrayMerge(target, source, options);
185780
- } else {
185781
- return mergeObject(target, source, options);
185782
- }
185783
- }
185784
- deepmerge.all = function deepmergeAll(array, options) {
185785
- if (!Array.isArray(array)) {
185786
- throw new Error("first argument should be an array");
185787
- }
185788
- return array.reduce(function(prev, next) {
185789
- return deepmerge(prev, next, options);
185790
- }, {});
185791
- };
185792
- var deepmerge_1 = deepmerge;
185793
- module.exports = deepmerge_1;
185794
- }
185795
- });
185796
185836
  var import_minimatch2 = __toESM3(require_minimatch2(), 1);
185797
185837
  var config3 = {
185798
185838
  reset: {
@@ -189246,10 +189286,11 @@ var query2 = documentPlugin2(ArtifactKind2.Query, function() {
189246
189286
  cache_default2.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
189247
189287
  }
189248
189288
  lastVariables = { ...marshalVariables(ctx) };
189289
+ const variables = lastVariables;
189249
189290
  subscriptionSpec = {
189250
189291
  rootType: ctx.artifact.rootType,
189251
189292
  selection: ctx.artifact.selection,
189252
- variables: () => lastVariables,
189293
+ variables: () => variables,
189253
189294
  set: (newValue) => {
189254
189295
  resolve22(ctx, {
189255
189296
  data: newValue,
@@ -189276,12 +189317,17 @@ var query2 = documentPlugin2(ArtifactKind2.Query, function() {
189276
189317
  });
189277
189318
  var fragment3 = documentPlugin2(ArtifactKind2.Fragment, function() {
189278
189319
  let subscriptionSpec = null;
189320
+ let lastReference = null;
189279
189321
  return {
189280
189322
  start(ctx, { next, resolve: resolve22, variablesChanged, marshalVariables }) {
189281
189323
  if (!ctx.stuff.parentID) {
189282
189324
  return next(ctx);
189283
189325
  }
189284
- if (variablesChanged(ctx) && !ctx.cacheParams?.disableSubscriptions) {
189326
+ const currentReference = {
189327
+ parent: ctx.stuff.parentID,
189328
+ variables: marshalVariables(ctx)
189329
+ };
189330
+ if (!ctx.cacheParams?.disableSubscriptions && (!deepEquals2(lastReference, currentReference) || variablesChanged(ctx))) {
189285
189331
  if (subscriptionSpec) {
189286
189332
  cache_default2.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
189287
189333
  }
@@ -189304,6 +189350,7 @@ var fragment3 = documentPlugin2(ArtifactKind2.Fragment, function() {
189304
189350
  }
189305
189351
  };
189306
189352
  cache_default2.subscribe(subscriptionSpec, variables);
189353
+ lastReference = currentReference;
189307
189354
  }
189308
189355
  next(ctx);
189309
189356
  },
@@ -189369,9 +189416,9 @@ var emptySchema2 = graphql22.buildSchema("type Query { hello: String }");
189369
189416
  var defaultDirectives2 = emptySchema2.getDirectives().map((dir) => dir.name);
189370
189417
  var graphql32 = __toESM3(require_graphql22(), 1);
189371
189418
  var import_parser2 = __toESM3(require_lib32(), 1);
189419
+ var import_deepmerge2 = __toESM3(require_cjs2(), 1);
189372
189420
  var recast2 = __toESM3(require_main22(), 1);
189373
189421
  var AST2 = recast2.types.builders;
189374
- var import_deepmerge2 = __toESM3(require_cjs2(), 1);
189375
189422
  var graphql42 = __toESM3(require_graphql22(), 1);
189376
189423
  var graphql14 = __toESM3(require_graphql22(), 1);
189377
189424
  var recast5 = __toESM3(require_main22(), 1);
@@ -2,4 +2,4 @@ export * from './pagination';
2
2
  export { FragmentStore } from './fragment';
3
3
  export { SubscriptionStore } from './subscription';
4
4
  export { MutationStore, type MutationConfig } from './mutation';
5
- export { QueryStore, type QueryStoreFetchParams } from './query';
5
+ export { QueryStore } from './query';