houdini 1.2.1 → 1.2.3

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 (35) hide show
  1. package/build/cmd-cjs/index.js +149 -104
  2. package/build/cmd-esm/index.js +149 -104
  3. package/build/codegen/generators/artifacts/selection.d.ts +2 -1
  4. package/build/codegen/utils/flattenSelections.d.ts +2 -4
  5. package/build/codegen-cjs/index.js +147 -102
  6. package/build/codegen-esm/index.js +147 -102
  7. package/build/lib-cjs/index.js +103 -45
  8. package/build/lib-esm/index.js +103 -45
  9. package/build/runtime/cache/cache.d.ts +3 -1
  10. package/build/runtime/cache/lists.d.ts +3 -3
  11. package/build/runtime/cache/storage.d.ts +2 -2
  12. package/build/runtime/cache/subscription.d.ts +1 -0
  13. package/build/runtime-cjs/cache/cache.d.ts +3 -1
  14. package/build/runtime-cjs/cache/cache.js +78 -27
  15. package/build/runtime-cjs/cache/lists.d.ts +3 -3
  16. package/build/runtime-cjs/cache/lists.js +7 -7
  17. package/build/runtime-cjs/cache/storage.d.ts +2 -2
  18. package/build/runtime-cjs/cache/storage.js +5 -5
  19. package/build/runtime-cjs/cache/subscription.d.ts +1 -0
  20. package/build/runtime-cjs/cache/subscription.js +3 -0
  21. package/build/runtime-cjs/client/plugins/mutation.js +10 -6
  22. package/build/runtime-esm/cache/cache.d.ts +3 -1
  23. package/build/runtime-esm/cache/cache.js +78 -27
  24. package/build/runtime-esm/cache/lists.d.ts +3 -3
  25. package/build/runtime-esm/cache/lists.js +7 -7
  26. package/build/runtime-esm/cache/storage.d.ts +2 -2
  27. package/build/runtime-esm/cache/storage.js +5 -5
  28. package/build/runtime-esm/cache/subscription.d.ts +1 -0
  29. package/build/runtime-esm/cache/subscription.js +3 -0
  30. package/build/runtime-esm/client/plugins/mutation.js +10 -6
  31. package/build/test-cjs/index.js +147 -102
  32. package/build/test-esm/index.js +147 -102
  33. package/build/vite-cjs/index.js +147 -102
  34. package/build/vite-esm/index.js +147 -102
  35. package/package.json +1 -1
@@ -70293,10 +70293,10 @@ var ListManager = class {
70293
70293
  this.lists.get(list.name).get(parentID).lists.push(handler);
70294
70294
  this.listsByField.get(parentID).get(list.key).push(handler);
70295
70295
  }
70296
- removeIDFromAllLists(id) {
70296
+ removeIDFromAllLists(id, layer) {
70297
70297
  for (const fieldMap of this.lists.values()) {
70298
70298
  for (const list of fieldMap.values()) {
70299
- list.removeID(id);
70299
+ list.removeID(id, void 0, layer);
70300
70300
  }
70301
70301
  }
70302
70302
  }
@@ -70453,7 +70453,7 @@ var List = class {
70453
70453
  layer: layer?.id
70454
70454
  });
70455
70455
  }
70456
- removeID(id, variables = {}) {
70456
+ removeID(id, variables = {}, layer) {
70457
70457
  if (!this.validateWhen()) {
70458
70458
  return;
70459
70459
  }
@@ -70500,7 +70500,7 @@ var List = class {
70500
70500
  subscribers.map((sub) => sub[0]),
70501
70501
  variables
70502
70502
  );
70503
- this.cache._internal_unstable.storage.remove(parentID, targetKey, targetID);
70503
+ this.cache._internal_unstable.storage.remove(parentID, targetKey, targetID, layer);
70504
70504
  for (const [spec] of subscribers) {
70505
70505
  spec.set(
70506
70506
  this.cache._internal_unstable.getSelection({
@@ -70513,12 +70513,12 @@ var List = class {
70513
70513
  }
70514
70514
  return true;
70515
70515
  }
70516
- remove(data, variables = {}) {
70516
+ remove(data, variables = {}, layer) {
70517
70517
  const targetID = this.cache._internal_unstable.id(this.listType(data), data);
70518
70518
  if (!targetID) {
70519
70519
  return;
70520
70520
  }
70521
- return this.removeID(targetID, variables);
70521
+ return this.removeID(targetID, variables, layer);
70522
70522
  }
70523
70523
  listType(data) {
70524
70524
  return data.__typename || this.type;
@@ -70550,7 +70550,7 @@ var List = class {
70550
70550
  layer,
70551
70551
  where
70552
70552
  }) {
70553
- if (!this.remove(data, variables)) {
70553
+ if (!this.remove(data, variables, layer)) {
70554
70554
  this.addToList(selection, data, variables, where, layer);
70555
70555
  }
70556
70556
  }
@@ -70687,7 +70687,7 @@ var StaleManager = class {
70687
70687
  // src/runtime/cache/storage.ts
70688
70688
  var InMemoryStorage = class {
70689
70689
  data;
70690
- idCount = 0;
70690
+ idCount = 1;
70691
70691
  rank = 0;
70692
70692
  constructor() {
70693
70693
  this.data = [];
@@ -70707,11 +70707,11 @@ var InMemoryStorage = class {
70707
70707
  insert(id, field, location, target) {
70708
70708
  return this.topLayer.insert(id, field, location, target);
70709
70709
  }
70710
- remove(id, field, target) {
70711
- return this.topLayer.remove(id, field, target);
70710
+ remove(id, field, target, layerToUser = this.topLayer) {
70711
+ return layerToUser.remove(id, field, target);
70712
70712
  }
70713
- delete(id) {
70714
- return this.topLayer.delete(id);
70713
+ delete(id, layerToUser = this.topLayer) {
70714
+ return layerToUser.delete(id);
70715
70715
  }
70716
70716
  deleteField(id, field) {
70717
70717
  return this.topLayer.deleteField(id, field);
@@ -71083,6 +71083,9 @@ var InMemorySubscriptions = class {
71083
71083
  subscribers = {};
71084
71084
  referenceCounts = {};
71085
71085
  keyVersions = {};
71086
+ activeFields(parent2) {
71087
+ return Object.keys(this.subscribers[parent2] || {});
71088
+ }
71086
71089
  add({
71087
71090
  parent: parent2,
71088
71091
  spec,
@@ -71351,20 +71354,7 @@ var Cache = class {
71351
71354
  }) {
71352
71355
  const layer = layerID ? this._internal_unstable.storage.getLayer(layerID) : this._internal_unstable.storage.topLayer;
71353
71356
  const subscribers = this._internal_unstable.writeSelection({ ...args, layer }).map((sub) => sub[0]);
71354
- const notified = [];
71355
- for (const spec of subscribers.concat(notifySubscribers)) {
71356
- if (!notified.includes(spec.set)) {
71357
- notified.push(spec.set);
71358
- spec.set(
71359
- this._internal_unstable.getSelection({
71360
- parent: spec.parentID || rootID,
71361
- selection: spec.selection,
71362
- variables: spec.variables?.() || {},
71363
- ignoreMasking: false
71364
- }).data
71365
- );
71366
- }
71367
- }
71357
+ this.#notifySubscribers(subscribers.concat(notifySubscribers));
71368
71358
  return subscribers;
71369
71359
  }
71370
71360
  read(...args) {
@@ -71403,10 +71393,10 @@ var Cache = class {
71403
71393
  }
71404
71394
  return handler;
71405
71395
  }
71406
- delete(id) {
71396
+ delete(id, layer) {
71407
71397
  this._internal_unstable.subscriptions.removeAllSubscribers(id);
71408
- this._internal_unstable.lists.removeIDFromAllLists(id);
71409
- this._internal_unstable.storage.delete(id);
71398
+ this._internal_unstable.lists.removeIDFromAllLists(id, layer);
71399
+ this._internal_unstable.storage.delete(id, layer);
71410
71400
  }
71411
71401
  setConfig(config2) {
71412
71402
  this._internal_unstable.setConfig(config2);
@@ -71438,6 +71428,70 @@ var Cache = class {
71438
71428
  config() {
71439
71429
  return this._internal_unstable.config;
71440
71430
  }
71431
+ clearLayer(layerID) {
71432
+ const layer = this._internal_unstable.storage.getLayer(layerID);
71433
+ if (!layer) {
71434
+ throw new Error("Cannot find layer with id: " + layerID);
71435
+ }
71436
+ const toNotify = [];
71437
+ const allFields = [];
71438
+ for (const target of [layer.fields, layer.links]) {
71439
+ for (const [id, fields] of Object.entries(target)) {
71440
+ allFields.push(
71441
+ ...Object.entries(fields).map(([field, value]) => ({ id, field, value }))
71442
+ );
71443
+ }
71444
+ }
71445
+ const displayFields = [];
71446
+ for (const pair of allFields) {
71447
+ const { displayLayers } = this._internal_unstable.storage.get(pair.id, pair.field);
71448
+ if (!displayLayers.includes(layerID)) {
71449
+ continue;
71450
+ }
71451
+ displayFields.push(pair);
71452
+ }
71453
+ for (const [id, operation] of Object.entries(layer.operations)) {
71454
+ if (operation.deleted) {
71455
+ displayFields.push(
71456
+ ...this._internal_unstable.subscriptions.activeFields(id).map((field) => ({ id, field }))
71457
+ );
71458
+ }
71459
+ const fields = Object.keys(operation.fields ?? {});
71460
+ if (fields.length > 0) {
71461
+ displayFields.push(...fields.map((field) => ({ id, field })));
71462
+ }
71463
+ }
71464
+ layer.clear();
71465
+ for (const display of displayFields) {
71466
+ const { field, id } = display;
71467
+ const notify = !("value" in display) || this._internal_unstable.storage.get(id, field).value !== display.value;
71468
+ if (notify) {
71469
+ toNotify.push(
71470
+ ...this._internal_unstable.subscriptions.get(id, field).map((sub) => sub[0])
71471
+ );
71472
+ }
71473
+ }
71474
+ this.#notifySubscribers(toNotify);
71475
+ }
71476
+ #notifySubscribers(subs) {
71477
+ if (subs.length === 0) {
71478
+ return;
71479
+ }
71480
+ const notified = [];
71481
+ for (const spec of subs) {
71482
+ if (!notified.includes(spec.set)) {
71483
+ notified.push(spec.set);
71484
+ spec.set(
71485
+ this._internal_unstable.getSelection({
71486
+ parent: spec.parentID || rootID,
71487
+ selection: spec.selection,
71488
+ variables: spec.variables?.() || {},
71489
+ ignoreMasking: false
71490
+ }).data
71491
+ );
71492
+ }
71493
+ }
71494
+ }
71441
71495
  };
71442
71496
  var CacheInternal = class {
71443
71497
  _disabled = false;
@@ -71725,8 +71779,16 @@ var CacheInternal = class {
71725
71779
  operation.position || "last",
71726
71780
  layer
71727
71781
  );
71782
+ } else if (operation.action === "toggle" && target instanceof Object && fieldSelection && operation.list) {
71783
+ this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).toggleElement({
71784
+ selection: fieldSelection,
71785
+ data: target,
71786
+ variables,
71787
+ where: operation.position || "last",
71788
+ layer
71789
+ });
71728
71790
  } else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
71729
- this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).remove(target, variables);
71791
+ this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).remove(target, variables, layer);
71730
71792
  } else if (operation.action === "delete" && operation.type) {
71731
71793
  if (typeof target !== "string") {
71732
71794
  throw new Error("Cannot delete a record with a non-string ID");
@@ -71735,15 +71797,7 @@ var CacheInternal = class {
71735
71797
  if (!targetID) {
71736
71798
  continue;
71737
71799
  }
71738
- this.cache.delete(targetID);
71739
- } else if (operation.action === "toggle" && target instanceof Object && fieldSelection && operation.list) {
71740
- this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).toggleElement({
71741
- selection: fieldSelection,
71742
- data: target,
71743
- variables,
71744
- where: operation.position || "last",
71745
- layer
71746
- });
71800
+ this.cache.delete(targetID, layer);
71747
71801
  }
71748
71802
  }
71749
71803
  }
@@ -72278,7 +72332,7 @@ var fragment = documentPlugin(ArtifactKind.Fragment, function() {
72278
72332
  var mutation = documentPlugin(ArtifactKind.Mutation, () => {
72279
72333
  return {
72280
72334
  async start(ctx, { next, marshalVariables }) {
72281
- const layer = cache_default._internal_unstable.storage.createLayer(true);
72335
+ const layerOptimistic = cache_default._internal_unstable.storage.createLayer(true);
72282
72336
  const optimisticResponse = ctx.stuff.optimisticResponse;
72283
72337
  let toNotify = [];
72284
72338
  if (optimisticResponse) {
@@ -72289,25 +72343,29 @@ var mutation = documentPlugin(ArtifactKind.Mutation, () => {
72289
72343
  data: optimisticResponse
72290
72344
  }),
72291
72345
  variables: marshalVariables(ctx),
72292
- layer: layer.id
72346
+ layer: layerOptimistic.id
72293
72347
  });
72294
72348
  }
72295
72349
  ctx.cacheParams = {
72296
72350
  ...ctx.cacheParams,
72297
- layer,
72351
+ layer: layerOptimistic,
72298
72352
  notifySubscribers: toNotify,
72299
72353
  forceNotify: true
72300
72354
  };
72301
72355
  next(ctx);
72302
72356
  },
72303
72357
  afterNetwork(ctx, { resolve: resolve2 }) {
72304
- ctx.cacheParams?.layer?.clear();
72358
+ if (ctx.cacheParams?.layer) {
72359
+ cache_default.clearLayer(ctx.cacheParams.layer.id);
72360
+ }
72305
72361
  resolve2(ctx);
72306
72362
  },
72307
72363
  end(ctx, { resolve: resolve2, value }) {
72308
72364
  const hasErrors = value.errors && value.errors.length > 0;
72309
72365
  if (hasErrors) {
72310
- ctx.cacheParams?.layer?.clear();
72366
+ if (ctx.cacheParams?.layer) {
72367
+ cache_default.clearLayer(ctx.cacheParams.layer.id);
72368
+ }
72311
72369
  }
72312
72370
  if (ctx.cacheParams?.layer) {
72313
72371
  cache_default._internal_unstable.storage.resolveLayer(ctx.cacheParams.layer.id);
@@ -72317,7 +72375,7 @@ var mutation = documentPlugin(ArtifactKind.Mutation, () => {
72317
72375
  catch(ctx, { error }) {
72318
72376
  if (ctx.cacheParams?.layer) {
72319
72377
  const { layer } = ctx.cacheParams;
72320
- layer.clear();
72378
+ cache_default.clearLayer(layer.id);
72321
72379
  cache_default._internal_unstable.storage.resolveLayer(layer.id);
72322
72380
  }
72323
72381
  throw error;
@@ -73672,18 +73730,14 @@ function flattenSelections({
73672
73730
  filepath,
73673
73731
  selections,
73674
73732
  fragmentDefinitions,
73675
- ignoreMaskDisable,
73676
- keepFragmentSpreadNodes,
73677
- hoistFragments
73733
+ applyFragments
73678
73734
  }) {
73679
73735
  const fields = new FieldCollection({
73680
73736
  config: config2,
73681
73737
  filepath,
73682
73738
  selections,
73683
73739
  fragmentDefinitions,
73684
- ignoreMaskDisable: !!ignoreMaskDisable,
73685
- keepFragmentSpreadNodes: !!keepFragmentSpreadNodes,
73686
- hoistFragments
73740
+ applyFragments: !!applyFragments
73687
73741
  });
73688
73742
  return fields.toSelectionSet();
73689
73743
  }
@@ -73694,18 +73748,14 @@ var FieldCollection = class {
73694
73748
  fields;
73695
73749
  inlineFragments;
73696
73750
  fragmentSpreads;
73697
- ignoreMaskDisable;
73698
- keepFragmentSpreadNodes;
73699
- hoistFragments;
73751
+ applyFragments;
73700
73752
  constructor(args) {
73701
73753
  this.config = args.config;
73702
73754
  this.fragmentDefinitions = args.fragmentDefinitions;
73703
- this.ignoreMaskDisable = args.ignoreMaskDisable;
73704
- this.keepFragmentSpreadNodes = args.keepFragmentSpreadNodes;
73755
+ this.applyFragments = args.applyFragments;
73705
73756
  this.fields = {};
73706
73757
  this.inlineFragments = {};
73707
73758
  this.fragmentSpreads = {};
73708
- this.hoistFragments = !!args.hoistFragments;
73709
73759
  this.filepath = args.filepath;
73710
73760
  for (const selection of args.selections) {
73711
73761
  this.add({ selection });
@@ -73715,21 +73765,18 @@ var FieldCollection = class {
73715
73765
  return Object.keys(this.fields).length + Object.keys(this.inlineFragments).length + Object.keys(this.fragmentSpreads).length;
73716
73766
  }
73717
73767
  add({ selection, external }) {
73718
- let includeFragments = this.config.defaultFragmentMasking === "disable";
73768
+ let include = this.config.defaultFragmentMasking === "disable";
73719
73769
  const maskEnableDirective = selection.directives?.find(
73720
73770
  ({ name }) => name.value === this.config.maskEnableDirective
73721
73771
  );
73722
73772
  if (maskEnableDirective) {
73723
- includeFragments = false;
73773
+ include = false;
73724
73774
  }
73725
73775
  const maskDisableDirective = selection.directives?.find(
73726
73776
  ({ name }) => name.value === this.config.maskDisableDirective
73727
73777
  );
73728
73778
  if (maskDisableDirective) {
73729
- includeFragments = true;
73730
- }
73731
- if (this.ignoreMaskDisable) {
73732
- includeFragments = true;
73779
+ include = true;
73733
73780
  }
73734
73781
  if (selection.kind === "Field") {
73735
73782
  const key = selection.alias?.value || selection.name.value;
@@ -73745,7 +73792,7 @@ var FieldCollection = class {
73745
73792
  external
73746
73793
  });
73747
73794
  }
73748
- if (!external && includeFragments) {
73795
+ if (this.applyFragments && !external) {
73749
73796
  this.fields[key].selection.fragmentSpreads = {
73750
73797
  ...this.collectFragmentSpreads(selection.selectionSet?.selections ?? []),
73751
73798
  ...this.fields[key].selection.fragmentSpreads
@@ -73759,16 +73806,13 @@ var FieldCollection = class {
73759
73806
  }
73760
73807
  }
73761
73808
  if (selection.kind === "InlineFragment" && selection.typeCondition) {
73762
- this.walkInlineFragment({ selection, external, hoistFragments: this.hoistFragments });
73809
+ this.walkInlineFragment({ selection, external });
73763
73810
  return;
73764
73811
  }
73765
73812
  if (selection.kind === "FragmentSpread") {
73766
- if (this.keepFragmentSpreadNodes && !external) {
73813
+ if (!external || include) {
73767
73814
  this.fragmentSpreads[selection.name.value] = selection;
73768
73815
  }
73769
- if (!includeFragments) {
73770
- return;
73771
- }
73772
73816
  const definition = this.fragmentDefinitions[selection.name.value];
73773
73817
  if (!definition) {
73774
73818
  throw new HoudiniError({
@@ -73776,23 +73820,25 @@ var FieldCollection = class {
73776
73820
  message: "Could not find referenced fragment definition: " + selection.name.value + "\n" + JSON.stringify(Object.keys(this.fragmentDefinitions), null, 4)
73777
73821
  });
73778
73822
  }
73779
- this.add({
73780
- selection: {
73781
- kind: "InlineFragment",
73782
- typeCondition: {
73783
- kind: "NamedType",
73784
- name: {
73785
- kind: "Name",
73786
- value: definition.typeCondition.name.value
73823
+ if (this.applyFragments || include) {
73824
+ this.add({
73825
+ selection: {
73826
+ kind: "InlineFragment",
73827
+ typeCondition: {
73828
+ kind: "NamedType",
73829
+ name: {
73830
+ kind: "Name",
73831
+ value: definition.typeCondition.name.value
73832
+ }
73833
+ },
73834
+ selectionSet: {
73835
+ kind: "SelectionSet",
73836
+ selections: [...definition.selectionSet.selections]
73787
73837
  }
73788
73838
  },
73789
- selectionSet: {
73790
- kind: "SelectionSet",
73791
- selections: [...definition.selectionSet.selections]
73792
- }
73793
- },
73794
- external
73795
- });
73839
+ external: !include
73840
+ });
73841
+ }
73796
73842
  }
73797
73843
  }
73798
73844
  collectFragmentSpreads(selections, result = {}) {
@@ -73849,8 +73895,7 @@ var FieldCollection = class {
73849
73895
  }
73850
73896
  walkInlineFragment({
73851
73897
  selection,
73852
- external,
73853
- hoistFragments
73898
+ external
73854
73899
  }) {
73855
73900
  const key = selection.typeCondition.name.value;
73856
73901
  if (!this.inlineFragments[key]) {
@@ -73860,7 +73905,7 @@ var FieldCollection = class {
73860
73905
  };
73861
73906
  }
73862
73907
  for (const subselect of selection.selectionSet.selections || []) {
73863
- if (subselect.kind === "FragmentSpread" && !hoistFragments || subselect.kind === "Field" || subselect.kind === "InlineFragment" && !subselect.typeCondition) {
73908
+ if (subselect.kind === "Field" || subselect.kind === "InlineFragment" && !subselect.typeCondition) {
73864
73909
  this.inlineFragments[key].selection.add({
73865
73910
  selection: subselect,
73866
73911
  external
@@ -73869,11 +73914,11 @@ var FieldCollection = class {
73869
73914
  } else if (subselect.kind === "FragmentSpread") {
73870
73915
  this.add({
73871
73916
  selection: subselect,
73872
- external: true
73917
+ external
73873
73918
  });
73874
73919
  continue;
73875
73920
  } else {
73876
- this.walkInlineFragment({ selection: subselect, external, hoistFragments });
73921
+ this.walkInlineFragment({ selection: subselect, external });
73877
73922
  }
73878
73923
  }
73879
73924
  }
@@ -73883,9 +73928,7 @@ var FieldCollection = class {
73883
73928
  fragmentDefinitions: this.fragmentDefinitions,
73884
73929
  selections: [],
73885
73930
  filepath: this.filepath,
73886
- ignoreMaskDisable: this.ignoreMaskDisable,
73887
- keepFragmentSpreadNodes: this.keepFragmentSpreadNodes,
73888
- hoistFragments: this.hoistFragments
73931
+ applyFragments: this.applyFragments
73889
73932
  });
73890
73933
  }
73891
73934
  };
@@ -74814,7 +74857,7 @@ function operationObject({
74814
74857
  if (operationKind === "insert" || operationKind === "toggle") {
74815
74858
  operation.position = position;
74816
74859
  }
74817
- if (operationKind === "insert" && allLists) {
74860
+ if (allLists && operationKind !== "delete") {
74818
74861
  operation.target = "all";
74819
74862
  }
74820
74863
  if (parentID) {
@@ -75805,7 +75848,8 @@ function prepareSelection({
75805
75848
  inConnection,
75806
75849
  typeMap,
75807
75850
  abstractTypes,
75808
- globalLoading
75851
+ globalLoading,
75852
+ includeFragments
75809
75853
  }) {
75810
75854
  let object = {};
75811
75855
  const loadingTypes = [];
@@ -75825,7 +75869,8 @@ function prepareSelection({
75825
75869
  document,
75826
75870
  typeMap,
75827
75871
  abstractTypes,
75828
- globalLoading
75872
+ globalLoading,
75873
+ includeFragments
75829
75874
  }).fields || {}
75830
75875
  );
75831
75876
  } else {
@@ -75873,7 +75918,8 @@ function prepareSelection({
75873
75918
  document,
75874
75919
  typeMap,
75875
75920
  abstractTypes,
75876
- globalLoading
75921
+ globalLoading,
75922
+ includeFragments
75877
75923
  }).fields
75878
75924
  };
75879
75925
  if (field.directives?.find((d) => d.name.value === config2.loadingDirective)) {
@@ -75991,7 +76037,8 @@ function prepareSelection({
75991
76037
  inConnection: connectionState,
75992
76038
  typeMap,
75993
76039
  abstractTypes,
75994
- globalLoading: forceLoading
76040
+ globalLoading: forceLoading,
76041
+ includeFragments
75995
76042
  });
75996
76043
  if (Object.values(fieldObj.selection.fields ?? {}).some((field2) => field2.required)) {
75997
76044
  fieldObj.nullable = true;
@@ -76324,14 +76371,13 @@ function artifactGenerator(stats) {
76324
76371
  document: doc,
76325
76372
  rootType,
76326
76373
  globalLoading,
76374
+ includeFragments: doc.kind !== ArtifactKind.Fragment,
76327
76375
  selections: flattenSelections({
76328
76376
  config: config2,
76329
76377
  filepath: doc.filename,
76330
76378
  selections: selectionSet.selections,
76331
76379
  fragmentDefinitions,
76332
- ignoreMaskDisable: docKind !== "HoudiniFragment",
76333
- keepFragmentSpreadNodes: true,
76334
- hoistFragments: true
76380
+ applyFragments: doc.kind !== ArtifactKind.Fragment
76335
76381
  }),
76336
76382
  operations: operationsByPath(
76337
76383
  config2,
@@ -77296,8 +77342,7 @@ async function generateDocumentTypes(config2, docs) {
77296
77342
  config: config2,
77297
77343
  filepath: filename,
77298
77344
  selections: definition.selectionSet.selections,
77299
- fragmentDefinitions,
77300
- keepFragmentSpreadNodes: true
77345
+ fragmentDefinitions
77301
77346
  });
77302
77347
  if (definition?.kind === "OperationDefinition") {
77303
77348
  await generateOperationTypeDefs(
@@ -80067,8 +80112,8 @@ async function updatePackageJSON(targetPath) {
80067
80112
  }
80068
80113
  packageJSON.devDependencies = {
80069
80114
  ...packageJSON.devDependencies,
80070
- houdini: "^1.2.1",
80071
- "houdini-svelte": "^1.2.1"
80115
+ houdini: "^1.2.3",
80116
+ "houdini-svelte": "^1.2.3"
80072
80117
  };
80073
80118
  await fs_exports.writeFile(packagePath, JSON.stringify(packageJSON, null, 4));
80074
80119
  }