houdini 1.2.44 → 1.2.46

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 (55) hide show
  1. package/build/cmd-cjs/index.js +664 -848
  2. package/build/cmd-esm/index.js +514 -698
  3. package/build/codegen/generators/comments/jsdoc.d.ts +2 -0
  4. package/build/codegen-cjs/index.js +662 -846
  5. package/build/codegen-esm/index.js +512 -696
  6. package/build/lib/graphql.d.ts +1 -1
  7. package/build/lib/index.d.ts +1 -0
  8. package/build/lib/typescript.d.ts +19 -0
  9. package/build/lib-cjs/index.js +726 -467
  10. package/build/lib-esm/index.js +720 -467
  11. package/build/runtime/client/index.d.ts +7 -1
  12. package/build/runtime/client/plugins/fragment.d.ts +2 -2
  13. package/build/runtime/client/plugins/mutation.d.ts +2 -1
  14. package/build/runtime/client/plugins/query.d.ts +2 -2
  15. package/build/runtime/lib/scalars.d.ts +1 -1
  16. package/build/runtime/lib/types.d.ts +13 -2
  17. package/build/runtime/router/match.d.ts +3 -2
  18. package/build/runtime/router/types.d.ts +3 -1
  19. package/build/runtime-cjs/client/index.d.ts +7 -1
  20. package/build/runtime-cjs/client/index.js +26 -11
  21. package/build/runtime-cjs/client/plugins/fragment.d.ts +2 -2
  22. package/build/runtime-cjs/client/plugins/fragment.js +4 -11
  23. package/build/runtime-cjs/client/plugins/mutation.d.ts +2 -1
  24. package/build/runtime-cjs/client/plugins/mutation.js +8 -15
  25. package/build/runtime-cjs/client/plugins/query.d.ts +2 -2
  26. package/build/runtime-cjs/client/plugins/query.js +4 -11
  27. package/build/runtime-cjs/lib/scalars.d.ts +1 -1
  28. package/build/runtime-cjs/lib/scalars.js +4 -0
  29. package/build/runtime-cjs/lib/types.d.ts +13 -2
  30. package/build/runtime-cjs/router/match.d.ts +3 -2
  31. package/build/runtime-cjs/router/match.js +11 -2
  32. package/build/runtime-cjs/router/server.js +1 -1
  33. package/build/runtime-cjs/router/types.d.ts +3 -1
  34. package/build/runtime-esm/client/index.d.ts +7 -1
  35. package/build/runtime-esm/client/index.js +26 -11
  36. package/build/runtime-esm/client/plugins/fragment.d.ts +2 -2
  37. package/build/runtime-esm/client/plugins/fragment.js +1 -2
  38. package/build/runtime-esm/client/plugins/mutation.d.ts +2 -1
  39. package/build/runtime-esm/client/plugins/mutation.js +1 -2
  40. package/build/runtime-esm/client/plugins/query.d.ts +2 -2
  41. package/build/runtime-esm/client/plugins/query.js +1 -2
  42. package/build/runtime-esm/lib/scalars.d.ts +1 -1
  43. package/build/runtime-esm/lib/scalars.js +6 -0
  44. package/build/runtime-esm/lib/types.d.ts +13 -2
  45. package/build/runtime-esm/router/match.d.ts +3 -2
  46. package/build/runtime-esm/router/match.js +11 -2
  47. package/build/runtime-esm/router/server.js +1 -1
  48. package/build/runtime-esm/router/types.d.ts +3 -1
  49. package/build/test-cjs/index.js +677 -844
  50. package/build/test-esm/index.js +527 -694
  51. package/build/vite-cjs/index.js +786 -857
  52. package/build/vite-esm/index.js +636 -707
  53. package/package.json +1 -1
  54. package/build/codegen/generators/typescript/typeReference.d.ts +0 -8
  55. package/build/codegen/generators/typescript/types.d.ts +0 -10
@@ -53827,11 +53827,11 @@ __export(test_exports, {
53827
53827
  testConfigFile: () => testConfigFile
53828
53828
  });
53829
53829
  module.exports = __toCommonJS(test_exports);
53830
- var graphql34 = __toESM(require("graphql"), 1);
53830
+ var graphql33 = __toESM(require("graphql"), 1);
53831
53831
  var import_memfs2 = __toESM(require_lib(), 1);
53832
53832
 
53833
53833
  // src/codegen/index.ts
53834
- var graphql33 = __toESM(require("graphql"), 1);
53834
+ var graphql32 = __toESM(require("graphql"), 1);
53835
53835
 
53836
53836
  // src/lib/pipeline.ts
53837
53837
  async function runPipeline(config, pipeline, target) {
@@ -53975,47 +53975,6 @@ function deepMerge(...objects) {
53975
53975
  return mergedObj;
53976
53976
  }
53977
53977
 
53978
- // src/runtime/lib/scalars.ts
53979
- async function marshalSelection({
53980
- selection,
53981
- data
53982
- }) {
53983
- const config = getCurrentConfig();
53984
- if (data === null || typeof data === "undefined") {
53985
- return data;
53986
- }
53987
- if (Array.isArray(data)) {
53988
- return await Promise.all(data.map((val) => marshalSelection({ selection, data: val })));
53989
- }
53990
- const targetSelection = getFieldsForType(selection, data["__typename"], false);
53991
- return Object.fromEntries(
53992
- await Promise.all(
53993
- Object.entries(data).map(async ([fieldName, value]) => {
53994
- const { type, selection: selection2 } = targetSelection[fieldName];
53995
- if (!type) {
53996
- return [fieldName, value];
53997
- }
53998
- if (selection2) {
53999
- return [fieldName, await marshalSelection({ selection: selection2, data: value })];
54000
- }
54001
- if (config.scalars?.[type]) {
54002
- const marshalFn = config.scalars[type].marshal;
54003
- if (!marshalFn) {
54004
- throw new Error(
54005
- `scalar type ${type} is missing a \`marshal\` function. see https://github.com/AlecAivazis/houdini#%EF%B8%8Fcustom-scalars`
54006
- );
54007
- }
54008
- if (Array.isArray(value)) {
54009
- return [fieldName, value.map(marshalFn)];
54010
- }
54011
- return [fieldName, marshalFn(value)];
54012
- }
54013
- return [fieldName, value];
54014
- })
54015
- )
54016
- );
54017
- }
54018
-
54019
53978
  // src/runtime/lib/types.ts
54020
53979
  var CachePolicy = {
54021
53980
  CacheOrNetwork: "CacheOrNetwork",
@@ -54043,11 +54002,6 @@ var RefetchUpdateMode = {
54043
54002
  prepend: "prepend",
54044
54003
  replace: "replace"
54045
54004
  };
54046
- var DataSource = {
54047
- Cache: "cache",
54048
- Network: "network",
54049
- Ssr: "ssr"
54050
- };
54051
54005
  var fragmentKey = " $fragments";
54052
54006
  var PendingValue = Symbol("houdini_loading");
54053
54007
 
@@ -56669,202 +56623,6 @@ var cache_default = new Cache();
56669
56623
  // src/runtime/client/plugins/cache.ts
56670
56624
  var serverSide = typeof globalThis.window === "undefined";
56671
56625
 
56672
- // src/runtime/client/utils/documentPlugins.ts
56673
- var documentPlugin = (kind, source) => {
56674
- return () => {
56675
- const sourceHandlers = source();
56676
- const enterWrapper = (handler) => {
56677
- return !handler ? void 0 : (ctx, handlers) => {
56678
- if (ctx.artifact.kind !== kind) {
56679
- return handlers.next(ctx);
56680
- }
56681
- return handler(ctx, handlers);
56682
- };
56683
- };
56684
- const exitWrapper = (handler) => {
56685
- return !handler ? void 0 : (ctx, handlers) => {
56686
- if (ctx.artifact.kind !== kind) {
56687
- return handlers.resolve(ctx);
56688
- }
56689
- return handler(ctx, handlers);
56690
- };
56691
- };
56692
- return {
56693
- start: enterWrapper(sourceHandlers.start),
56694
- network: enterWrapper(sourceHandlers.network),
56695
- afterNetwork: exitWrapper(sourceHandlers.afterNetwork),
56696
- end: exitWrapper(sourceHandlers.end),
56697
- catch: sourceHandlers.catch ? (ctx, handlers) => sourceHandlers.catch(ctx, handlers) : void 0,
56698
- cleanup: (...args) => sourceHandlers.cleanup?.(...args)
56699
- };
56700
- };
56701
- };
56702
-
56703
- // src/runtime/client/plugins/query.ts
56704
- var query = documentPlugin(ArtifactKind.Query, function() {
56705
- let subscriptionSpec = null;
56706
- let lastVariables = null;
56707
- return {
56708
- start(ctx, { next }) {
56709
- const runtimeScalarPayload = {
56710
- session: ctx.session
56711
- };
56712
- ctx.variables = {
56713
- ...lastVariables,
56714
- ...Object.fromEntries(
56715
- Object.entries(ctx.artifact.input?.runtimeScalars ?? {}).map(
56716
- ([field, type]) => {
56717
- const runtimeScalar = ctx.config.features?.runtimeScalars?.[type];
56718
- if (!runtimeScalar) {
56719
- return [field, type];
56720
- }
56721
- return [field, runtimeScalar.resolve(runtimeScalarPayload)];
56722
- }
56723
- )
56724
- ),
56725
- ...ctx.variables
56726
- };
56727
- next(ctx);
56728
- },
56729
- end(ctx, { resolve: resolve2, marshalVariables, variablesChanged }) {
56730
- if (variablesChanged(ctx) && !ctx.cacheParams?.disableSubscriptions) {
56731
- if (subscriptionSpec) {
56732
- cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
56733
- }
56734
- lastVariables = { ...marshalVariables(ctx) };
56735
- const variables = lastVariables;
56736
- subscriptionSpec = {
56737
- rootType: ctx.artifact.rootType,
56738
- selection: ctx.artifact.selection,
56739
- variables: () => variables,
56740
- set: (newValue) => {
56741
- resolve2(ctx, {
56742
- data: newValue,
56743
- errors: null,
56744
- fetching: false,
56745
- partial: false,
56746
- stale: false,
56747
- source: DataSource.Cache,
56748
- variables: ctx.variables ?? {}
56749
- });
56750
- }
56751
- };
56752
- cache_default.subscribe(subscriptionSpec, lastVariables);
56753
- }
56754
- resolve2(ctx);
56755
- },
56756
- cleanup() {
56757
- if (subscriptionSpec) {
56758
- cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.());
56759
- lastVariables = null;
56760
- }
56761
- }
56762
- };
56763
- });
56764
-
56765
- // src/runtime/client/plugins/fragment.ts
56766
- var fragment = documentPlugin(ArtifactKind.Fragment, function() {
56767
- let subscriptionSpec = null;
56768
- let lastReference = null;
56769
- return {
56770
- start(ctx, { next, resolve: resolve2, variablesChanged, marshalVariables }) {
56771
- if (!ctx.stuff.parentID) {
56772
- return next(ctx);
56773
- }
56774
- const currentReference = {
56775
- parent: ctx.stuff.parentID,
56776
- variables: marshalVariables(ctx)
56777
- };
56778
- if (!ctx.cacheParams?.disableSubscriptions && (!deepEquals(lastReference, currentReference) || variablesChanged(ctx))) {
56779
- if (subscriptionSpec) {
56780
- cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
56781
- }
56782
- const variables = marshalVariables(ctx);
56783
- subscriptionSpec = {
56784
- rootType: ctx.artifact.rootType,
56785
- selection: ctx.artifact.selection,
56786
- variables: () => variables,
56787
- parentID: ctx.stuff.parentID,
56788
- set: (newValue) => {
56789
- resolve2(ctx, {
56790
- data: newValue,
56791
- errors: null,
56792
- fetching: false,
56793
- partial: false,
56794
- stale: false,
56795
- source: DataSource.Cache,
56796
- variables
56797
- });
56798
- }
56799
- };
56800
- cache_default.subscribe(subscriptionSpec, variables);
56801
- lastReference = currentReference;
56802
- }
56803
- next(ctx);
56804
- },
56805
- cleanup() {
56806
- if (subscriptionSpec) {
56807
- cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.());
56808
- }
56809
- }
56810
- };
56811
- });
56812
-
56813
- // src/runtime/client/plugins/mutation.ts
56814
- var mutation = documentPlugin(ArtifactKind.Mutation, () => {
56815
- return {
56816
- async start(ctx, { next, marshalVariables }) {
56817
- const layerOptimistic = cache_default._internal_unstable.storage.createLayer(true);
56818
- const optimisticResponse = ctx.stuff.optimisticResponse;
56819
- let toNotify = [];
56820
- if (optimisticResponse) {
56821
- toNotify = cache_default.write({
56822
- selection: ctx.artifact.selection,
56823
- data: await marshalSelection({
56824
- selection: ctx.artifact.selection,
56825
- data: optimisticResponse
56826
- }),
56827
- variables: marshalVariables(ctx),
56828
- layer: layerOptimistic.id
56829
- });
56830
- }
56831
- ctx.cacheParams = {
56832
- ...ctx.cacheParams,
56833
- layer: layerOptimistic,
56834
- notifySubscribers: toNotify,
56835
- forceNotify: true
56836
- };
56837
- next(ctx);
56838
- },
56839
- afterNetwork(ctx, { resolve: resolve2 }) {
56840
- if (ctx.cacheParams?.layer) {
56841
- cache_default.clearLayer(ctx.cacheParams.layer.id);
56842
- }
56843
- resolve2(ctx);
56844
- },
56845
- end(ctx, { resolve: resolve2, value }) {
56846
- const hasErrors = value.errors && value.errors.length > 0;
56847
- if (hasErrors) {
56848
- if (ctx.cacheParams?.layer) {
56849
- cache_default.clearLayer(ctx.cacheParams.layer.id);
56850
- }
56851
- }
56852
- if (ctx.cacheParams?.layer) {
56853
- cache_default._internal_unstable.storage.resolveLayer(ctx.cacheParams.layer.id);
56854
- }
56855
- resolve2(ctx);
56856
- },
56857
- catch(ctx, { error }) {
56858
- if (ctx.cacheParams?.layer) {
56859
- const { layer } = ctx.cacheParams;
56860
- cache_default.clearLayer(layer.id);
56861
- cache_default._internal_unstable.storage.resolveLayer(layer.id);
56862
- }
56863
- throw error;
56864
- }
56865
- };
56866
- });
56867
-
56868
56626
  // src/lib/types.ts
56869
56627
  var LogLevel = {
56870
56628
  Full: "full",
@@ -57640,7 +57398,7 @@ function definitionFromAncestors(ancestors) {
57640
57398
  }
57641
57399
  return { parents, definition };
57642
57400
  }
57643
- function unwrapType(config, type, wrappers = []) {
57401
+ function unwrapType(config, type, wrappers = [], convertRuntimeScalars) {
57644
57402
  if (type.kind === "NonNullType") {
57645
57403
  return unwrapType(config, type.type, [TypeWrapper.NonNull, ...wrappers]);
57646
57404
  }
@@ -57656,6 +57414,11 @@ function unwrapType(config, type, wrappers = []) {
57656
57414
  if (type instanceof graphql3.GraphQLList) {
57657
57415
  return unwrapType(config, type.ofType, [TypeWrapper.List, ...wrappers]);
57658
57416
  }
57417
+ if (convertRuntimeScalars && config.configFile.features?.runtimeScalars?.[type.name.value]) {
57418
+ type = config.schema.getType(
57419
+ config.configFile.features?.runtimeScalars?.[type.name.value].type
57420
+ );
57421
+ }
57659
57422
  const namedType = config.schema.getType(type.name.value || type.name);
57660
57423
  if (!namedType) {
57661
57424
  throw new Error("Unknown type: " + type.name.value || type.name);
@@ -57723,7 +57486,12 @@ function deepMerge2(filepath, ...targets) {
57723
57486
  // src/lib/parse.ts
57724
57487
  function parseJS(str, config) {
57725
57488
  const defaultConfig = {
57726
- plugins: ["typescript", "importAssertions", "decorators-legacy"],
57489
+ plugins: [
57490
+ "typescript",
57491
+ "importAssertions",
57492
+ "decorators-legacy",
57493
+ "explicitResourceManagement"
57494
+ ],
57727
57495
  sourceType: "module"
57728
57496
  };
57729
57497
  return (0, import_parser.parse)(str || "", config ? deepMerge2("", defaultConfig, config) : defaultConfig).program;
@@ -57795,16 +57563,162 @@ async function cleanupFiles(pathFolder, listOfObj) {
57795
57563
  return allFilesNotInList;
57796
57564
  }
57797
57565
 
57798
- // src/lib/walk.ts
57566
+ // src/lib/typescript.ts
57799
57567
  var graphql4 = __toESM(require("graphql"), 1);
57568
+ var recast2 = __toESM(require_main2(), 1);
57569
+ var AST2 = recast2.types.builders;
57570
+ function unwrappedTsTypeReference(config, filepath, missingScalars, {
57571
+ type,
57572
+ wrappers
57573
+ }, body) {
57574
+ let result;
57575
+ if (graphql4.isScalarType(type)) {
57576
+ result = scalarPropertyValue(config, filepath, missingScalars, type, body, null);
57577
+ } else if (graphql4.isEnumType(type)) {
57578
+ result = enumReference(config, body, type.name);
57579
+ } else {
57580
+ result = AST2.tsTypeReference(AST2.identifier(type.name));
57581
+ }
57582
+ for (const toWrap of wrappers) {
57583
+ if (toWrap === "NonNull" /* NonNull */) {
57584
+ continue;
57585
+ } else if (toWrap === "Nullable" /* Nullable */) {
57586
+ result = nullableField(result, true);
57587
+ } else if (toWrap === "List" /* List */) {
57588
+ result = AST2.tsArrayType(AST2.tsParenthesizedType(result));
57589
+ }
57590
+ }
57591
+ return result;
57592
+ }
57593
+ function tsTypeReference(config, filepath, missingScalars, definition, body) {
57594
+ const { type, wrappers } = unwrapType(config, definition.type);
57595
+ return unwrappedTsTypeReference(
57596
+ config,
57597
+ filepath,
57598
+ missingScalars,
57599
+ { type, wrappers },
57600
+ body
57601
+ );
57602
+ }
57603
+ function enumReference(config, body, name) {
57604
+ ensureImports({
57605
+ config,
57606
+ body,
57607
+ import: ["ValueOf"],
57608
+ importKind: "type",
57609
+ sourceModule: "$houdini/runtime/lib/types"
57610
+ });
57611
+ return AST2.tsTypeReference(
57612
+ AST2.identifier("ValueOf"),
57613
+ AST2.tsTypeParameterInstantiation([AST2.tsTypeQuery(AST2.identifier(name))])
57614
+ );
57615
+ }
57616
+ function readonlyProperty(prop, enable = true) {
57617
+ if (enable) {
57618
+ prop.readonly = true;
57619
+ }
57620
+ return prop;
57621
+ }
57622
+ function nullableField(inner, input = false) {
57623
+ const members = [inner, AST2.tsNullKeyword()];
57624
+ if (input) {
57625
+ members.push(AST2.tsUndefinedKeyword());
57626
+ }
57627
+ return AST2.tsUnionType(members);
57628
+ }
57629
+ function scalarPropertyValue(config, filepath, missingScalars, target, body, field) {
57630
+ if (config.configFile.features?.componentFields && target.name === config.componentScalar) {
57631
+ if (!field) {
57632
+ return AST2.tsNeverKeyword();
57633
+ }
57634
+ const component = config.componentFields[field.parent][field.field];
57635
+ const sourcePathRelative = path_exports.relative(
57636
+ path_exports.join(config.projectRoot, "src"),
57637
+ component.filepath
57638
+ );
57639
+ let sourcePathParsed = path_exports.parse(sourcePathRelative);
57640
+ let sourcePath = path_exports.join(sourcePathParsed.dir, sourcePathParsed.name);
57641
+ const localImport = ensureImports({
57642
+ config,
57643
+ body,
57644
+ import: "__component__" + component.fragment,
57645
+ sourceModule: path_exports.join(
57646
+ path_exports.relative(path_exports.dirname(filepath), config.projectRoot),
57647
+ "src",
57648
+ sourcePath
57649
+ )
57650
+ }) ?? "__component__" + component.fragment;
57651
+ const parameters = AST2.tsTypeReference(AST2.identifier("Parameters"));
57652
+ parameters.typeParameters = AST2.tsTypeParameterInstantiation([
57653
+ AST2.tsTypeQuery(AST2.identifier(localImport))
57654
+ ]);
57655
+ const indexed = AST2.tsIndexedAccessType(
57656
+ parameters,
57657
+ AST2.tsLiteralType(AST2.numericLiteral(0))
57658
+ );
57659
+ const omit = AST2.tsTypeReference(AST2.identifier("Omit"));
57660
+ omit.typeParameters = AST2.tsTypeParameterInstantiation([
57661
+ indexed,
57662
+ AST2.tsLiteralType(AST2.stringLiteral(component.prop))
57663
+ ]);
57664
+ const arg = AST2.identifier("props");
57665
+ arg.typeAnnotation = AST2.tsTypeAnnotation(omit);
57666
+ const returnType = AST2.tsTypeReference(AST2.identifier("ReturnType"));
57667
+ returnType.typeParameters = AST2.tsTypeParameterInstantiation([
57668
+ AST2.tsTypeQuery(AST2.identifier(localImport))
57669
+ ]);
57670
+ const fnType = AST2.tsFunctionType([arg]);
57671
+ fnType.typeAnnotation = AST2.tsTypeAnnotation(returnType);
57672
+ return fnType;
57673
+ }
57674
+ switch (target.name) {
57675
+ case "String": {
57676
+ return AST2.tsStringKeyword();
57677
+ }
57678
+ case "Int": {
57679
+ return AST2.tsNumberKeyword();
57680
+ }
57681
+ case "Float": {
57682
+ return AST2.tsNumberKeyword();
57683
+ }
57684
+ case "Boolean": {
57685
+ return AST2.tsBooleanKeyword();
57686
+ }
57687
+ case "ID": {
57688
+ return AST2.tsStringKeyword();
57689
+ }
57690
+ default: {
57691
+ if (graphql4.isNonNullType(target) && "ofType" in target) {
57692
+ return scalarPropertyValue(
57693
+ config,
57694
+ filepath,
57695
+ missingScalars,
57696
+ target.ofType,
57697
+ body,
57698
+ field
57699
+ );
57700
+ }
57701
+ if (config.scalars?.[target.name]) {
57702
+ return AST2.tsTypeReference(AST2.identifier(config.scalars?.[target.name].type));
57703
+ }
57704
+ if (target.name !== config.componentScalar) {
57705
+ missingScalars.add(target.name);
57706
+ }
57707
+ return AST2.tsAnyKeyword();
57708
+ }
57709
+ }
57710
+ }
57711
+
57712
+ // src/lib/walk.ts
57713
+ var graphql5 = __toESM(require("graphql"), 1);
57800
57714
 
57801
57715
  // src/lib/router/manifest.ts
57802
57716
  var t = __toESM(require_lib6(), 1);
57803
- var graphql5 = __toESM(require("graphql"), 1);
57717
+ var graphql6 = __toESM(require("graphql"), 1);
57804
57718
 
57805
57719
  // src/codegen/generators/artifacts/index.ts
57806
- var graphql16 = __toESM(require("graphql"), 1);
57807
- var recast4 = __toESM(require_main2(), 1);
57720
+ var graphql17 = __toESM(require("graphql"), 1);
57721
+ var recast5 = __toESM(require_main2(), 1);
57808
57722
 
57809
57723
  // src/codegen/utils/commonjs.ts
57810
57724
  var cjsIndexFilePreamble = `"use strict";
@@ -58046,19 +57960,19 @@ var FieldCollection = class {
58046
57960
  };
58047
57961
 
58048
57962
  // src/codegen/utils/moduleExport.ts
58049
- var recast2 = __toESM(require_main2(), 1);
58050
- var AST2 = recast2.types.builders;
57963
+ var recast3 = __toESM(require_main2(), 1);
57964
+ var AST3 = recast3.types.builders;
58051
57965
  function moduleExport(config, key, value) {
58052
57966
  if (config.module === "commonjs") {
58053
- let target = AST2.memberExpression(AST2.identifier("module"), AST2.identifier("exports"));
57967
+ let target = AST3.memberExpression(AST3.identifier("module"), AST3.identifier("exports"));
58054
57968
  if (key !== "default") {
58055
- target = AST2.memberExpression(target, AST2.identifier(key));
57969
+ target = AST3.memberExpression(target, AST3.identifier(key));
58056
57970
  }
58057
- return AST2.expressionStatement(AST2.assignmentExpression("=", target, value));
57971
+ return AST3.expressionStatement(AST3.assignmentExpression("=", target, value));
58058
57972
  }
58059
- return key === "default" ? AST2.exportDefaultDeclaration(value) : AST2.exportNamedDeclaration(
58060
- AST2.variableDeclaration("const", [
58061
- AST2.variableDeclarator(AST2.identifier(key), value)
57973
+ return key === "default" ? AST3.exportDefaultDeclaration(value) : AST3.exportNamedDeclaration(
57974
+ AST3.variableDeclaration("const", [
57975
+ AST3.variableDeclarator(AST3.identifier(key), value)
58062
57976
  ])
58063
57977
  );
58064
57978
  }
@@ -58315,7 +58229,7 @@ var serialize = (value, { json, lossy } = {}) => {
58315
58229
  var esm_default = typeof structuredClone === "function" ? (any, options) => options && ("json" in options || "lossy" in options) ? deserialize(serialize(any, options)) : structuredClone(any) : (any, options) => deserialize(serialize(any, options));
58316
58230
 
58317
58231
  // src/codegen/transforms/fragmentVariables.ts
58318
- var graphql7 = __toESM(require("graphql"), 1);
58232
+ var graphql8 = __toESM(require("graphql"), 1);
58319
58233
 
58320
58234
  // src/codegen/utils/stripLoc.ts
58321
58235
  function stripLoc(value) {
@@ -58336,13 +58250,13 @@ function stripLoc(value) {
58336
58250
  }
58337
58251
 
58338
58252
  // src/codegen/transforms/collectDefinitions.ts
58339
- var graphql6 = __toESM(require("graphql"), 1);
58340
- var import_graphql = require("graphql");
58253
+ var graphql7 = __toESM(require("graphql"), 1);
58254
+ var import_graphql2 = require("graphql");
58341
58255
  async function includeFragmentDefinitions(config, documents) {
58342
58256
  const fragments = collectDefinitions(config, documents);
58343
58257
  for (const [index, { name, document, filename }] of documents.entries()) {
58344
58258
  const operation = document.definitions.find(
58345
- (def) => def.kind === import_graphql.Kind.OPERATION_DEFINITION || def.kind === "FragmentDefinition"
58259
+ (def) => def.kind === import_graphql2.Kind.OPERATION_DEFINITION || def.kind === "FragmentDefinition"
58346
58260
  );
58347
58261
  if (!operation) {
58348
58262
  continue;
@@ -58386,10 +58300,10 @@ function collectDefinitions(config, docs) {
58386
58300
  }
58387
58301
  function findRequiredFragments(config, definition) {
58388
58302
  const referencedFragments = [];
58389
- const typeInfo = new graphql6.TypeInfo(config.schema);
58390
- definition.selectionSet = graphql6.visit(
58303
+ const typeInfo = new graphql7.TypeInfo(config.schema);
58304
+ definition.selectionSet = graphql7.visit(
58391
58305
  definition,
58392
- graphql6.visitWithTypeInfo(typeInfo, {
58306
+ graphql7.visitWithTypeInfo(typeInfo, {
58393
58307
  FragmentSpread(node) {
58394
58308
  referencedFragments.push(node.name.value);
58395
58309
  }
@@ -58423,7 +58337,7 @@ function flattenFragments(filepath, operation, fragments) {
58423
58337
  }
58424
58338
 
58425
58339
  // src/codegen/transforms/fragmentVariables.ts
58426
- var GraphqlKinds2 = graphql7.Kind;
58340
+ var GraphqlKinds2 = graphql8.Kind;
58427
58341
  async function fragmentVariables(config, documents) {
58428
58342
  const fragments = collectDefinitions(config, documents);
58429
58343
  const generatedFragments = {};
@@ -58446,7 +58360,7 @@ async function fragmentVariables(config, documents) {
58446
58360
  });
58447
58361
  }
58448
58362
  const doc = {
58449
- kind: graphql7.Kind.DOCUMENT,
58363
+ kind: graphql8.Kind.DOCUMENT,
58450
58364
  definitions: Object.values(generatedFragments)
58451
58365
  };
58452
58366
  documents.push({
@@ -58517,7 +58431,7 @@ function inlineFragmentArgs({
58517
58431
  return null;
58518
58432
  };
58519
58433
  const result = esm_default(
58520
- graphql7.visit(document, {
58434
+ graphql8.visit(document, {
58521
58435
  FragmentSpread(node) {
58522
58436
  if (!fragmentDefinitions[node.name.value]) {
58523
58437
  throw new Error("Could not find definition for fragment" + node.name.value);
@@ -58603,7 +58517,7 @@ function inlineFragmentArgs({
58603
58517
  );
58604
58518
  if (newName) {
58605
58519
  result.name = {
58606
- kind: graphql7.Kind.NAME,
58520
+ kind: graphql8.Kind.NAME,
58607
58521
  value: newName
58608
58522
  };
58609
58523
  }
@@ -58770,7 +58684,7 @@ ${exportDefaultFrom(`./${doc.name}`, doc.name)}`,
58770
58684
  }
58771
58685
 
58772
58686
  // src/codegen/generators/artifacts/inputs.ts
58773
- var graphql8 = __toESM(require("graphql"), 1);
58687
+ var graphql9 = __toESM(require("graphql"), 1);
58774
58688
  function inputObject(config, inputs, runtimeScalars) {
58775
58689
  const visitedTypes = /* @__PURE__ */ new Set();
58776
58690
  const inputObj = {
@@ -58800,10 +58714,10 @@ function walkInputs(config, visitedTypes, inputObj, rootType) {
58800
58714
  if (visitedTypes.has(type.name)) {
58801
58715
  return;
58802
58716
  }
58803
- if (graphql8.isEnumType(type) || graphql8.isScalarType(type)) {
58717
+ if (graphql9.isEnumType(type) || graphql9.isScalarType(type)) {
58804
58718
  return;
58805
58719
  }
58806
- if (graphql8.isUnionType(type)) {
58720
+ if (graphql9.isUnionType(type)) {
58807
58721
  return;
58808
58722
  }
58809
58723
  visitedTypes.add(type.name);
@@ -58821,50 +58735,50 @@ function walkInputs(config, visitedTypes, inputObj, rootType) {
58821
58735
  }
58822
58736
 
58823
58737
  // src/codegen/generators/artifacts/operations.ts
58824
- var graphql10 = __toESM(require("graphql"), 1);
58738
+ var graphql11 = __toESM(require("graphql"), 1);
58825
58739
 
58826
58740
  // src/codegen/generators/artifacts/utils.ts
58827
- var graphql9 = __toESM(require("graphql"), 1);
58828
- var recast3 = __toESM(require_main2(), 1);
58829
- var AST3 = recast3.types.builders;
58741
+ var graphql10 = __toESM(require("graphql"), 1);
58742
+ var recast4 = __toESM(require_main2(), 1);
58743
+ var AST4 = recast4.types.builders;
58830
58744
  function serializeValue(value) {
58831
58745
  if (Array.isArray(value)) {
58832
- return AST3.arrayExpression(value.map(serializeValue));
58746
+ return AST4.arrayExpression(value.map(serializeValue));
58833
58747
  }
58834
58748
  if (typeof value === "object" && value !== null) {
58835
- return AST3.objectExpression(
58749
+ return AST4.objectExpression(
58836
58750
  Object.entries(value).filter(([key, value2]) => typeof value2 !== "undefined").map(([key, val]) => {
58837
- return AST3.objectProperty(AST3.stringLiteral(key), serializeValue(val));
58751
+ return AST4.objectProperty(AST4.stringLiteral(key), serializeValue(val));
58838
58752
  })
58839
58753
  );
58840
58754
  }
58841
58755
  if (typeof value === "string") {
58842
58756
  if (value.indexOf("\n") !== -1) {
58843
- return AST3.templateLiteral(
58844
- [AST3.templateElement({ raw: value, cooked: value }, true)],
58757
+ return AST4.templateLiteral(
58758
+ [AST4.templateElement({ raw: value, cooked: value }, true)],
58845
58759
  []
58846
58760
  );
58847
58761
  }
58848
- return AST3.stringLiteral(value);
58762
+ return AST4.stringLiteral(value);
58849
58763
  }
58850
- return AST3.literal(value);
58764
+ return AST4.literal(value);
58851
58765
  }
58852
58766
  function convertValue(config, val) {
58853
58767
  let value;
58854
58768
  let kind;
58855
- if (val.kind === graphql9.Kind.INT) {
58769
+ if (val.kind === graphql10.Kind.INT) {
58856
58770
  value = parseInt(val.value, 10);
58857
58771
  kind = "Int";
58858
- } else if (val.kind === graphql9.Kind.FLOAT) {
58772
+ } else if (val.kind === graphql10.Kind.FLOAT) {
58859
58773
  value = parseFloat(val.value);
58860
58774
  kind = "Float";
58861
- } else if (val.kind === graphql9.Kind.BOOLEAN) {
58775
+ } else if (val.kind === graphql10.Kind.BOOLEAN) {
58862
58776
  value = val.value;
58863
58777
  kind = "Boolean";
58864
- } else if (val.kind === graphql9.Kind.VARIABLE) {
58778
+ } else if (val.kind === graphql10.Kind.VARIABLE) {
58865
58779
  value = val.name.value;
58866
58780
  kind = "Variable";
58867
- } else if (val.kind === graphql9.Kind.STRING) {
58781
+ } else if (val.kind === graphql10.Kind.STRING) {
58868
58782
  value = val.value;
58869
58783
  kind = "String";
58870
58784
  }
@@ -58877,9 +58791,13 @@ function operationsByPath(config, filepath, definition, filterTypes) {
58877
58791
  return {};
58878
58792
  }
58879
58793
  const pathOperations = {};
58880
- graphql10.visit(definition, {
58794
+ graphql11.visit(definition, {
58881
58795
  FragmentSpread(node, _, __, ___, ancestors) {
58882
- if (!config.isListFragment(node.name.value)) {
58796
+ let nameWithoutHash = node.name.value;
58797
+ if (node.directives && node.directives.find((directive) => directive.name.value === "with")) {
58798
+ nameWithoutHash = nameWithoutHash.substring(0, nameWithoutHash.lastIndexOf("_"));
58799
+ }
58800
+ if (!config.isListFragment(nameWithoutHash)) {
58883
58801
  return;
58884
58802
  }
58885
58803
  const path2 = ancestorKey(ancestors);
@@ -58890,8 +58808,8 @@ function operationsByPath(config, filepath, definition, filterTypes) {
58890
58808
  operationObject({
58891
58809
  config,
58892
58810
  filepath,
58893
- listName: config.listNameFromFragment(node.name.value),
58894
- operationKind: config.listOperationFromFragment(node.name.value),
58811
+ listName: config.listNameFromFragment(nameWithoutHash),
58812
+ operationKind: config.listOperationFromFragment(nameWithoutHash),
58895
58813
  type: parentTypeFromAncestors(config.schema, filepath, ancestors).name,
58896
58814
  selection: node
58897
58815
  })
@@ -59036,19 +58954,19 @@ function ancestorKey(ancestors) {
59036
58954
  }
59037
58955
 
59038
58956
  // src/codegen/generators/artifacts/selection.ts
59039
- var graphql15 = __toESM(require("graphql"), 1);
58957
+ var graphql16 = __toESM(require("graphql"), 1);
59040
58958
 
59041
58959
  // src/codegen/transforms/list.ts
59042
- var graphql13 = __toESM(require("graphql"), 1);
58960
+ var graphql14 = __toESM(require("graphql"), 1);
59043
58961
 
59044
58962
  // src/codegen/utils/objectIdentificationSelection.ts
59045
- var graphql11 = __toESM(require("graphql"), 1);
58963
+ var graphql12 = __toESM(require("graphql"), 1);
59046
58964
  var objectIdentificationSelection = (config, type) => {
59047
58965
  return config.keyFieldsForType(type.name).map((key) => {
59048
58966
  return {
59049
- kind: graphql11.Kind.FIELD,
58967
+ kind: graphql12.Kind.FIELD,
59050
58968
  name: {
59051
- kind: graphql11.Kind.NAME,
58969
+ kind: graphql12.Kind.NAME,
59052
58970
  value: key
59053
58971
  }
59054
58972
  };
@@ -59056,7 +58974,7 @@ var objectIdentificationSelection = (config, type) => {
59056
58974
  };
59057
58975
 
59058
58976
  // src/codegen/transforms/paginate.ts
59059
- var graphql12 = __toESM(require("graphql"), 1);
58977
+ var graphql13 = __toESM(require("graphql"), 1);
59060
58978
  async function paginate(config, documents) {
59061
58979
  const newDocs = [];
59062
58980
  for (const doc of documents) {
@@ -59089,7 +59007,7 @@ async function paginate(config, documents) {
59089
59007
  };
59090
59008
  let cursorType = "String";
59091
59009
  let paginationPath = [];
59092
- doc.document = graphql12.visit(doc.document, {
59010
+ doc.document = graphql13.visit(doc.document, {
59093
59011
  Field(node, _, __, ___, ancestors) {
59094
59012
  const paginateDirective = node.directives?.find(
59095
59013
  (directive) => directive.name.value === config.paginateDirective
@@ -59115,7 +59033,7 @@ async function paginate(config, documents) {
59115
59033
  flags.offset.enabled = offsetPagination;
59116
59034
  flags.limit.enabled = offsetPagination;
59117
59035
  paginationPath = ancestors.filter(
59118
- (ancestor) => !Array.isArray(ancestor) && ancestor.kind === graphql12.Kind.FIELD
59036
+ (ancestor) => !Array.isArray(ancestor) && ancestor.kind === graphql13.Kind.FIELD
59119
59037
  ).concat(node).map((field) => field.alias?.value || field.name.value);
59120
59038
  return {
59121
59039
  ...node,
@@ -59134,7 +59052,7 @@ async function paginate(config, documents) {
59134
59052
  let fragment2 = "";
59135
59053
  let paginateMode = config.defaultPaginateMode;
59136
59054
  const requiredArgs = [];
59137
- doc.document = graphql12.visit(doc.document, {
59055
+ doc.document = graphql13.visit(doc.document, {
59138
59056
  OperationDefinition(node) {
59139
59057
  if (node.operation !== "query") {
59140
59058
  throw new HoudiniError({
@@ -59193,9 +59111,9 @@ async function paginate(config, documents) {
59193
59111
  directives: [
59194
59112
  ...node.directives || [],
59195
59113
  {
59196
- kind: graphql12.Kind.DIRECTIVE,
59114
+ kind: graphql13.Kind.DIRECTIVE,
59197
59115
  name: {
59198
- kind: graphql12.Kind.NAME,
59116
+ kind: graphql13.Kind.NAME,
59199
59117
  value: config.argumentsDirective
59200
59118
  }
59201
59119
  }
@@ -59265,22 +59183,22 @@ async function paginate(config, documents) {
59265
59183
  const paginationArgs = Object.entries(flags).filter(([_, { enabled }]) => enabled).map(([key, value]) => ({ name: key, ...value }));
59266
59184
  const fragmentSpreadSelection = [
59267
59185
  {
59268
- kind: graphql12.Kind.FRAGMENT_SPREAD,
59186
+ kind: graphql13.Kind.FRAGMENT_SPREAD,
59269
59187
  name: {
59270
- kind: graphql12.Kind.NAME,
59188
+ kind: graphql13.Kind.NAME,
59271
59189
  value: fragmentName
59272
59190
  },
59273
59191
  directives: [
59274
59192
  {
59275
- kind: graphql12.Kind.DIRECTIVE,
59193
+ kind: graphql13.Kind.DIRECTIVE,
59276
59194
  name: {
59277
- kind: graphql12.Kind.NAME,
59195
+ kind: graphql13.Kind.NAME,
59278
59196
  value: config.withDirective
59279
59197
  },
59280
59198
  ["arguments"]: requiredArgs.map((arg) => variableAsArgument(arg.name)).concat(paginationArgs.map(({ name }) => variableAsArgument(name)))
59281
59199
  },
59282
59200
  {
59283
- kind: graphql12.Kind.DIRECTIVE,
59201
+ kind: graphql13.Kind.DIRECTIVE,
59284
59202
  name: {
59285
59203
  kind: "Name",
59286
59204
  value: config.maskDisableDirective
@@ -59307,23 +59225,23 @@ async function paginate(config, documents) {
59307
59225
  });
59308
59226
  const typeConfig = config.typeConfig?.[fragment2];
59309
59227
  const queryDoc = {
59310
- kind: graphql12.Kind.DOCUMENT,
59228
+ kind: graphql13.Kind.DOCUMENT,
59311
59229
  definitions: [
59312
59230
  {
59313
- kind: graphql12.Kind.OPERATION_DEFINITION,
59231
+ kind: graphql13.Kind.OPERATION_DEFINITION,
59314
59232
  name: {
59315
- kind: graphql12.Kind.NAME,
59233
+ kind: graphql13.Kind.NAME,
59316
59234
  value: refetchQueryName
59317
59235
  },
59318
59236
  operation: "query",
59319
59237
  variableDefinitions: requiredArgs.map(
59320
59238
  (arg) => ({
59321
- kind: graphql12.Kind.VARIABLE_DEFINITION,
59239
+ kind: graphql13.Kind.VARIABLE_DEFINITION,
59322
59240
  type: arg.type,
59323
59241
  variable: {
59324
- kind: graphql12.Kind.VARIABLE,
59242
+ kind: graphql13.Kind.VARIABLE,
59325
59243
  name: {
59326
- kind: graphql12.Kind.NAME,
59244
+ kind: graphql13.Kind.NAME,
59327
59245
  value: arg.name
59328
59246
  }
59329
59247
  }
@@ -59331,18 +59249,18 @@ async function paginate(config, documents) {
59331
59249
  ).concat(
59332
59250
  paginationArgs.map(
59333
59251
  (arg) => ({
59334
- kind: graphql12.Kind.VARIABLE_DEFINITION,
59252
+ kind: graphql13.Kind.VARIABLE_DEFINITION,
59335
59253
  type: {
59336
- kind: graphql12.Kind.NAMED_TYPE,
59254
+ kind: graphql13.Kind.NAMED_TYPE,
59337
59255
  name: {
59338
- kind: graphql12.Kind.NAME,
59256
+ kind: graphql13.Kind.NAME,
59339
59257
  value: arg.type
59340
59258
  }
59341
59259
  },
59342
59260
  variable: {
59343
- kind: graphql12.Kind.VARIABLE,
59261
+ kind: graphql13.Kind.VARIABLE,
59344
59262
  name: {
59345
- kind: graphql12.Kind.NAME,
59263
+ kind: graphql13.Kind.NAME,
59346
59264
  value: arg.name
59347
59265
  }
59348
59266
  },
@@ -59354,12 +59272,12 @@ async function paginate(config, documents) {
59354
59272
  ).concat(
59355
59273
  !nodeQuery ? [] : keys2.map(
59356
59274
  (key) => ({
59357
- kind: graphql12.Kind.VARIABLE_DEFINITION,
59275
+ kind: graphql13.Kind.VARIABLE_DEFINITION,
59358
59276
  type: key.type,
59359
59277
  variable: {
59360
- kind: graphql12.Kind.VARIABLE,
59278
+ kind: graphql13.Kind.VARIABLE,
59361
59279
  name: {
59362
- kind: graphql12.Kind.NAME,
59280
+ kind: graphql13.Kind.NAME,
59363
59281
  value: key.name
59364
59282
  }
59365
59283
  }
@@ -59368,42 +59286,42 @@ async function paginate(config, documents) {
59368
59286
  )
59369
59287
  ),
59370
59288
  selectionSet: {
59371
- kind: graphql12.Kind.SELECTION_SET,
59289
+ kind: graphql13.Kind.SELECTION_SET,
59372
59290
  selections: !nodeQuery ? fragmentSpreadSelection : [
59373
59291
  {
59374
- kind: graphql12.Kind.FIELD,
59292
+ kind: graphql13.Kind.FIELD,
59375
59293
  name: {
59376
- kind: graphql12.Kind.NAME,
59294
+ kind: graphql13.Kind.NAME,
59377
59295
  value: typeConfig?.resolve?.queryField || "node"
59378
59296
  },
59379
59297
  ["arguments"]: keys2.map((key) => ({
59380
- kind: graphql12.Kind.ARGUMENT,
59298
+ kind: graphql13.Kind.ARGUMENT,
59381
59299
  name: {
59382
- kind: graphql12.Kind.NAME,
59300
+ kind: graphql13.Kind.NAME,
59383
59301
  value: key.name
59384
59302
  },
59385
59303
  value: {
59386
- kind: graphql12.Kind.VARIABLE,
59304
+ kind: graphql13.Kind.VARIABLE,
59387
59305
  name: {
59388
- kind: graphql12.Kind.NAME,
59306
+ kind: graphql13.Kind.NAME,
59389
59307
  value: key.name
59390
59308
  }
59391
59309
  }
59392
59310
  })),
59393
59311
  selectionSet: {
59394
- kind: graphql12.Kind.SELECTION_SET,
59312
+ kind: graphql13.Kind.SELECTION_SET,
59395
59313
  selections: [
59396
59314
  {
59397
- kind: graphql12.Kind.FIELD,
59315
+ kind: graphql13.Kind.FIELD,
59398
59316
  name: {
59399
- kind: graphql12.Kind.NAME,
59317
+ kind: graphql13.Kind.NAME,
59400
59318
  value: "__typename"
59401
59319
  }
59402
59320
  },
59403
59321
  ...(typeConfig?.keys || [config.defaultKeys[0]]).map((key) => ({
59404
- kind: graphql12.Kind.FIELD,
59322
+ kind: graphql13.Kind.FIELD,
59405
59323
  name: {
59406
- kind: graphql12.Kind.NAME,
59324
+ kind: graphql13.Kind.NAME,
59407
59325
  value: key
59408
59326
  }
59409
59327
  })),
@@ -59460,15 +59378,15 @@ function replaceArgumentsWithVariables(args, flags) {
59460
59378
  }
59461
59379
  function variableAsArgument(name, variable) {
59462
59380
  return {
59463
- kind: graphql12.Kind.ARGUMENT,
59381
+ kind: graphql13.Kind.ARGUMENT,
59464
59382
  name: {
59465
- kind: graphql12.Kind.NAME,
59383
+ kind: graphql13.Kind.NAME,
59466
59384
  value: name
59467
59385
  },
59468
59386
  value: {
59469
- kind: graphql12.Kind.VARIABLE,
59387
+ kind: graphql13.Kind.VARIABLE,
59470
59388
  name: {
59471
- kind: graphql12.Kind.NAME,
59389
+ kind: graphql13.Kind.NAME,
59472
59390
  value: variable ?? name
59473
59391
  }
59474
59392
  }
@@ -59476,18 +59394,18 @@ function variableAsArgument(name, variable) {
59476
59394
  }
59477
59395
  function staticVariableDefinition(name, type, defaultValue, variableName) {
59478
59396
  return {
59479
- kind: graphql12.Kind.VARIABLE_DEFINITION,
59397
+ kind: graphql13.Kind.VARIABLE_DEFINITION,
59480
59398
  type: {
59481
- kind: graphql12.Kind.NAMED_TYPE,
59399
+ kind: graphql13.Kind.NAMED_TYPE,
59482
59400
  name: {
59483
- kind: graphql12.Kind.NAME,
59401
+ kind: graphql13.Kind.NAME,
59484
59402
  value: type
59485
59403
  }
59486
59404
  },
59487
59405
  variable: {
59488
- kind: graphql12.Kind.VARIABLE,
59406
+ kind: graphql13.Kind.VARIABLE,
59489
59407
  name: {
59490
- kind: graphql12.Kind.NAME,
59408
+ kind: graphql13.Kind.NAME,
59491
59409
  value: variableName ?? name
59492
59410
  }
59493
59411
  },
@@ -59499,9 +59417,9 @@ function staticVariableDefinition(name, type, defaultValue, variableName) {
59499
59417
  }
59500
59418
  function argumentNode(name, value) {
59501
59419
  return {
59502
- kind: graphql12.Kind.ARGUMENT,
59420
+ kind: graphql13.Kind.ARGUMENT,
59503
59421
  name: {
59504
- kind: graphql12.Kind.NAME,
59422
+ kind: graphql13.Kind.NAME,
59505
59423
  value: name
59506
59424
  },
59507
59425
  value: objectNode(value)
@@ -59509,16 +59427,16 @@ function argumentNode(name, value) {
59509
59427
  }
59510
59428
  function objectNode([type, defaultValue]) {
59511
59429
  const node = {
59512
- kind: graphql12.Kind.OBJECT,
59430
+ kind: graphql13.Kind.OBJECT,
59513
59431
  fields: [
59514
59432
  {
59515
- kind: graphql12.Kind.OBJECT_FIELD,
59433
+ kind: graphql13.Kind.OBJECT_FIELD,
59516
59434
  name: {
59517
- kind: graphql12.Kind.NAME,
59435
+ kind: graphql13.Kind.NAME,
59518
59436
  value: "type"
59519
59437
  },
59520
59438
  value: {
59521
- kind: graphql12.Kind.STRING,
59439
+ kind: graphql13.Kind.STRING,
59522
59440
  value: type
59523
59441
  }
59524
59442
  }
@@ -59526,8 +59444,8 @@ function objectNode([type, defaultValue]) {
59526
59444
  };
59527
59445
  if (defaultValue) {
59528
59446
  node.fields.push({
59529
- kind: graphql12.Kind.OBJECT_FIELD,
59530
- name: { kind: graphql12.Kind.NAME, value: "default" },
59447
+ kind: graphql13.Kind.OBJECT_FIELD,
59448
+ name: { kind: graphql13.Kind.NAME, value: "default" },
59531
59449
  value: {
59532
59450
  kind: typeof defaultValue === "number" ? "IntValue" : "StringValue",
59533
59451
  value: defaultValue.toString()
@@ -59538,34 +59456,34 @@ function objectNode([type, defaultValue]) {
59538
59456
  }
59539
59457
  var pageInfoSelection = [
59540
59458
  {
59541
- kind: graphql12.Kind.FIELD,
59459
+ kind: graphql13.Kind.FIELD,
59542
59460
  name: {
59543
- kind: graphql12.Kind.NAME,
59461
+ kind: graphql13.Kind.NAME,
59544
59462
  value: "edges"
59545
59463
  },
59546
59464
  selectionSet: {
59547
- kind: graphql12.Kind.SELECTION_SET,
59465
+ kind: graphql13.Kind.SELECTION_SET,
59548
59466
  selections: [
59549
59467
  {
59550
- kind: graphql12.Kind.FIELD,
59468
+ kind: graphql13.Kind.FIELD,
59551
59469
  name: {
59552
- kind: graphql12.Kind.NAME,
59470
+ kind: graphql13.Kind.NAME,
59553
59471
  value: "cursor"
59554
59472
  }
59555
59473
  },
59556
59474
  {
59557
- kind: graphql12.Kind.FIELD,
59475
+ kind: graphql13.Kind.FIELD,
59558
59476
  name: {
59559
- kind: graphql12.Kind.NAME,
59477
+ kind: graphql13.Kind.NAME,
59560
59478
  value: "node"
59561
59479
  },
59562
59480
  selectionSet: {
59563
- kind: graphql12.Kind.SELECTION_SET,
59481
+ kind: graphql13.Kind.SELECTION_SET,
59564
59482
  selections: [
59565
59483
  {
59566
- kind: graphql12.Kind.FIELD,
59484
+ kind: graphql13.Kind.FIELD,
59567
59485
  name: {
59568
- kind: graphql12.Kind.NAME,
59486
+ kind: graphql13.Kind.NAME,
59569
59487
  value: "__typename"
59570
59488
  }
59571
59489
  }
@@ -59576,39 +59494,39 @@ var pageInfoSelection = [
59576
59494
  }
59577
59495
  },
59578
59496
  {
59579
- kind: graphql12.Kind.FIELD,
59497
+ kind: graphql13.Kind.FIELD,
59580
59498
  name: {
59581
- kind: graphql12.Kind.NAME,
59499
+ kind: graphql13.Kind.NAME,
59582
59500
  value: "pageInfo"
59583
59501
  },
59584
59502
  selectionSet: {
59585
- kind: graphql12.Kind.SELECTION_SET,
59503
+ kind: graphql13.Kind.SELECTION_SET,
59586
59504
  selections: [
59587
59505
  {
59588
- kind: graphql12.Kind.FIELD,
59506
+ kind: graphql13.Kind.FIELD,
59589
59507
  name: {
59590
- kind: graphql12.Kind.NAME,
59508
+ kind: graphql13.Kind.NAME,
59591
59509
  value: "hasPreviousPage"
59592
59510
  }
59593
59511
  },
59594
59512
  {
59595
- kind: graphql12.Kind.FIELD,
59513
+ kind: graphql13.Kind.FIELD,
59596
59514
  name: {
59597
- kind: graphql12.Kind.NAME,
59515
+ kind: graphql13.Kind.NAME,
59598
59516
  value: "hasNextPage"
59599
59517
  }
59600
59518
  },
59601
59519
  {
59602
- kind: graphql12.Kind.FIELD,
59520
+ kind: graphql13.Kind.FIELD,
59603
59521
  name: {
59604
- kind: graphql12.Kind.NAME,
59522
+ kind: graphql13.Kind.NAME,
59605
59523
  value: "startCursor"
59606
59524
  }
59607
59525
  },
59608
59526
  {
59609
- kind: graphql12.Kind.FIELD,
59527
+ kind: graphql13.Kind.FIELD,
59610
59528
  name: {
59611
- kind: graphql12.Kind.NAME,
59529
+ kind: graphql13.Kind.NAME,
59612
59530
  value: "endCursor"
59613
59531
  }
59614
59532
  }
@@ -59622,17 +59540,17 @@ async function addListFragments(config, documents) {
59622
59540
  const lists = {};
59623
59541
  const errors = [];
59624
59542
  for (const doc of documents) {
59625
- doc.document = graphql13.visit(doc.document, {
59543
+ doc.document = graphql14.visit(doc.document, {
59626
59544
  Directive(node, key, parent2, path2, ancestors) {
59627
59545
  if ([config.listDirective, config.paginateDirective].includes(node.name.value)) {
59628
59546
  const nameArg = node.arguments?.find(
59629
59547
  (arg) => arg.name.value === config.listOrPaginateNameArg
59630
59548
  );
59631
59549
  let error = {
59632
- ...new graphql13.GraphQLError(
59550
+ ...new graphql14.GraphQLError(
59633
59551
  "",
59634
59552
  node,
59635
- new graphql13.Source(""),
59553
+ new graphql14.Source(""),
59636
59554
  node.loc ? [node.loc.start, node.loc.end] : null,
59637
59555
  path2
59638
59556
  ),
@@ -59684,7 +59602,7 @@ async function addListFragments(config, documents) {
59684
59602
  {
59685
59603
  kind: "Argument",
59686
59604
  name: {
59687
- kind: graphql13.Kind.NAME,
59605
+ kind: graphql14.Kind.NAME,
59688
59606
  value: "connection"
59689
59607
  },
59690
59608
  value: {
@@ -59734,7 +59652,7 @@ async function addListFragments(config, documents) {
59734
59652
  const validDeletes = [
59735
59653
  ...new Set(
59736
59654
  Object.values(lists).map(({ type }) => {
59737
- if (!(type instanceof graphql13.GraphQLObjectType)) {
59655
+ if (!(type instanceof graphql14.GraphQLObjectType)) {
59738
59656
  return "";
59739
59657
  }
59740
59658
  if (config.keyFieldsForType(type.name).length !== 1) {
@@ -59748,7 +59666,7 @@ async function addListFragments(config, documents) {
59748
59666
  return;
59749
59667
  }
59750
59668
  const generatedDoc = {
59751
- kind: graphql13.Kind.DOCUMENT,
59669
+ kind: graphql14.Kind.DOCUMENT,
59752
59670
  definitions: Object.entries(lists).flatMap(
59753
59671
  ([name, { selection, type }]) => {
59754
59672
  const schemaType = config.schema.getType(type.name);
@@ -59756,7 +59674,7 @@ async function addListFragments(config, documents) {
59756
59674
  throw new HoudiniError({ message: "Lists must have a selection" });
59757
59675
  }
59758
59676
  const fragmentSelection = {
59759
- kind: graphql13.Kind.SELECTION_SET,
59677
+ kind: graphql14.Kind.SELECTION_SET,
59760
59678
  selections: [...selection.selections]
59761
59679
  };
59762
59680
  if (schemaType && fragmentSelection && !fragmentSelection?.selections.find(
@@ -59771,14 +59689,14 @@ async function addListFragments(config, documents) {
59771
59689
  {
59772
59690
  name: {
59773
59691
  value: config.listInsertFragment(name),
59774
- kind: graphql13.Kind.NAME
59692
+ kind: graphql14.Kind.NAME
59775
59693
  },
59776
- kind: graphql13.Kind.FRAGMENT_DEFINITION,
59694
+ kind: graphql14.Kind.FRAGMENT_DEFINITION,
59777
59695
  selectionSet: fragmentSelection,
59778
59696
  typeCondition: {
59779
- kind: graphql13.Kind.NAMED_TYPE,
59697
+ kind: graphql14.Kind.NAMED_TYPE,
59780
59698
  name: {
59781
- kind: graphql13.Kind.NAME,
59699
+ kind: graphql14.Kind.NAME,
59782
59700
  value: type.name
59783
59701
  }
59784
59702
  }
@@ -59786,32 +59704,32 @@ async function addListFragments(config, documents) {
59786
59704
  {
59787
59705
  name: {
59788
59706
  value: config.listToggleFragment(name),
59789
- kind: graphql13.Kind.NAME
59707
+ kind: graphql14.Kind.NAME
59790
59708
  },
59791
- kind: graphql13.Kind.FRAGMENT_DEFINITION,
59709
+ kind: graphql14.Kind.FRAGMENT_DEFINITION,
59792
59710
  selectionSet: fragmentSelection,
59793
59711
  typeCondition: {
59794
- kind: graphql13.Kind.NAMED_TYPE,
59712
+ kind: graphql14.Kind.NAMED_TYPE,
59795
59713
  name: {
59796
- kind: graphql13.Kind.NAME,
59714
+ kind: graphql14.Kind.NAME,
59797
59715
  value: type.name
59798
59716
  }
59799
59717
  }
59800
59718
  },
59801
59719
  {
59802
- kind: graphql13.Kind.FRAGMENT_DEFINITION,
59720
+ kind: graphql14.Kind.FRAGMENT_DEFINITION,
59803
59721
  name: {
59804
59722
  value: config.listRemoveFragment(name),
59805
- kind: graphql13.Kind.NAME
59723
+ kind: graphql14.Kind.NAME
59806
59724
  },
59807
59725
  selectionSet: {
59808
- kind: graphql13.Kind.SELECTION_SET,
59726
+ kind: graphql14.Kind.SELECTION_SET,
59809
59727
  selections: [...objectIdentificationSelection(config, type)]
59810
59728
  },
59811
59729
  typeCondition: {
59812
- kind: graphql13.Kind.NAMED_TYPE,
59730
+ kind: graphql14.Kind.NAMED_TYPE,
59813
59731
  name: {
59814
- kind: graphql13.Kind.NAME,
59732
+ kind: graphql14.Kind.NAME,
59815
59733
  value: type.name
59816
59734
  }
59817
59735
  }
@@ -59820,14 +59738,14 @@ async function addListFragments(config, documents) {
59820
59738
  }
59821
59739
  ).concat(
59822
59740
  ...validDeletes.map((typeName) => ({
59823
- kind: graphql13.Kind.DIRECTIVE_DEFINITION,
59741
+ kind: graphql14.Kind.DIRECTIVE_DEFINITION,
59824
59742
  name: {
59825
- kind: graphql13.Kind.NAME,
59743
+ kind: graphql14.Kind.NAME,
59826
59744
  value: config.listDeleteDirective(typeName)
59827
59745
  },
59828
59746
  locations: [
59829
59747
  {
59830
- kind: graphql13.Kind.NAME,
59748
+ kind: graphql14.Kind.NAME,
59831
59749
  value: "FIELD"
59832
59750
  }
59833
59751
  ],
@@ -59835,8 +59753,8 @@ async function addListFragments(config, documents) {
59835
59753
  }))
59836
59754
  )
59837
59755
  };
59838
- config.newSchema += "\n" + generatedDoc.definitions.filter((c) => c.kind !== "FragmentDefinition").map(graphql13.print).join("\n\n");
59839
- config.newDocuments += "\n" + generatedDoc.definitions.filter((c) => c.kind === "FragmentDefinition").map(graphql13.print).join("\n\n");
59756
+ config.newSchema += "\n" + generatedDoc.definitions.filter((c) => c.kind !== "FragmentDefinition").map(graphql14.print).join("\n\n");
59757
+ config.newDocuments += "\n" + generatedDoc.definitions.filter((c) => c.kind === "FragmentDefinition").map(graphql14.print).join("\n\n");
59840
59758
  documents.push({
59841
59759
  name: "generated::lists",
59842
59760
  kind: ArtifactKind.Fragment,
@@ -59922,11 +59840,11 @@ var nodeNotDefinedMessage = (config) => `Looks like you are trying to use the ${
59922
59840
  For more information, visit this link: ${siteURL}/guides/pagination`;
59923
59841
 
59924
59842
  // src/codegen/generators/artifacts/fieldKey.ts
59925
- var graphql14 = __toESM(require("graphql"), 1);
59843
+ var graphql15 = __toESM(require("graphql"), 1);
59926
59844
  function fieldKey(config, field) {
59927
59845
  const attributeName = field.alias?.value || field.name.value;
59928
- const printed = graphql14.print(field);
59929
- const secondParse = graphql14.parse(`{${printed}}`).definitions[0].selectionSet.selections[0];
59846
+ const printed = graphql15.print(field);
59847
+ const secondParse = graphql15.parse(`{${printed}}`).definitions[0].selectionSet.selections[0];
59930
59848
  let paginateMode = config.defaultPaginateMode;
59931
59849
  const paginatedDirective = field.directives?.find(
59932
59850
  (directive) => directive.name.value === config.paginateDirective
@@ -60049,13 +59967,13 @@ function prepareSelection({
60049
59967
  } else if ("getFields" in type) {
60050
59968
  let typeRef = type.getFields()[field.name.value].type;
60051
59969
  fieldType = getRootType(typeRef);
60052
- nullable = !graphql15.isNonNullType(typeRef);
60053
- } else if (graphql15.isAbstractType(type)) {
59970
+ nullable = !graphql16.isNonNullType(typeRef);
59971
+ } else if (graphql16.isAbstractType(type)) {
60054
59972
  for (const possible of config.schema.getPossibleTypes(type)) {
60055
- if (graphql15.isObjectType(possible)) {
59973
+ if (graphql16.isObjectType(possible)) {
60056
59974
  if (possible.getFields()[field.name.value]) {
60057
59975
  fieldType = possible.getFields()[field.name.value].type;
60058
- nullable = !graphql15.isNonNullType(fieldType);
59976
+ nullable = !graphql16.isNonNullType(fieldType);
60059
59977
  break;
60060
59978
  }
60061
59979
  }
@@ -60192,7 +60110,7 @@ function prepareSelection({
60192
60110
  kind: "value"
60193
60111
  } : { kind: "continue" };
60194
60112
  const parentType = config.schema.getType(rootType);
60195
- if (graphql15.isObjectType(parentType) || graphql15.isInterfaceType(parentType)) {
60113
+ if (graphql16.isObjectType(parentType) || graphql16.isInterfaceType(parentType)) {
60196
60114
  const fieldType2 = parentType.getFields()[field.name.value]?.type;
60197
60115
  if (fieldType2) {
60198
60116
  const listCount = unwrapType(config, fieldType2).wrappers.filter(
@@ -60215,7 +60133,7 @@ function prepareSelection({
60215
60133
  }
60216
60134
  fieldObj.loading = loadingValue;
60217
60135
  }
60218
- if (graphql15.isInterfaceType(fieldType) || graphql15.isUnionType(fieldType)) {
60136
+ if (graphql16.isInterfaceType(fieldType) || graphql16.isUnionType(fieldType)) {
60219
60137
  fieldObj.abstract = true;
60220
60138
  if (Object.values(fieldObj.selection?.abstractFields?.fields ?? {}).some(
60221
60139
  (fields) => Object.values(fields ?? {}).some((field2) => field2.required)
@@ -60297,7 +60215,7 @@ function mergeSelection({
60297
60215
  typeSelection,
60298
60216
  abstractSelection.fields[typeName] ?? {}
60299
60217
  );
60300
- if (graphql15.isAbstractType(gqlType)) {
60218
+ if (graphql16.isAbstractType(gqlType)) {
60301
60219
  for (const possible of config.schema.getPossibleTypes(gqlType)) {
60302
60220
  if (!possibleSelectionTypes[typeName]) {
60303
60221
  possibleSelectionTypes[typeName] = [];
@@ -60332,7 +60250,7 @@ function mergeSelection({
60332
60250
  }
60333
60251
  }
60334
60252
  const parentType = config.schema.getType(rootType);
60335
- const possibleParents = graphql15.isAbstractType(parentType) ? config.schema.getPossibleTypes(parentType)?.map((t2) => t2.name) : [parentType.name];
60253
+ const possibleParents = graphql16.isAbstractType(parentType) ? config.schema.getPossibleTypes(parentType)?.map((t2) => t2.name) : [parentType.name];
60336
60254
  for (const key of Object.keys(abstractSelection.typeMap)) {
60337
60255
  if (!possibleParents.includes(key) && rootType !== key || abstractSelection.fields[key]) {
60338
60256
  delete abstractSelection.typeMap[key];
@@ -60389,12 +60307,12 @@ function mergeSelection({
60389
60307
  }
60390
60308
 
60391
60309
  // src/codegen/generators/artifacts/index.ts
60392
- var AST4 = recast4.types.builders;
60310
+ var AST5 = recast5.types.builders;
60393
60311
  function artifactGenerator(stats) {
60394
60312
  return async function(config, docs) {
60395
60313
  const filterTypes = {};
60396
60314
  for (const doc of docs) {
60397
- graphql16.visit(doc.document, {
60315
+ graphql17.visit(doc.document, {
60398
60316
  Directive(node, _, __, ___, ancestors) {
60399
60317
  if (node.name.value !== config.listDirective) {
60400
60318
  return;
@@ -60454,7 +60372,7 @@ function artifactGenerator(stats) {
60454
60372
  return;
60455
60373
  }
60456
60374
  const usedVariableNames = /* @__PURE__ */ new Set();
60457
- let documentWithoutInternalDirectives = graphql16.visit(document, {
60375
+ let documentWithoutInternalDirectives = graphql17.visit(document, {
60458
60376
  Directive(node) {
60459
60377
  if (config.isInternalDirective(node.name.value)) {
60460
60378
  return null;
@@ -60467,7 +60385,7 @@ function artifactGenerator(stats) {
60467
60385
  }
60468
60386
  }
60469
60387
  });
60470
- let documentWithoutExtraVariables = graphql16.visit(
60388
+ let documentWithoutExtraVariables = graphql17.visit(
60471
60389
  documentWithoutInternalDirectives,
60472
60390
  {
60473
60391
  VariableDefinition(variableDefinitionNode) {
@@ -60478,13 +60396,13 @@ function artifactGenerator(stats) {
60478
60396
  }
60479
60397
  }
60480
60398
  );
60481
- let rawString = graphql16.print(documentWithoutExtraVariables);
60399
+ let rawString = graphql17.print(documentWithoutExtraVariables);
60482
60400
  let docKind = doc.kind;
60483
60401
  const operations = document.definitions.filter(
60484
- ({ kind }) => kind === graphql16.Kind.OPERATION_DEFINITION
60402
+ ({ kind }) => kind === graphql17.Kind.OPERATION_DEFINITION
60485
60403
  );
60486
60404
  const fragments = document.definitions.filter(
60487
- ({ kind }) => kind === graphql16.Kind.FRAGMENT_DEFINITION
60405
+ ({ kind }) => kind === graphql17.Kind.FRAGMENT_DEFINITION
60488
60406
  );
60489
60407
  let rootType = "";
60490
60408
  let selectionSet;
@@ -60684,9 +60602,9 @@ function artifactGenerator(stats) {
60684
60602
  plugin2.artifactEnd({ config, document: doc });
60685
60603
  }
60686
60604
  const _houdiniHash = hashOriginal({ document: doc });
60687
- const file = AST4.program([
60605
+ const file = AST5.program([
60688
60606
  moduleExport(config, "default", serializeValue(artifact)),
60689
- AST4.expressionStatement(AST4.stringLiteral(`HoudiniHash=${_houdiniHash}`))
60607
+ AST5.expressionStatement(AST5.stringLiteral(`HoudiniHash=${_houdiniHash}`))
60690
60608
  ]);
60691
60609
  const artifactPath = config.artifactPath(document);
60692
60610
  const countDocument = doc.generateStore;
@@ -60744,7 +60662,7 @@ function applyMask(config, target, mask) {
60744
60662
  if (!targetType) {
60745
60663
  continue;
60746
60664
  }
60747
- if (graphql16.isAbstractType(targetType)) {
60665
+ if (graphql17.isAbstractType(targetType)) {
60748
60666
  for (const possible of config.schema.getPossibleTypes(targetType)) {
60749
60667
  if (target.abstractFields?.fields[possible.name]) {
60750
60668
  applyMask(
@@ -60767,8 +60685,8 @@ function applyMask(config, target, mask) {
60767
60685
  }
60768
60686
 
60769
60687
  // src/codegen/generators/runtime/graphqlFunction.ts
60770
- var recast5 = __toESM(require_main2(), 1);
60771
- var AST5 = recast5.types.builders;
60688
+ var recast6 = __toESM(require_main2(), 1);
60689
+ var AST6 = recast6.types.builders;
60772
60690
  async function generateGraphqlReturnTypes(config, docs) {
60773
60691
  const indexPath = path_exports.join(config.runtimeDirectory, "index.d.ts");
60774
60692
  const fileContent = await fs_exports.readFile(indexPath) || "";
@@ -60803,18 +60721,18 @@ async function generateGraphqlReturnTypes(config, docs) {
60803
60721
  continue;
60804
60722
  }
60805
60723
  for (const [queryString, returnValue] of Object.entries(overloaded_returns)) {
60806
- const input = AST5.identifier("str");
60807
- input.typeAnnotation = AST5.tsTypeAnnotation(
60808
- AST5.tsLiteralType(AST5.stringLiteral(queryString))
60724
+ const input = AST6.identifier("str");
60725
+ input.typeAnnotation = AST6.tsTypeAnnotation(
60726
+ AST6.tsLiteralType(AST6.stringLiteral(queryString))
60809
60727
  );
60810
60728
  script.body.splice(
60811
60729
  i,
60812
60730
  0,
60813
- AST5.exportNamedDeclaration(
60814
- AST5.tsDeclareFunction(
60815
- AST5.identifier("graphql"),
60731
+ AST6.exportNamedDeclaration(
60732
+ AST6.tsDeclareFunction(
60733
+ AST6.identifier("graphql"),
60816
60734
  [input],
60817
- AST5.tsTypeAnnotation(AST5.tsTypeReference(AST5.identifier(returnValue)))
60735
+ AST6.tsTypeAnnotation(AST6.tsTypeReference(AST6.identifier(returnValue)))
60818
60736
  )
60819
60737
  )
60820
60738
  );
@@ -60989,165 +60907,22 @@ function moduleStatments(config) {
60989
60907
  var recast11 = __toESM(require_main2(), 1);
60990
60908
 
60991
60909
  // src/codegen/generators/typescript/addReferencedInputTypes.ts
60992
- var graphql19 = __toESM(require("graphql"), 1);
60993
- var recast8 = __toESM(require_main2(), 1);
60994
-
60995
- // src/codegen/generators/typescript/typeReference.ts
60996
60910
  var graphql18 = __toESM(require("graphql"), 1);
60997
60911
  var recast7 = __toESM(require_main2(), 1);
60998
-
60999
- // src/codegen/generators/typescript/types.ts
61000
- var graphql17 = __toESM(require("graphql"), 1);
61001
- var recast6 = __toESM(require_main2(), 1);
61002
- var AST6 = recast6.types.builders;
61003
- function readonlyProperty(prop, enable = true) {
61004
- if (enable) {
61005
- prop.readonly = true;
61006
- }
61007
- return prop;
61008
- }
61009
- function nullableField(inner, input = false) {
61010
- const members = [inner, AST6.tsNullKeyword()];
61011
- if (input) {
61012
- members.push(AST6.tsUndefinedKeyword());
61013
- }
61014
- return AST6.tsUnionType(members);
61015
- }
61016
- function scalarPropertyValue(config, filepath, missingScalars, target, body, field) {
61017
- if (config.configFile.features?.componentFields && target.name === config.componentScalar) {
61018
- if (!field) {
61019
- return AST6.tsNeverKeyword();
61020
- }
61021
- const component = config.componentFields[field.parent][field.field];
61022
- const sourcePathRelative = path_exports.relative(
61023
- path_exports.join(config.projectRoot, "src"),
61024
- component.filepath
61025
- );
61026
- let sourcePathParsed = path_exports.parse(sourcePathRelative);
61027
- let sourcePath = path_exports.join(sourcePathParsed.dir, sourcePathParsed.name);
61028
- const localImport = ensureImports({
61029
- config,
61030
- body,
61031
- import: "__component__" + component.fragment,
61032
- sourceModule: path_exports.join(
61033
- path_exports.relative(path_exports.dirname(filepath), config.projectRoot),
61034
- "src",
61035
- sourcePath
61036
- )
61037
- });
61038
- const parameters = AST6.tsTypeReference(AST6.identifier("Parameters"));
61039
- parameters.typeParameters = AST6.tsTypeParameterInstantiation([
61040
- AST6.tsTypeQuery(AST6.identifier(localImport))
61041
- ]);
61042
- const indexed = AST6.tsIndexedAccessType(
61043
- parameters,
61044
- AST6.tsLiteralType(AST6.numericLiteral(0))
61045
- );
61046
- const omit = AST6.tsTypeReference(AST6.identifier("Omit"));
61047
- omit.typeParameters = AST6.tsTypeParameterInstantiation([
61048
- indexed,
61049
- AST6.tsLiteralType(AST6.stringLiteral(component.prop))
61050
- ]);
61051
- const arg = AST6.identifier("props");
61052
- arg.typeAnnotation = AST6.tsTypeAnnotation(omit);
61053
- const returnType = AST6.tsTypeReference(AST6.identifier("ReturnType"));
61054
- returnType.typeParameters = AST6.tsTypeParameterInstantiation([
61055
- AST6.tsTypeQuery(AST6.identifier(localImport))
61056
- ]);
61057
- const fnType = AST6.tsFunctionType([arg]);
61058
- fnType.typeAnnotation = AST6.tsTypeAnnotation(returnType);
61059
- return fnType;
61060
- }
61061
- switch (target.name) {
61062
- case "String": {
61063
- return AST6.tsStringKeyword();
61064
- }
61065
- case "Int": {
61066
- return AST6.tsNumberKeyword();
61067
- }
61068
- case "Float": {
61069
- return AST6.tsNumberKeyword();
61070
- }
61071
- case "Boolean": {
61072
- return AST6.tsBooleanKeyword();
61073
- }
61074
- case "ID": {
61075
- return AST6.tsStringKeyword();
61076
- }
61077
- default: {
61078
- if (graphql17.isNonNullType(target) && "ofType" in target) {
61079
- return scalarPropertyValue(
61080
- config,
61081
- filepath,
61082
- missingScalars,
61083
- target.ofType,
61084
- body,
61085
- field
61086
- );
61087
- }
61088
- if (config.scalars?.[target.name]) {
61089
- return AST6.tsTypeReference(AST6.identifier(config.scalars?.[target.name].type));
61090
- }
61091
- if (target.name !== config.componentScalar) {
61092
- missingScalars.add(target.name);
61093
- }
61094
- return AST6.tsAnyKeyword();
61095
- }
61096
- }
61097
- }
61098
-
61099
- // src/codegen/generators/typescript/typeReference.ts
61100
60912
  var AST7 = recast7.types.builders;
61101
- function tsTypeReference(config, filepath, missingScalars, definition, body) {
61102
- const { type, wrappers } = unwrapType(config, definition.type);
61103
- let result;
61104
- if (graphql18.isScalarType(type)) {
61105
- result = scalarPropertyValue(config, filepath, missingScalars, type, body, null);
61106
- } else if (graphql18.isEnumType(type)) {
61107
- result = enumReference(config, body, type.name);
61108
- } else {
61109
- result = AST7.tsTypeReference(AST7.identifier(type.name));
61110
- }
61111
- for (const toWrap of wrappers) {
61112
- if (toWrap === "NonNull" /* NonNull */) {
61113
- continue;
61114
- } else if (toWrap === "Nullable" /* Nullable */) {
61115
- result = nullableField(result, true);
61116
- } else if (toWrap === "List" /* List */) {
61117
- result = AST7.tsArrayType(AST7.tsParenthesizedType(result));
61118
- }
61119
- }
61120
- return result;
61121
- }
61122
- function enumReference(config, body, name) {
61123
- ensureImports({
61124
- config,
61125
- body,
61126
- import: ["ValueOf"],
61127
- importKind: "type",
61128
- sourceModule: "$houdini/runtime/lib/types"
61129
- });
61130
- return AST7.tsTypeReference(
61131
- AST7.identifier("ValueOf"),
61132
- AST7.tsTypeParameterInstantiation([AST7.tsTypeQuery(AST7.identifier(name))])
61133
- );
61134
- }
61135
-
61136
- // src/codegen/generators/typescript/addReferencedInputTypes.ts
61137
- var AST8 = recast8.types.builders;
61138
60913
  function addReferencedInputTypes(config, filepath, body, visitedTypes, missingScalars, rootType) {
61139
60914
  const { type } = unwrapType(config, rootType);
61140
- if (graphql19.isScalarType(type)) {
60915
+ if (graphql18.isScalarType(type)) {
61141
60916
  return;
61142
60917
  }
61143
60918
  if (visitedTypes.has(type.name)) {
61144
60919
  return;
61145
60920
  }
61146
- if (graphql19.isUnionType(type)) {
60921
+ if (graphql18.isUnionType(type)) {
61147
60922
  throw new HoudiniError({ filepath, message: "Input Unions are not supported yet. Sorry!" });
61148
60923
  }
61149
60924
  visitedTypes.add(type.name);
61150
- if (graphql19.isEnumType(type)) {
60925
+ if (graphql18.isEnumType(type)) {
61151
60926
  ensureImports({
61152
60927
  config,
61153
60928
  body,
@@ -61161,21 +60936,37 @@ function addReferencedInputTypes(config, filepath, body, visitedTypes, missingSc
61161
60936
  for (const field of Object.values(type.getFields())) {
61162
60937
  addReferencedInputTypes(config, filepath, body, visitedTypes, missingScalars, field.type);
61163
60938
  members.push(
61164
- AST8.tsPropertySignature(
61165
- AST8.identifier(field.name),
61166
- AST8.tsTypeAnnotation(
60939
+ AST7.tsPropertySignature(
60940
+ AST7.identifier(field.name),
60941
+ AST7.tsTypeAnnotation(
61167
60942
  tsTypeReference(config, filepath, missingScalars, field, body)
61168
60943
  ),
61169
- graphql19.isNullableType(field.type)
60944
+ graphql18.isNullableType(field.type)
61170
60945
  )
61171
60946
  );
61172
60947
  }
61173
- body.push(AST8.tsTypeAliasDeclaration(AST8.identifier(type.name), AST8.tsTypeLiteral(members)));
60948
+ body.push(AST7.tsTypeAliasDeclaration(AST7.identifier(type.name), AST7.tsTypeLiteral(members)));
61174
60949
  }
61175
60950
 
61176
60951
  // src/codegen/generators/typescript/inlineType.ts
61177
- var graphql20 = __toESM(require("graphql"), 1);
60952
+ var graphql19 = __toESM(require("graphql"), 1);
61178
60953
  var recast9 = __toESM(require_main2(), 1);
60954
+
60955
+ // src/codegen/generators/comments/jsdoc.ts
60956
+ var recast8 = __toESM(require_main2(), 1);
60957
+ var AST8 = recast8.types.builders;
60958
+ function jsdocComment(text, deprecated) {
60959
+ let commentContent = `*
60960
+ * ${text}
60961
+ `;
60962
+ if (deprecated) {
60963
+ commentContent = `${commentContent} * @deprecated ${deprecated}
60964
+ `;
60965
+ }
60966
+ return AST8.commentBlock(commentContent, true);
60967
+ }
60968
+
60969
+ // src/codegen/generators/typescript/inlineType.ts
61179
60970
  var AST9 = recast9.types.builders;
61180
60971
  var fragmentKey2 = " $fragments";
61181
60972
  function inlineType({
@@ -61196,7 +60987,7 @@ function inlineType({
61196
60987
  const { type, wrappers } = unwrapType(config, rootType);
61197
60988
  let result;
61198
60989
  let forceNullable = false;
61199
- if (graphql20.isScalarType(type)) {
60990
+ if (graphql19.isScalarType(type)) {
61200
60991
  result = scalarPropertyValue(
61201
60992
  config,
61202
60993
  filepath,
@@ -61205,7 +60996,7 @@ function inlineType({
61205
60996
  body,
61206
60997
  field
61207
60998
  );
61208
- } else if (graphql20.isEnumType(type)) {
60999
+ } else if (graphql19.isEnumType(type)) {
61209
61000
  ensureImports({
61210
61001
  config,
61211
61002
  body,
@@ -61230,11 +61021,11 @@ function inlineType({
61230
61021
  for (const selection of selections) {
61231
61022
  if (selection.kind === "InlineFragment" && selection.typeCondition) {
61232
61023
  const fragmentType = config.schema.getType(selection.typeCondition.name.value);
61233
- if (!graphql20.isInterfaceType(type) && !graphql20.isUnionType(type)) {
61024
+ if (!graphql19.isInterfaceType(type) && !graphql19.isUnionType(type)) {
61234
61025
  selectedFields.push(...selection.selectionSet.selections);
61235
61026
  continue;
61236
61027
  }
61237
- if (!graphql20.isInterfaceType(fragmentType) && !graphql20.isUnionType(fragmentType)) {
61028
+ if (!graphql19.isInterfaceType(fragmentType) && !graphql19.isUnionType(fragmentType)) {
61238
61029
  if (!inlineFragments[fragmentType.name]) {
61239
61030
  inlineFragments[fragmentType.name] = [];
61240
61031
  }
@@ -61326,6 +61117,11 @@ function inlineType({
61326
61117
  if (allOptional) {
61327
61118
  prop.optional = true;
61328
61119
  }
61120
+ if (field2.description || field2.deprecationReason) {
61121
+ prop.comments = [
61122
+ jsdocComment(field2.description ?? "", field2.deprecationReason ?? void 0)
61123
+ ];
61124
+ }
61329
61125
  return prop;
61330
61126
  })
61331
61127
  ]);
@@ -61377,7 +61173,7 @@ function inlineType({
61377
61173
  }
61378
61174
  }
61379
61175
  }
61380
- if (objectType.type === "TSTypeLiteral" && !graphql20.isInterfaceType(fragmentRootType) && !graphql20.isUnionType(fragmentRootType)) {
61176
+ if (objectType.type === "TSTypeLiteral" && !graphql19.isInterfaceType(fragmentRootType) && !graphql19.isUnionType(fragmentRootType)) {
61381
61177
  const existingTypenameIndex = objectType.members.findIndex(
61382
61178
  (member) => member.type === "TSPropertySignature" && member.key.type === "Identifier" && member.key.name === "__typename"
61383
61179
  );
@@ -61402,11 +61198,11 @@ function inlineType({
61402
61198
  ];
61403
61199
  }
61404
61200
  let coveredTypenames;
61405
- if (graphql20.isInterfaceType(fragmentRootType)) {
61201
+ if (graphql19.isInterfaceType(fragmentRootType)) {
61406
61202
  coveredTypenames = interfaceCoveredTypenames(fragmentRootType);
61407
- } else if (graphql20.isUnionType(fragmentRootType)) {
61203
+ } else if (graphql19.isUnionType(fragmentRootType)) {
61408
61204
  coveredTypenames = fragmentRootType.getTypes().map((type2) => type2.name);
61409
- } else if (graphql20.isObjectType(fragmentRootType)) {
61205
+ } else if (graphql19.isObjectType(fragmentRootType)) {
61410
61206
  coveredTypenames = [fragmentRootType.name];
61411
61207
  } else {
61412
61208
  throw Error("unreachable code");
@@ -61442,7 +61238,7 @@ function inlineType({
61442
61238
  );
61443
61239
  }
61444
61240
  );
61445
- const parentIsUnionOrInterface = !graphql20.isInterfaceType(type) && !graphql20.isUnionType(type);
61241
+ const parentIsUnionOrInterface = !graphql19.isInterfaceType(type) && !graphql19.isUnionType(type);
61446
61242
  const possibleTypenames = parentIsUnionOrInterface ? [parent.name] : config.schema.getPossibleTypes(type).map((type2) => type2.name);
61447
61243
  const coveredTypenames = new Set(
61448
61244
  Object.values(inlineFragmentSelections).flatMap((sel) => sel.coveredTypenames)
@@ -61509,7 +61305,7 @@ function selectionTypeInfo(schema, filepath, rootType, selection) {
61509
61305
  },
61510
61306
  type: schema.getType("String")
61511
61307
  };
61512
- } else if (graphql20.isNonNullType(rootType) && "getFields" in rootType.ofType) {
61308
+ } else if (graphql19.isNonNullType(rootType) && "getFields" in rootType.ofType) {
61513
61309
  fields = rootType.ofType.getFields();
61514
61310
  } else {
61515
61311
  fields = rootType.getFields();
@@ -61521,7 +61317,7 @@ function selectionTypeInfo(schema, filepath, rootType, selection) {
61521
61317
  message: `Could not find type information for field ${rootType.toString()}.${selectionName} ${field}`
61522
61318
  });
61523
61319
  }
61524
- const fieldType = graphql20.getNamedType(field.type);
61320
+ const fieldType = graphql19.getNamedType(field.type);
61525
61321
  if (!fieldType) {
61526
61322
  throw new HoudiniError({
61527
61323
  filepath,
@@ -62029,7 +61825,7 @@ async function generateFragmentTypeDefs(config, filepath, body, selections, defi
62029
61825
  }
62030
61826
 
62031
61827
  // src/codegen/generators/typescript/imperativeTypeDef.ts
62032
- var graphql21 = __toESM(require("graphql"), 1);
61828
+ var graphql20 = __toESM(require("graphql"), 1);
62033
61829
  var recast12 = __toESM(require_main2(), 1);
62034
61830
  var AST12 = recast12.types.builders;
62035
61831
  async function imperativeCacheTypef(config, docs) {
@@ -62081,7 +61877,7 @@ function typeDefinitions(config, filepath, body, docs, returnType) {
62081
61877
  const operationTypes = [config.schema.getMutationType(), config.schema.getSubscriptionType()].filter(Boolean).map((type) => type?.name);
62082
61878
  const visitedTypes = /* @__PURE__ */ new Set();
62083
61879
  const types14 = Object.values(config.schema.getTypeMap()).filter(
62084
- (type) => !graphql21.isAbstractType(type) && !graphql21.isScalarType(type) && !graphql21.isEnumType(type) && !graphql21.isInputObjectType(type) && !type.name.startsWith("__") && !operationTypes.includes(type.name)
61880
+ (type) => !graphql20.isAbstractType(type) && !graphql20.isScalarType(type) && !graphql20.isEnumType(type) && !graphql20.isInputObjectType(type) && !type.name.startsWith("__") && !operationTypes.includes(type.name)
62085
61881
  );
62086
61882
  const fragmentMap = fragmentListMap(
62087
61883
  config,
@@ -62098,7 +61894,7 @@ function typeDefinitions(config, filepath, body, docs, returnType) {
62098
61894
  }
62099
61895
  let idFields = AST12.tsNeverKeyword();
62100
61896
  const keys2 = keyFieldsForType(config.configFile, type.name);
62101
- if (graphql21.isObjectType(type) && keys2.length > 0 && keys2.every((key) => type.getFields()[key])) {
61897
+ if (graphql20.isObjectType(type) && keys2.length > 0 && keys2.every((key) => type.getFields()[key])) {
62102
61898
  idFields = AST12.tsTypeLiteral(
62103
61899
  keys2.map((key) => {
62104
61900
  const fieldType = type.getFields()[key];
@@ -62125,13 +61921,13 @@ function typeDefinitions(config, filepath, body, docs, returnType) {
62125
61921
  idFields = AST12.tsTypeLiteral([]);
62126
61922
  }
62127
61923
  let fields = AST12.tsTypeLiteral([]);
62128
- if (graphql21.isObjectType(type)) {
61924
+ if (graphql20.isObjectType(type)) {
62129
61925
  fields = AST12.tsTypeLiteral(
62130
61926
  Object.entries(type.getFields()).map(
62131
61927
  ([key, fieldType]) => {
62132
61928
  const unwrapped = unwrapType(config, fieldType.type);
62133
61929
  let typeOptions = AST12.tsUnionType([]);
62134
- if (graphql21.isScalarType(unwrapped.type)) {
61930
+ if (graphql20.isScalarType(unwrapped.type)) {
62135
61931
  typeOptions.types.push(
62136
61932
  scalarPropertyValue(
62137
61933
  config,
@@ -62145,11 +61941,11 @@ function typeDefinitions(config, filepath, body, docs, returnType) {
62145
61941
  }
62146
61942
  )
62147
61943
  );
62148
- } else if (graphql21.isEnumType(unwrapped.type)) {
61944
+ } else if (graphql20.isEnumType(unwrapped.type)) {
62149
61945
  typeOptions.types.push(
62150
61946
  AST12.tsTypeReference(AST12.identifier(unwrapped.type.name))
62151
61947
  );
62152
- } else if (!graphql21.isAbstractType(unwrapped.type)) {
61948
+ } else if (!graphql20.isAbstractType(unwrapped.type)) {
62153
61949
  typeOptions.types.push(record(unwrapped.type.name));
62154
61950
  } else {
62155
61951
  typeOptions.types.push(
@@ -62245,7 +62041,7 @@ function listDefinitions(config, filepath, body, docs) {
62245
62041
  const lists = [];
62246
62042
  const visitedLists = /* @__PURE__ */ new Set();
62247
62043
  for (const doc of docs) {
62248
- graphql21.visit(doc.document, {
62044
+ graphql20.visit(doc.document, {
62249
62045
  Directive(node, key, parent2, path2, ancestors) {
62250
62046
  if (![config.listDirective, config.paginateDirective].includes(node.name.value)) {
62251
62047
  return;
@@ -62267,7 +62063,7 @@ function listDefinitions(config, filepath, body, docs) {
62267
62063
  const targetFieldDefinition = parentType.getFields()[targetField.name.value];
62268
62064
  const { type: listType } = unwrapType(config, targetFieldDefinition.type);
62269
62065
  const possibleTypes = [];
62270
- if (graphql21.isAbstractType(listType)) {
62066
+ if (graphql20.isAbstractType(listType)) {
62271
62067
  possibleTypes.push(
62272
62068
  ...config.schema.getPossibleTypes(listType).map((possible) => possible.name)
62273
62069
  );
@@ -62429,7 +62225,7 @@ async function typescriptGenerator(config, docs) {
62429
62225
  }
62430
62226
 
62431
62227
  // src/codegen/generators/persistedQueries/index.ts
62432
- var graphql22 = __toESM(require("graphql"), 1);
62228
+ var graphql21 = __toESM(require("graphql"), 1);
62433
62229
  async function persistOutputGenerator(config, docs) {
62434
62230
  if (!config.persistedQueriesPath.endsWith(".json")) {
62435
62231
  throw new Error('Can write Persisted Queries only in a ".json" file.');
@@ -62439,8 +62235,8 @@ async function persistOutputGenerator(config, docs) {
62439
62235
  if (!generateArtifact) {
62440
62236
  return acc;
62441
62237
  }
62442
- let rawString = graphql22.print(
62443
- graphql22.visit(document, {
62238
+ let rawString = graphql21.print(
62239
+ graphql21.visit(document, {
62444
62240
  Directive(node) {
62445
62241
  if (config.isInternalDirective(node.name.value)) {
62446
62242
  return null;
@@ -62449,7 +62245,7 @@ async function persistOutputGenerator(config, docs) {
62449
62245
  })
62450
62246
  );
62451
62247
  const operations = document.definitions.filter(
62452
- ({ kind }) => kind === graphql22.Kind.OPERATION_DEFINITION
62248
+ ({ kind }) => kind === graphql21.Kind.OPERATION_DEFINITION
62453
62249
  );
62454
62250
  if (operations.length > 0 && operations[0].kind === "OperationDefinition") {
62455
62251
  if (artifact) {
@@ -62464,33 +62260,45 @@ async function persistOutputGenerator(config, docs) {
62464
62260
  }
62465
62261
 
62466
62262
  // src/codegen/generators/definitions/index.ts
62467
- var graphql24 = __toESM(require("graphql"), 1);
62263
+ var graphql23 = __toESM(require("graphql"), 1);
62468
62264
 
62469
62265
  // src/codegen/generators/definitions/enums.ts
62470
- var graphql23 = __toESM(require("graphql"), 1);
62266
+ var graphql22 = __toESM(require("graphql"), 1);
62471
62267
  var recast13 = __toESM(require_main2(), 1);
62472
62268
  var AST13 = recast13.types.builders;
62473
62269
  async function definitionsGenerator(config) {
62474
- const enums = graphql23.parse(graphql23.printSchema(config.schema)).definitions.filter(
62270
+ const enums = graphql22.parse(graphql22.printSchema(config.schema)).definitions.filter(
62475
62271
  (definition) => definition.kind === "EnumTypeDefinition"
62476
62272
  ).filter((def) => !config.isInternalEnum(def));
62477
62273
  const { code: runtimeDefinitions } = await printJS(
62478
62274
  AST13.program(
62479
62275
  enums.map((defn) => {
62480
62276
  const name = defn.name.value;
62481
- return moduleExport(
62277
+ const declaration = moduleExport(
62482
62278
  config,
62483
62279
  name,
62484
62280
  AST13.objectExpression(
62485
62281
  defn.values?.map((value) => {
62486
62282
  const str = value.name.value;
62487
- return AST13.objectProperty(
62283
+ const prop = AST13.objectProperty(
62488
62284
  AST13.stringLiteral(str),
62489
62285
  AST13.stringLiteral(str)
62490
62286
  );
62287
+ const deprecationReason = value.directives?.find((d) => d.name.value === "deprecated")?.arguments?.find((a) => a.name.value === "reason")?.value?.value;
62288
+ if (value.description || deprecationReason)
62289
+ prop.comments = [
62290
+ jsdocComment(value.description?.value ?? "", deprecationReason)
62291
+ ];
62292
+ return prop;
62491
62293
  }) || []
62492
62294
  )
62493
62295
  );
62296
+ if (defn.description) {
62297
+ declaration.comments = [
62298
+ AST13.commentBlock(`* ${defn.description.value} `, true, false)
62299
+ ];
62300
+ }
62301
+ return declaration;
62494
62302
  })
62495
62303
  )
62496
62304
  );
@@ -62499,11 +62307,19 @@ type ValuesOf<T> = T[keyof T]
62499
62307
  ` + enums.sort((a, b) => a.name.value.localeCompare(b.name.value)).map((definition) => {
62500
62308
  const name = definition.name.value;
62501
62309
  const values = definition.values;
62502
- return `
62310
+ let jsdoc = "";
62311
+ if (definition.description) {
62312
+ jsdoc = `
62313
+ /** ${definition.description.value} */`;
62314
+ }
62315
+ return `${jsdoc}
62503
62316
  export declare const ${name}: {
62504
- ${values?.map((value) => ` readonly ${value.name.value}: "${value.name.value}";`).join("\n")}
62317
+ ${values?.map(
62318
+ (value) => (value.description ? ` /** ${value.description.value} */
62319
+ ` : "") + ` readonly ${value.name.value}: "${value.name.value}";`
62320
+ ).join("\n")}
62505
62321
  }
62506
-
62322
+ ${jsdoc}
62507
62323
  export type ${name}$options = ValuesOf<typeof ${name}>
62508
62324
  `;
62509
62325
  }).join("");
@@ -62523,7 +62339,7 @@ async function schemaGenerator(config) {
62523
62339
  await Promise.all([
62524
62340
  fs_exports.writeFile(
62525
62341
  config.definitionsSchemaPath,
62526
- config.localSchema ? graphql24.printSchema(config.schema) : config.newSchema
62342
+ config.localSchema ? graphql23.printSchema(config.schema) : config.newSchema
62527
62343
  ),
62528
62344
  fs_exports.writeFile(config.definitionsDocumentsPath, config.newDocuments),
62529
62345
  definitionsGenerator(config)
@@ -62568,7 +62384,7 @@ async function writeIndexFile2(config, docs) {
62568
62384
  }
62569
62385
 
62570
62386
  // ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/helpers.js
62571
- var import_graphql2 = require("graphql");
62387
+ var import_graphql3 = require("graphql");
62572
62388
  function compareStrings(a, b) {
62573
62389
  if (String(a) < String(b)) {
62574
62390
  return -1;
@@ -62604,7 +62420,7 @@ function isSome(input) {
62604
62420
  }
62605
62421
 
62606
62422
  // ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/inspect.js
62607
- var import_graphql3 = require("graphql");
62423
+ var import_graphql4 = require("graphql");
62608
62424
  var MAX_RECURSIVE_DEPTH = 3;
62609
62425
  function inspect(value) {
62610
62426
  return formatValue(value, []);
@@ -62622,7 +62438,7 @@ function formatValue(value, seenValues) {
62622
62438
  }
62623
62439
  }
62624
62440
  function formatError(value) {
62625
- if (value instanceof import_graphql3.GraphQLError) {
62441
+ if (value instanceof import_graphql4.GraphQLError) {
62626
62442
  return value.toString();
62627
62443
  }
62628
62444
  return `${value.name}: ${value.message};
@@ -62705,43 +62521,43 @@ function getDirectivesInExtensions(node, pathToDirectivesInExtensions = ["direct
62705
62521
  }
62706
62522
 
62707
62523
  // ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/print-schema-with-directives.js
62708
- var import_graphql7 = require("graphql");
62524
+ var import_graphql8 = require("graphql");
62709
62525
 
62710
62526
  // ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/astFromType.js
62711
- var import_graphql4 = require("graphql");
62527
+ var import_graphql5 = require("graphql");
62712
62528
  function astFromType(type) {
62713
- if ((0, import_graphql4.isNonNullType)(type)) {
62529
+ if ((0, import_graphql5.isNonNullType)(type)) {
62714
62530
  const innerType = astFromType(type.ofType);
62715
- if (innerType.kind === import_graphql4.Kind.NON_NULL_TYPE) {
62531
+ if (innerType.kind === import_graphql5.Kind.NON_NULL_TYPE) {
62716
62532
  throw new Error(`Invalid type node ${inspect(type)}. Inner type of non-null type cannot be a non-null type.`);
62717
62533
  }
62718
62534
  return {
62719
- kind: import_graphql4.Kind.NON_NULL_TYPE,
62535
+ kind: import_graphql5.Kind.NON_NULL_TYPE,
62720
62536
  type: innerType
62721
62537
  };
62722
- } else if ((0, import_graphql4.isListType)(type)) {
62538
+ } else if ((0, import_graphql5.isListType)(type)) {
62723
62539
  return {
62724
- kind: import_graphql4.Kind.LIST_TYPE,
62540
+ kind: import_graphql5.Kind.LIST_TYPE,
62725
62541
  type: astFromType(type.ofType)
62726
62542
  };
62727
62543
  }
62728
62544
  return {
62729
- kind: import_graphql4.Kind.NAMED_TYPE,
62545
+ kind: import_graphql5.Kind.NAMED_TYPE,
62730
62546
  name: {
62731
- kind: import_graphql4.Kind.NAME,
62547
+ kind: import_graphql5.Kind.NAME,
62732
62548
  value: type.name
62733
62549
  }
62734
62550
  };
62735
62551
  }
62736
62552
 
62737
62553
  // ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/astFromValue.js
62738
- var import_graphql6 = require("graphql");
62554
+ var import_graphql7 = require("graphql");
62739
62555
 
62740
62556
  // ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/astFromValueUntyped.js
62741
- var import_graphql5 = require("graphql");
62557
+ var import_graphql6 = require("graphql");
62742
62558
  function astFromValueUntyped(value) {
62743
62559
  if (value === null) {
62744
- return { kind: import_graphql5.Kind.NULL };
62560
+ return { kind: import_graphql6.Kind.NULL };
62745
62561
  }
62746
62562
  if (value === void 0) {
62747
62563
  return null;
@@ -62754,7 +62570,7 @@ function astFromValueUntyped(value) {
62754
62570
  valuesNodes.push(itemNode);
62755
62571
  }
62756
62572
  }
62757
- return { kind: import_graphql5.Kind.LIST, values: valuesNodes };
62573
+ return { kind: import_graphql6.Kind.LIST, values: valuesNodes };
62758
62574
  }
62759
62575
  if (typeof value === "object") {
62760
62576
  const fieldNodes = [];
@@ -62763,26 +62579,26 @@ function astFromValueUntyped(value) {
62763
62579
  const ast = astFromValueUntyped(fieldValue);
62764
62580
  if (ast) {
62765
62581
  fieldNodes.push({
62766
- kind: import_graphql5.Kind.OBJECT_FIELD,
62767
- name: { kind: import_graphql5.Kind.NAME, value: fieldName },
62582
+ kind: import_graphql6.Kind.OBJECT_FIELD,
62583
+ name: { kind: import_graphql6.Kind.NAME, value: fieldName },
62768
62584
  value: ast
62769
62585
  });
62770
62586
  }
62771
62587
  }
62772
- return { kind: import_graphql5.Kind.OBJECT, fields: fieldNodes };
62588
+ return { kind: import_graphql6.Kind.OBJECT, fields: fieldNodes };
62773
62589
  }
62774
62590
  if (typeof value === "boolean") {
62775
- return { kind: import_graphql5.Kind.BOOLEAN, value };
62591
+ return { kind: import_graphql6.Kind.BOOLEAN, value };
62776
62592
  }
62777
62593
  if (typeof value === "bigint") {
62778
- return { kind: import_graphql5.Kind.INT, value: String(value) };
62594
+ return { kind: import_graphql6.Kind.INT, value: String(value) };
62779
62595
  }
62780
62596
  if (typeof value === "number" && isFinite(value)) {
62781
62597
  const stringNum = String(value);
62782
- return integerStringRegExp.test(stringNum) ? { kind: import_graphql5.Kind.INT, value: stringNum } : { kind: import_graphql5.Kind.FLOAT, value: stringNum };
62598
+ return integerStringRegExp.test(stringNum) ? { kind: import_graphql6.Kind.INT, value: stringNum } : { kind: import_graphql6.Kind.FLOAT, value: stringNum };
62783
62599
  }
62784
62600
  if (typeof value === "string") {
62785
- return { kind: import_graphql5.Kind.STRING, value };
62601
+ return { kind: import_graphql6.Kind.STRING, value };
62786
62602
  }
62787
62603
  throw new TypeError(`Cannot convert value to AST: ${value}.`);
62788
62604
  }
@@ -62790,20 +62606,20 @@ var integerStringRegExp = /^-?(?:0|[1-9][0-9]*)$/;
62790
62606
 
62791
62607
  // ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/astFromValue.js
62792
62608
  function astFromValue(value, type) {
62793
- if ((0, import_graphql6.isNonNullType)(type)) {
62609
+ if ((0, import_graphql7.isNonNullType)(type)) {
62794
62610
  const astValue = astFromValue(value, type.ofType);
62795
- if (astValue?.kind === import_graphql6.Kind.NULL) {
62611
+ if (astValue?.kind === import_graphql7.Kind.NULL) {
62796
62612
  return null;
62797
62613
  }
62798
62614
  return astValue;
62799
62615
  }
62800
62616
  if (value === null) {
62801
- return { kind: import_graphql6.Kind.NULL };
62617
+ return { kind: import_graphql7.Kind.NULL };
62802
62618
  }
62803
62619
  if (value === void 0) {
62804
62620
  return null;
62805
62621
  }
62806
- if ((0, import_graphql6.isListType)(type)) {
62622
+ if ((0, import_graphql7.isListType)(type)) {
62807
62623
  const itemType = type.ofType;
62808
62624
  if (isIterableObject(value)) {
62809
62625
  const valuesNodes = [];
@@ -62813,11 +62629,11 @@ function astFromValue(value, type) {
62813
62629
  valuesNodes.push(itemNode);
62814
62630
  }
62815
62631
  }
62816
- return { kind: import_graphql6.Kind.LIST, values: valuesNodes };
62632
+ return { kind: import_graphql7.Kind.LIST, values: valuesNodes };
62817
62633
  }
62818
62634
  return astFromValue(value, itemType);
62819
62635
  }
62820
- if ((0, import_graphql6.isInputObjectType)(type)) {
62636
+ if ((0, import_graphql7.isInputObjectType)(type)) {
62821
62637
  if (!isObjectLike(value)) {
62822
62638
  return null;
62823
62639
  }
@@ -62826,24 +62642,24 @@ function astFromValue(value, type) {
62826
62642
  const fieldValue = astFromValue(value[field.name], field.type);
62827
62643
  if (fieldValue) {
62828
62644
  fieldNodes.push({
62829
- kind: import_graphql6.Kind.OBJECT_FIELD,
62830
- name: { kind: import_graphql6.Kind.NAME, value: field.name },
62645
+ kind: import_graphql7.Kind.OBJECT_FIELD,
62646
+ name: { kind: import_graphql7.Kind.NAME, value: field.name },
62831
62647
  value: fieldValue
62832
62648
  });
62833
62649
  }
62834
62650
  }
62835
- return { kind: import_graphql6.Kind.OBJECT, fields: fieldNodes };
62651
+ return { kind: import_graphql7.Kind.OBJECT, fields: fieldNodes };
62836
62652
  }
62837
- if ((0, import_graphql6.isLeafType)(type)) {
62653
+ if ((0, import_graphql7.isLeafType)(type)) {
62838
62654
  const serialized = type.serialize(value);
62839
62655
  if (serialized == null) {
62840
62656
  return null;
62841
62657
  }
62842
- if ((0, import_graphql6.isEnumType)(type)) {
62843
- return { kind: import_graphql6.Kind.ENUM, value: serialized };
62658
+ if ((0, import_graphql7.isEnumType)(type)) {
62659
+ return { kind: import_graphql7.Kind.ENUM, value: serialized };
62844
62660
  }
62845
62661
  if (type.name === "ID" && typeof serialized === "string" && integerStringRegExp2.test(serialized)) {
62846
- return { kind: import_graphql6.Kind.INT, value: serialized };
62662
+ return { kind: import_graphql7.Kind.INT, value: serialized };
62847
62663
  }
62848
62664
  return astFromValueUntyped(serialized);
62849
62665
  }
@@ -62899,36 +62715,36 @@ function getDocumentNodeFromSchema(schema, options = {}) {
62899
62715
  const definitions = schemaNode != null ? [schemaNode] : [];
62900
62716
  const directives = schema.getDirectives();
62901
62717
  for (const directive of directives) {
62902
- if ((0, import_graphql7.isSpecifiedDirective)(directive)) {
62718
+ if ((0, import_graphql8.isSpecifiedDirective)(directive)) {
62903
62719
  continue;
62904
62720
  }
62905
62721
  definitions.push(astFromDirective(directive, schema, pathToDirectivesInExtensions));
62906
62722
  }
62907
62723
  for (const typeName in typesMap) {
62908
62724
  const type = typesMap[typeName];
62909
- const isPredefinedScalar = (0, import_graphql7.isSpecifiedScalarType)(type);
62910
- const isIntrospection = (0, import_graphql7.isIntrospectionType)(type);
62725
+ const isPredefinedScalar = (0, import_graphql8.isSpecifiedScalarType)(type);
62726
+ const isIntrospection = (0, import_graphql8.isIntrospectionType)(type);
62911
62727
  if (isPredefinedScalar || isIntrospection) {
62912
62728
  continue;
62913
62729
  }
62914
- if ((0, import_graphql7.isObjectType)(type)) {
62730
+ if ((0, import_graphql8.isObjectType)(type)) {
62915
62731
  definitions.push(astFromObjectType(type, schema, pathToDirectivesInExtensions));
62916
- } else if ((0, import_graphql7.isInterfaceType)(type)) {
62732
+ } else if ((0, import_graphql8.isInterfaceType)(type)) {
62917
62733
  definitions.push(astFromInterfaceType(type, schema, pathToDirectivesInExtensions));
62918
- } else if ((0, import_graphql7.isUnionType)(type)) {
62734
+ } else if ((0, import_graphql8.isUnionType)(type)) {
62919
62735
  definitions.push(astFromUnionType(type, schema, pathToDirectivesInExtensions));
62920
- } else if ((0, import_graphql7.isInputObjectType)(type)) {
62736
+ } else if ((0, import_graphql8.isInputObjectType)(type)) {
62921
62737
  definitions.push(astFromInputObjectType(type, schema, pathToDirectivesInExtensions));
62922
- } else if ((0, import_graphql7.isEnumType)(type)) {
62738
+ } else if ((0, import_graphql8.isEnumType)(type)) {
62923
62739
  definitions.push(astFromEnumType(type, schema, pathToDirectivesInExtensions));
62924
- } else if ((0, import_graphql7.isScalarType)(type)) {
62740
+ } else if ((0, import_graphql8.isScalarType)(type)) {
62925
62741
  definitions.push(astFromScalarType(type, schema, pathToDirectivesInExtensions));
62926
62742
  } else {
62927
62743
  throw new Error(`Unknown type ${type}.`);
62928
62744
  }
62929
62745
  }
62930
62746
  return {
62931
- kind: import_graphql7.Kind.DOCUMENT,
62747
+ kind: import_graphql8.Kind.DOCUMENT,
62932
62748
  definitions
62933
62749
  };
62934
62750
  }
@@ -62963,7 +62779,7 @@ function astFromSchema(schema, pathToDirectivesInExtensions) {
62963
62779
  operationTypeDefinitionNode.type = rootTypeAST;
62964
62780
  } else {
62965
62781
  operationTypeMap.set(operationTypeNode, {
62966
- kind: import_graphql7.Kind.OPERATION_TYPE_DEFINITION,
62782
+ kind: import_graphql8.Kind.OPERATION_TYPE_DEFINITION,
62967
62783
  operation: operationTypeNode,
62968
62784
  type: rootTypeAST
62969
62785
  });
@@ -62976,12 +62792,12 @@ function astFromSchema(schema, pathToDirectivesInExtensions) {
62976
62792
  return null;
62977
62793
  }
62978
62794
  const schemaNode = {
62979
- kind: operationTypes != null ? import_graphql7.Kind.SCHEMA_DEFINITION : import_graphql7.Kind.SCHEMA_EXTENSION,
62795
+ kind: operationTypes != null ? import_graphql8.Kind.SCHEMA_DEFINITION : import_graphql8.Kind.SCHEMA_EXTENSION,
62980
62796
  operationTypes,
62981
62797
  directives
62982
62798
  };
62983
62799
  schemaNode.description = schema.astNode?.description ?? schema.description != null ? {
62984
- kind: import_graphql7.Kind.STRING,
62800
+ kind: import_graphql8.Kind.STRING,
62985
62801
  value: schema.description,
62986
62802
  block: true
62987
62803
  } : void 0;
@@ -62989,19 +62805,19 @@ function astFromSchema(schema, pathToDirectivesInExtensions) {
62989
62805
  }
62990
62806
  function astFromDirective(directive, schema, pathToDirectivesInExtensions) {
62991
62807
  return {
62992
- kind: import_graphql7.Kind.DIRECTIVE_DEFINITION,
62808
+ kind: import_graphql8.Kind.DIRECTIVE_DEFINITION,
62993
62809
  description: directive.astNode?.description ?? (directive.description ? {
62994
- kind: import_graphql7.Kind.STRING,
62810
+ kind: import_graphql8.Kind.STRING,
62995
62811
  value: directive.description
62996
62812
  } : void 0),
62997
62813
  name: {
62998
- kind: import_graphql7.Kind.NAME,
62814
+ kind: import_graphql8.Kind.NAME,
62999
62815
  value: directive.name
63000
62816
  },
63001
62817
  arguments: directive.args?.map((arg) => astFromArg(arg, schema, pathToDirectivesInExtensions)),
63002
62818
  repeatable: directive.isRepeatable,
63003
62819
  locations: directive.locations?.map((location) => ({
63004
- kind: import_graphql7.Kind.NAME,
62820
+ kind: import_graphql8.Kind.NAME,
63005
62821
  value: location
63006
62822
  })) || []
63007
62823
  };
@@ -63051,14 +62867,14 @@ function getDeprecatableDirectiveNodes(entity, schema, pathToDirectivesInExtensi
63051
62867
  }
63052
62868
  function astFromArg(arg, schema, pathToDirectivesInExtensions) {
63053
62869
  return {
63054
- kind: import_graphql7.Kind.INPUT_VALUE_DEFINITION,
62870
+ kind: import_graphql8.Kind.INPUT_VALUE_DEFINITION,
63055
62871
  description: arg.astNode?.description ?? (arg.description ? {
63056
- kind: import_graphql7.Kind.STRING,
62872
+ kind: import_graphql8.Kind.STRING,
63057
62873
  value: arg.description,
63058
62874
  block: true
63059
62875
  } : void 0),
63060
62876
  name: {
63061
- kind: import_graphql7.Kind.NAME,
62877
+ kind: import_graphql8.Kind.NAME,
63062
62878
  value: arg.name
63063
62879
  },
63064
62880
  type: astFromType(arg.type),
@@ -63068,14 +62884,14 @@ function astFromArg(arg, schema, pathToDirectivesInExtensions) {
63068
62884
  }
63069
62885
  function astFromObjectType(type, schema, pathToDirectivesInExtensions) {
63070
62886
  return {
63071
- kind: import_graphql7.Kind.OBJECT_TYPE_DEFINITION,
62887
+ kind: import_graphql8.Kind.OBJECT_TYPE_DEFINITION,
63072
62888
  description: type.astNode?.description ?? (type.description ? {
63073
- kind: import_graphql7.Kind.STRING,
62889
+ kind: import_graphql8.Kind.STRING,
63074
62890
  value: type.description,
63075
62891
  block: true
63076
62892
  } : void 0),
63077
62893
  name: {
63078
- kind: import_graphql7.Kind.NAME,
62894
+ kind: import_graphql8.Kind.NAME,
63079
62895
  value: type.name
63080
62896
  },
63081
62897
  fields: Object.values(type.getFields()).map((field) => astFromField(field, schema, pathToDirectivesInExtensions)),
@@ -63085,14 +62901,14 @@ function astFromObjectType(type, schema, pathToDirectivesInExtensions) {
63085
62901
  }
63086
62902
  function astFromInterfaceType(type, schema, pathToDirectivesInExtensions) {
63087
62903
  const node = {
63088
- kind: import_graphql7.Kind.INTERFACE_TYPE_DEFINITION,
62904
+ kind: import_graphql8.Kind.INTERFACE_TYPE_DEFINITION,
63089
62905
  description: type.astNode?.description ?? (type.description ? {
63090
- kind: import_graphql7.Kind.STRING,
62906
+ kind: import_graphql8.Kind.STRING,
63091
62907
  value: type.description,
63092
62908
  block: true
63093
62909
  } : void 0),
63094
62910
  name: {
63095
- kind: import_graphql7.Kind.NAME,
62911
+ kind: import_graphql8.Kind.NAME,
63096
62912
  value: type.name
63097
62913
  },
63098
62914
  fields: Object.values(type.getFields()).map((field) => astFromField(field, schema, pathToDirectivesInExtensions)),
@@ -63105,14 +62921,14 @@ function astFromInterfaceType(type, schema, pathToDirectivesInExtensions) {
63105
62921
  }
63106
62922
  function astFromUnionType(type, schema, pathToDirectivesInExtensions) {
63107
62923
  return {
63108
- kind: import_graphql7.Kind.UNION_TYPE_DEFINITION,
62924
+ kind: import_graphql8.Kind.UNION_TYPE_DEFINITION,
63109
62925
  description: type.astNode?.description ?? (type.description ? {
63110
- kind: import_graphql7.Kind.STRING,
62926
+ kind: import_graphql8.Kind.STRING,
63111
62927
  value: type.description,
63112
62928
  block: true
63113
62929
  } : void 0),
63114
62930
  name: {
63115
- kind: import_graphql7.Kind.NAME,
62931
+ kind: import_graphql8.Kind.NAME,
63116
62932
  value: type.name
63117
62933
  },
63118
62934
  directives: getDirectiveNodes(type, schema, pathToDirectivesInExtensions),
@@ -63121,14 +62937,14 @@ function astFromUnionType(type, schema, pathToDirectivesInExtensions) {
63121
62937
  }
63122
62938
  function astFromInputObjectType(type, schema, pathToDirectivesInExtensions) {
63123
62939
  return {
63124
- kind: import_graphql7.Kind.INPUT_OBJECT_TYPE_DEFINITION,
62940
+ kind: import_graphql8.Kind.INPUT_OBJECT_TYPE_DEFINITION,
63125
62941
  description: type.astNode?.description ?? (type.description ? {
63126
- kind: import_graphql7.Kind.STRING,
62942
+ kind: import_graphql8.Kind.STRING,
63127
62943
  value: type.description,
63128
62944
  block: true
63129
62945
  } : void 0),
63130
62946
  name: {
63131
- kind: import_graphql7.Kind.NAME,
62947
+ kind: import_graphql8.Kind.NAME,
63132
62948
  value: type.name
63133
62949
  },
63134
62950
  fields: Object.values(type.getFields()).map((field) => astFromInputField(field, schema, pathToDirectivesInExtensions)),
@@ -63137,14 +62953,14 @@ function astFromInputObjectType(type, schema, pathToDirectivesInExtensions) {
63137
62953
  }
63138
62954
  function astFromEnumType(type, schema, pathToDirectivesInExtensions) {
63139
62955
  return {
63140
- kind: import_graphql7.Kind.ENUM_TYPE_DEFINITION,
62956
+ kind: import_graphql8.Kind.ENUM_TYPE_DEFINITION,
63141
62957
  description: type.astNode?.description ?? (type.description ? {
63142
- kind: import_graphql7.Kind.STRING,
62958
+ kind: import_graphql8.Kind.STRING,
63143
62959
  value: type.description,
63144
62960
  block: true
63145
62961
  } : void 0),
63146
62962
  name: {
63147
- kind: import_graphql7.Kind.NAME,
62963
+ kind: import_graphql8.Kind.NAME,
63148
62964
  value: type.name
63149
62965
  },
63150
62966
  values: Object.values(type.getValues()).map((value) => astFromEnumValue(value, schema, pathToDirectivesInExtensions)),
@@ -63162,14 +62978,14 @@ function astFromScalarType(type, schema, pathToDirectivesInExtensions) {
63162
62978
  directives.push(makeDirectiveNode("specifiedBy", specifiedByArgs));
63163
62979
  }
63164
62980
  return {
63165
- kind: import_graphql7.Kind.SCALAR_TYPE_DEFINITION,
62981
+ kind: import_graphql8.Kind.SCALAR_TYPE_DEFINITION,
63166
62982
  description: type.astNode?.description ?? (type.description ? {
63167
- kind: import_graphql7.Kind.STRING,
62983
+ kind: import_graphql8.Kind.STRING,
63168
62984
  value: type.description,
63169
62985
  block: true
63170
62986
  } : void 0),
63171
62987
  name: {
63172
- kind: import_graphql7.Kind.NAME,
62988
+ kind: import_graphql8.Kind.NAME,
63173
62989
  value: type.name
63174
62990
  },
63175
62991
  directives
@@ -63177,14 +62993,14 @@ function astFromScalarType(type, schema, pathToDirectivesInExtensions) {
63177
62993
  }
63178
62994
  function astFromField(field, schema, pathToDirectivesInExtensions) {
63179
62995
  return {
63180
- kind: import_graphql7.Kind.FIELD_DEFINITION,
62996
+ kind: import_graphql8.Kind.FIELD_DEFINITION,
63181
62997
  description: field.astNode?.description ?? (field.description ? {
63182
- kind: import_graphql7.Kind.STRING,
62998
+ kind: import_graphql8.Kind.STRING,
63183
62999
  value: field.description,
63184
63000
  block: true
63185
63001
  } : void 0),
63186
63002
  name: {
63187
- kind: import_graphql7.Kind.NAME,
63003
+ kind: import_graphql8.Kind.NAME,
63188
63004
  value: field.name
63189
63005
  },
63190
63006
  arguments: field.args.map((arg) => astFromArg(arg, schema, pathToDirectivesInExtensions)),
@@ -63194,14 +63010,14 @@ function astFromField(field, schema, pathToDirectivesInExtensions) {
63194
63010
  }
63195
63011
  function astFromInputField(field, schema, pathToDirectivesInExtensions) {
63196
63012
  return {
63197
- kind: import_graphql7.Kind.INPUT_VALUE_DEFINITION,
63013
+ kind: import_graphql8.Kind.INPUT_VALUE_DEFINITION,
63198
63014
  description: field.astNode?.description ?? (field.description ? {
63199
- kind: import_graphql7.Kind.STRING,
63015
+ kind: import_graphql8.Kind.STRING,
63200
63016
  value: field.description,
63201
63017
  block: true
63202
63018
  } : void 0),
63203
63019
  name: {
63204
- kind: import_graphql7.Kind.NAME,
63020
+ kind: import_graphql8.Kind.NAME,
63205
63021
  value: field.name
63206
63022
  },
63207
63023
  type: astFromType(field.type),
@@ -63211,21 +63027,21 @@ function astFromInputField(field, schema, pathToDirectivesInExtensions) {
63211
63027
  }
63212
63028
  function astFromEnumValue(value, schema, pathToDirectivesInExtensions) {
63213
63029
  return {
63214
- kind: import_graphql7.Kind.ENUM_VALUE_DEFINITION,
63030
+ kind: import_graphql8.Kind.ENUM_VALUE_DEFINITION,
63215
63031
  description: value.astNode?.description ?? (value.description ? {
63216
- kind: import_graphql7.Kind.STRING,
63032
+ kind: import_graphql8.Kind.STRING,
63217
63033
  value: value.description,
63218
63034
  block: true
63219
63035
  } : void 0),
63220
63036
  name: {
63221
- kind: import_graphql7.Kind.NAME,
63037
+ kind: import_graphql8.Kind.NAME,
63222
63038
  value: value.name
63223
63039
  },
63224
63040
  directives: getDeprecatableDirectiveNodes(value, schema, pathToDirectivesInExtensions)
63225
63041
  };
63226
63042
  }
63227
63043
  function makeDeprecatedDirective(deprecationReason) {
63228
- return makeDirectiveNode("deprecated", { reason: deprecationReason }, import_graphql7.GraphQLDeprecatedDirective);
63044
+ return makeDirectiveNode("deprecated", { reason: deprecationReason }, import_graphql8.GraphQLDeprecatedDirective);
63229
63045
  }
63230
63046
  function makeDirectiveNode(name, args, directive) {
63231
63047
  const directiveArguments = [];
@@ -63237,9 +63053,9 @@ function makeDirectiveNode(name, args, directive) {
63237
63053
  const value = astFromValue(argValue, arg.type);
63238
63054
  if (value) {
63239
63055
  directiveArguments.push({
63240
- kind: import_graphql7.Kind.ARGUMENT,
63056
+ kind: import_graphql8.Kind.ARGUMENT,
63241
63057
  name: {
63242
- kind: import_graphql7.Kind.NAME,
63058
+ kind: import_graphql8.Kind.NAME,
63243
63059
  value: argName
63244
63060
  },
63245
63061
  value
@@ -63253,9 +63069,9 @@ function makeDirectiveNode(name, args, directive) {
63253
63069
  const value = astFromValueUntyped(argValue);
63254
63070
  if (value) {
63255
63071
  directiveArguments.push({
63256
- kind: import_graphql7.Kind.ARGUMENT,
63072
+ kind: import_graphql8.Kind.ARGUMENT,
63257
63073
  name: {
63258
- kind: import_graphql7.Kind.NAME,
63074
+ kind: import_graphql8.Kind.NAME,
63259
63075
  value: argName
63260
63076
  },
63261
63077
  value
@@ -63264,9 +63080,9 @@ function makeDirectiveNode(name, args, directive) {
63264
63080
  }
63265
63081
  }
63266
63082
  return {
63267
- kind: import_graphql7.Kind.DIRECTIVE,
63083
+ kind: import_graphql8.Kind.DIRECTIVE,
63268
63084
  name: {
63269
- kind: import_graphql7.Kind.NAME,
63085
+ kind: import_graphql8.Kind.NAME,
63270
63086
  value: name
63271
63087
  },
63272
63088
  arguments: directiveArguments
@@ -63289,7 +63105,7 @@ function makeDirectiveNodes(schema, directiveValues) {
63289
63105
  }
63290
63106
 
63291
63107
  // ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/comments.js
63292
- var import_graphql8 = require("graphql");
63108
+ var import_graphql9 = require("graphql");
63293
63109
  var MAX_LINE_LENGTH = 80;
63294
63110
  var commentsRegistry = {};
63295
63111
  function resetComments() {
@@ -63534,7 +63350,7 @@ var printDocASTReducerWithComments = Object.keys(printDocASTReducer).reduce((pre
63534
63350
  }
63535
63351
  }), {});
63536
63352
  function printWithComments(ast) {
63537
- return (0, import_graphql8.visit)(ast, printDocASTReducerWithComments);
63353
+ return (0, import_graphql9.visit)(ast, printDocASTReducerWithComments);
63538
63354
  }
63539
63355
  function isFieldDefinitionNode(node) {
63540
63356
  return node.kind === "FieldDefinition";
@@ -63553,7 +63369,7 @@ function getLeadingCommentBlock(node) {
63553
63369
  }
63554
63370
  const comments = [];
63555
63371
  let token = loc.startToken.prev;
63556
- while (token != null && token.kind === import_graphql8.TokenKind.COMMENT && token.next != null && token.prev != null && token.line + 1 === token.next.line && token.line !== token.prev.line) {
63372
+ while (token != null && token.kind === import_graphql9.TokenKind.COMMENT && token.next != null && token.prev != null && token.line + 1 === token.next.line && token.line !== token.prev.line) {
63557
63373
  const value = String(token.value);
63558
63374
  comments.push(value);
63559
63375
  token = token.prev;
@@ -63605,9 +63421,9 @@ function isBlank(str) {
63605
63421
  }
63606
63422
 
63607
63423
  // ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/isDocumentNode.js
63608
- var import_graphql9 = require("graphql");
63424
+ var import_graphql10 = require("graphql");
63609
63425
  function isDocumentNode(object) {
63610
- return object && typeof object === "object" && "kind" in object && object.kind === import_graphql9.Kind.DOCUMENT;
63426
+ return object && typeof object === "object" && "kind" in object && object.kind === import_graphql10.Kind.DOCUMENT;
63611
63427
  }
63612
63428
 
63613
63429
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/arguments.js
@@ -63631,7 +63447,7 @@ function deduplicateArguments(args, config) {
63631
63447
  }
63632
63448
 
63633
63449
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/directives.js
63634
- var import_graphql10 = require("graphql");
63450
+ var import_graphql11 = require("graphql");
63635
63451
  function directiveAlreadyExists(directivesArr, otherDirective) {
63636
63452
  return !!directivesArr.find((directive) => directive.name.value === otherDirective.name.value);
63637
63453
  }
@@ -63691,11 +63507,11 @@ function mergeDirectives(d1 = [], d2 = [], config, directives) {
63691
63507
  return result;
63692
63508
  }
63693
63509
  function validateInputs(node, existingNode) {
63694
- const printedNode = (0, import_graphql10.print)({
63510
+ const printedNode = (0, import_graphql11.print)({
63695
63511
  ...node,
63696
63512
  description: void 0
63697
63513
  });
63698
- const printedExistingNode = (0, import_graphql10.print)({
63514
+ const printedExistingNode = (0, import_graphql11.print)({
63699
63515
  ...existingNode,
63700
63516
  description: void 0
63701
63517
  });
@@ -63762,7 +63578,7 @@ function mergeEnumValues(first, second, config, directives) {
63762
63578
  }
63763
63579
 
63764
63580
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/enum.js
63765
- var import_graphql11 = require("graphql");
63581
+ var import_graphql12 = require("graphql");
63766
63582
  function mergeEnum(e1, e2, config, directives) {
63767
63583
  if (e2) {
63768
63584
  return {
@@ -63776,33 +63592,33 @@ function mergeEnum(e1, e2, config, directives) {
63776
63592
  }
63777
63593
  return config?.convertExtensions ? {
63778
63594
  ...e1,
63779
- kind: import_graphql11.Kind.ENUM_TYPE_DEFINITION
63595
+ kind: import_graphql12.Kind.ENUM_TYPE_DEFINITION
63780
63596
  } : e1;
63781
63597
  }
63782
63598
 
63783
63599
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/utils.js
63784
- var import_graphql12 = require("graphql");
63600
+ var import_graphql13 = require("graphql");
63785
63601
  function isStringTypes(types14) {
63786
63602
  return typeof types14 === "string";
63787
63603
  }
63788
63604
  function isSourceTypes(types14) {
63789
- return types14 instanceof import_graphql12.Source;
63605
+ return types14 instanceof import_graphql13.Source;
63790
63606
  }
63791
63607
  function extractType(type) {
63792
63608
  let visitedType = type;
63793
- while (visitedType.kind === import_graphql12.Kind.LIST_TYPE || visitedType.kind === "NonNullType") {
63609
+ while (visitedType.kind === import_graphql13.Kind.LIST_TYPE || visitedType.kind === "NonNullType") {
63794
63610
  visitedType = visitedType.type;
63795
63611
  }
63796
63612
  return visitedType;
63797
63613
  }
63798
63614
  function isWrappingTypeNode(type) {
63799
- return type.kind !== import_graphql12.Kind.NAMED_TYPE;
63615
+ return type.kind !== import_graphql13.Kind.NAMED_TYPE;
63800
63616
  }
63801
63617
  function isListTypeNode(type) {
63802
- return type.kind === import_graphql12.Kind.LIST_TYPE;
63618
+ return type.kind === import_graphql13.Kind.LIST_TYPE;
63803
63619
  }
63804
63620
  function isNonNullTypeNode(type) {
63805
- return type.kind === import_graphql12.Kind.NON_NULL_TYPE;
63621
+ return type.kind === import_graphql13.Kind.NON_NULL_TYPE;
63806
63622
  }
63807
63623
  function printTypeNode(type) {
63808
63624
  if (isListTypeNode(type)) {
@@ -63905,7 +63721,7 @@ function safeChangeForFieldType(oldType, newType, ignoreNullability = false) {
63905
63721
  }
63906
63722
 
63907
63723
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/input-type.js
63908
- var import_graphql13 = require("graphql");
63724
+ var import_graphql14 = require("graphql");
63909
63725
  function mergeInputType(node, existingNode, config, directives) {
63910
63726
  if (existingNode) {
63911
63727
  try {
@@ -63923,12 +63739,12 @@ function mergeInputType(node, existingNode, config, directives) {
63923
63739
  }
63924
63740
  return config?.convertExtensions ? {
63925
63741
  ...node,
63926
- kind: import_graphql13.Kind.INPUT_OBJECT_TYPE_DEFINITION
63742
+ kind: import_graphql14.Kind.INPUT_OBJECT_TYPE_DEFINITION
63927
63743
  } : node;
63928
63744
  }
63929
63745
 
63930
63746
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/interface.js
63931
- var import_graphql14 = require("graphql");
63747
+ var import_graphql15 = require("graphql");
63932
63748
 
63933
63749
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/merge-named-type-array.js
63934
63750
  function alreadyExists(arr, other) {
@@ -63961,15 +63777,15 @@ function mergeInterface(node, existingNode, config, directives) {
63961
63777
  }
63962
63778
  return config?.convertExtensions ? {
63963
63779
  ...node,
63964
- kind: import_graphql14.Kind.INTERFACE_TYPE_DEFINITION
63780
+ kind: import_graphql15.Kind.INTERFACE_TYPE_DEFINITION
63965
63781
  } : node;
63966
63782
  }
63967
63783
 
63968
63784
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/merge-nodes.js
63969
- var import_graphql19 = require("graphql");
63785
+ var import_graphql20 = require("graphql");
63970
63786
 
63971
63787
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/type.js
63972
- var import_graphql15 = require("graphql");
63788
+ var import_graphql16 = require("graphql");
63973
63789
  function mergeType(node, existingNode, config, directives) {
63974
63790
  if (existingNode) {
63975
63791
  try {
@@ -63988,12 +63804,12 @@ function mergeType(node, existingNode, config, directives) {
63988
63804
  }
63989
63805
  return config?.convertExtensions ? {
63990
63806
  ...node,
63991
- kind: import_graphql15.Kind.OBJECT_TYPE_DEFINITION
63807
+ kind: import_graphql16.Kind.OBJECT_TYPE_DEFINITION
63992
63808
  } : node;
63993
63809
  }
63994
63810
 
63995
63811
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/scalar.js
63996
- var import_graphql16 = require("graphql");
63812
+ var import_graphql17 = require("graphql");
63997
63813
  function mergeScalar(node, existingNode, config, directives) {
63998
63814
  if (existingNode) {
63999
63815
  return {
@@ -64006,31 +63822,31 @@ function mergeScalar(node, existingNode, config, directives) {
64006
63822
  }
64007
63823
  return config?.convertExtensions ? {
64008
63824
  ...node,
64009
- kind: import_graphql16.Kind.SCALAR_TYPE_DEFINITION
63825
+ kind: import_graphql17.Kind.SCALAR_TYPE_DEFINITION
64010
63826
  } : node;
64011
63827
  }
64012
63828
 
64013
63829
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/union.js
64014
- var import_graphql17 = require("graphql");
63830
+ var import_graphql18 = require("graphql");
64015
63831
  function mergeUnion(first, second, config, directives) {
64016
63832
  if (second) {
64017
63833
  return {
64018
63834
  name: first.name,
64019
63835
  description: first["description"] || second["description"],
64020
63836
  directives: mergeDirectives(first.directives, second.directives, config, directives),
64021
- kind: config?.convertExtensions || first.kind === "UnionTypeDefinition" || second.kind === "UnionTypeDefinition" ? import_graphql17.Kind.UNION_TYPE_DEFINITION : import_graphql17.Kind.UNION_TYPE_EXTENSION,
63837
+ kind: config?.convertExtensions || first.kind === "UnionTypeDefinition" || second.kind === "UnionTypeDefinition" ? import_graphql18.Kind.UNION_TYPE_DEFINITION : import_graphql18.Kind.UNION_TYPE_EXTENSION,
64022
63838
  loc: first.loc,
64023
63839
  types: mergeNamedTypeArray(first.types, second.types, config)
64024
63840
  };
64025
63841
  }
64026
63842
  return config?.convertExtensions ? {
64027
63843
  ...first,
64028
- kind: import_graphql17.Kind.UNION_TYPE_DEFINITION
63844
+ kind: import_graphql18.Kind.UNION_TYPE_DEFINITION
64029
63845
  } : first;
64030
63846
  }
64031
63847
 
64032
63848
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/schema-def.js
64033
- var import_graphql18 = require("graphql");
63849
+ var import_graphql19 = require("graphql");
64034
63850
  var DEFAULT_OPERATION_TYPE_NAME_MAP = {
64035
63851
  query: "Query",
64036
63852
  mutation: "Mutation",
@@ -64049,7 +63865,7 @@ function mergeOperationTypes(opNodeList = [], existingOpNodeList = []) {
64049
63865
  function mergeSchemaDefs(node, existingNode, config, directives) {
64050
63866
  if (existingNode) {
64051
63867
  return {
64052
- kind: node.kind === import_graphql18.Kind.SCHEMA_DEFINITION || existingNode.kind === import_graphql18.Kind.SCHEMA_DEFINITION ? import_graphql18.Kind.SCHEMA_DEFINITION : import_graphql18.Kind.SCHEMA_EXTENSION,
63868
+ kind: node.kind === import_graphql19.Kind.SCHEMA_DEFINITION || existingNode.kind === import_graphql19.Kind.SCHEMA_DEFINITION ? import_graphql19.Kind.SCHEMA_DEFINITION : import_graphql19.Kind.SCHEMA_EXTENSION,
64053
63869
  description: node["description"] || existingNode["description"],
64054
63870
  directives: mergeDirectives(node.directives, existingNode.directives, config, directives),
64055
63871
  operationTypes: mergeOperationTypes(node.operationTypes, existingNode.operationTypes)
@@ -64057,7 +63873,7 @@ function mergeSchemaDefs(node, existingNode, config, directives) {
64057
63873
  }
64058
63874
  return config?.convertExtensions ? {
64059
63875
  ...node,
64060
- kind: import_graphql18.Kind.SCHEMA_DEFINITION
63876
+ kind: import_graphql19.Kind.SCHEMA_DEFINITION
64061
63877
  } : node;
64062
63878
  }
64063
63879
 
@@ -64081,36 +63897,36 @@ function mergeGraphQLNodes(nodes, config, directives = {}) {
64081
63897
  delete mergedResultMap[name];
64082
63898
  } else {
64083
63899
  switch (nodeDefinition.kind) {
64084
- case import_graphql19.Kind.OBJECT_TYPE_DEFINITION:
64085
- case import_graphql19.Kind.OBJECT_TYPE_EXTENSION:
63900
+ case import_graphql20.Kind.OBJECT_TYPE_DEFINITION:
63901
+ case import_graphql20.Kind.OBJECT_TYPE_EXTENSION:
64086
63902
  mergedResultMap[name] = mergeType(nodeDefinition, mergedResultMap[name], config, directives);
64087
63903
  break;
64088
- case import_graphql19.Kind.ENUM_TYPE_DEFINITION:
64089
- case import_graphql19.Kind.ENUM_TYPE_EXTENSION:
63904
+ case import_graphql20.Kind.ENUM_TYPE_DEFINITION:
63905
+ case import_graphql20.Kind.ENUM_TYPE_EXTENSION:
64090
63906
  mergedResultMap[name] = mergeEnum(nodeDefinition, mergedResultMap[name], config, directives);
64091
63907
  break;
64092
- case import_graphql19.Kind.UNION_TYPE_DEFINITION:
64093
- case import_graphql19.Kind.UNION_TYPE_EXTENSION:
63908
+ case import_graphql20.Kind.UNION_TYPE_DEFINITION:
63909
+ case import_graphql20.Kind.UNION_TYPE_EXTENSION:
64094
63910
  mergedResultMap[name] = mergeUnion(nodeDefinition, mergedResultMap[name], config, directives);
64095
63911
  break;
64096
- case import_graphql19.Kind.SCALAR_TYPE_DEFINITION:
64097
- case import_graphql19.Kind.SCALAR_TYPE_EXTENSION:
63912
+ case import_graphql20.Kind.SCALAR_TYPE_DEFINITION:
63913
+ case import_graphql20.Kind.SCALAR_TYPE_EXTENSION:
64098
63914
  mergedResultMap[name] = mergeScalar(nodeDefinition, mergedResultMap[name], config, directives);
64099
63915
  break;
64100
- case import_graphql19.Kind.INPUT_OBJECT_TYPE_DEFINITION:
64101
- case import_graphql19.Kind.INPUT_OBJECT_TYPE_EXTENSION:
63916
+ case import_graphql20.Kind.INPUT_OBJECT_TYPE_DEFINITION:
63917
+ case import_graphql20.Kind.INPUT_OBJECT_TYPE_EXTENSION:
64102
63918
  mergedResultMap[name] = mergeInputType(nodeDefinition, mergedResultMap[name], config, directives);
64103
63919
  break;
64104
- case import_graphql19.Kind.INTERFACE_TYPE_DEFINITION:
64105
- case import_graphql19.Kind.INTERFACE_TYPE_EXTENSION:
63920
+ case import_graphql20.Kind.INTERFACE_TYPE_DEFINITION:
63921
+ case import_graphql20.Kind.INTERFACE_TYPE_EXTENSION:
64106
63922
  mergedResultMap[name] = mergeInterface(nodeDefinition, mergedResultMap[name], config, directives);
64107
63923
  break;
64108
- case import_graphql19.Kind.DIRECTIVE_DEFINITION:
63924
+ case import_graphql20.Kind.DIRECTIVE_DEFINITION:
64109
63925
  mergedResultMap[name] = mergeDirective(nodeDefinition, mergedResultMap[name]);
64110
63926
  break;
64111
63927
  }
64112
63928
  }
64113
- } else if (nodeDefinition.kind === import_graphql19.Kind.SCHEMA_DEFINITION || nodeDefinition.kind === import_graphql19.Kind.SCHEMA_EXTENSION) {
63929
+ } else if (nodeDefinition.kind === import_graphql20.Kind.SCHEMA_DEFINITION || nodeDefinition.kind === import_graphql20.Kind.SCHEMA_EXTENSION) {
64114
63930
  mergedResultMap[schemaDefSymbol] = mergeSchemaDefs(nodeDefinition, mergedResultMap[schemaDefSymbol], config);
64115
63931
  }
64116
63932
  }
@@ -64118,11 +63934,11 @@ function mergeGraphQLNodes(nodes, config, directives = {}) {
64118
63934
  }
64119
63935
 
64120
63936
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/merge-typedefs.js
64121
- var import_graphql20 = require("graphql");
63937
+ var import_graphql21 = require("graphql");
64122
63938
  function mergeTypeDefs(typeSource, config) {
64123
63939
  resetComments();
64124
63940
  const doc = {
64125
- kind: import_graphql20.Kind.DOCUMENT,
63941
+ kind: import_graphql21.Kind.DOCUMENT,
64126
63942
  definitions: mergeGraphQLTypes(typeSource, {
64127
63943
  useSchemaDefinition: true,
64128
63944
  forceSchemaDefinition: false,
@@ -64149,14 +63965,14 @@ function visitTypeSources(typeSource, options, allDirectives = [], allNodes = []
64149
63965
  for (const type of typeSource) {
64150
63966
  visitTypeSources(type, options, allDirectives, allNodes, visitedTypeSources);
64151
63967
  }
64152
- } else if ((0, import_graphql20.isSchema)(typeSource)) {
63968
+ } else if ((0, import_graphql21.isSchema)(typeSource)) {
64153
63969
  const documentNode = getDocumentNodeFromSchema(typeSource, options);
64154
63970
  visitTypeSources(documentNode.definitions, options, allDirectives, allNodes, visitedTypeSources);
64155
63971
  } else if (isStringTypes(typeSource) || isSourceTypes(typeSource)) {
64156
- const documentNode = (0, import_graphql20.parse)(typeSource, options);
63972
+ const documentNode = (0, import_graphql21.parse)(typeSource, options);
64157
63973
  visitTypeSources(documentNode.definitions, options, allDirectives, allNodes, visitedTypeSources);
64158
- } else if (typeof typeSource === "object" && (0, import_graphql20.isDefinitionNode)(typeSource)) {
64159
- if (typeSource.kind === import_graphql20.Kind.DIRECTIVE_DEFINITION) {
63974
+ } else if (typeof typeSource === "object" && (0, import_graphql21.isDefinitionNode)(typeSource)) {
63975
+ if (typeSource.kind === import_graphql21.Kind.DIRECTIVE_DEFINITION) {
64160
63976
  allDirectives.push(typeSource);
64161
63977
  } else {
64162
63978
  allNodes.push(typeSource);
@@ -64176,7 +63992,7 @@ function mergeGraphQLTypes(typeSource, config) {
64176
63992
  const mergedNodes = mergeGraphQLNodes(allNodes, config, mergedDirectives);
64177
63993
  if (config?.useSchemaDefinition) {
64178
63994
  const schemaDef = mergedNodes[schemaDefSymbol] || {
64179
- kind: import_graphql20.Kind.SCHEMA_DEFINITION,
63995
+ kind: import_graphql21.Kind.SCHEMA_DEFINITION,
64180
63996
  operationTypes: []
64181
63997
  };
64182
63998
  const operationTypes = schemaDef.operationTypes;
@@ -64187,9 +64003,9 @@ function mergeGraphQLTypes(typeSource, config) {
64187
64003
  const existingPossibleRootType = mergedNodes[possibleRootTypeName];
64188
64004
  if (existingPossibleRootType != null && existingPossibleRootType.name != null) {
64189
64005
  operationTypes.push({
64190
- kind: import_graphql20.Kind.OPERATION_TYPE_DEFINITION,
64006
+ kind: import_graphql21.Kind.OPERATION_TYPE_DEFINITION,
64191
64007
  type: {
64192
- kind: import_graphql20.Kind.NAMED_TYPE,
64008
+ kind: import_graphql21.Kind.NAMED_TYPE,
64193
64009
  name: existingPossibleRootType.name
64194
64010
  },
64195
64011
  operation: opTypeDefNodeType
@@ -64203,15 +64019,15 @@ function mergeGraphQLTypes(typeSource, config) {
64203
64019
  }
64204
64020
  if (config?.forceSchemaDefinition && !mergedNodes[schemaDefSymbol]?.operationTypes?.length) {
64205
64021
  mergedNodes[schemaDefSymbol] = {
64206
- kind: import_graphql20.Kind.SCHEMA_DEFINITION,
64022
+ kind: import_graphql21.Kind.SCHEMA_DEFINITION,
64207
64023
  operationTypes: [
64208
64024
  {
64209
- kind: import_graphql20.Kind.OPERATION_TYPE_DEFINITION,
64025
+ kind: import_graphql21.Kind.OPERATION_TYPE_DEFINITION,
64210
64026
  operation: "query",
64211
64027
  type: {
64212
- kind: import_graphql20.Kind.NAMED_TYPE,
64028
+ kind: import_graphql21.Kind.NAMED_TYPE,
64213
64029
  name: {
64214
- kind: import_graphql20.Kind.NAME,
64030
+ kind: import_graphql21.Kind.NAME,
64215
64031
  value: "Query"
64216
64032
  }
64217
64033
  }
@@ -64228,7 +64044,7 @@ function mergeGraphQLTypes(typeSource, config) {
64228
64044
  }
64229
64045
 
64230
64046
  // src/codegen/transforms/schema.ts
64231
- var graphql25 = __toESM(require("graphql"), 1);
64047
+ var graphql24 = __toESM(require("graphql"), 1);
64232
64048
  async function graphqlExtensions(config, documents) {
64233
64049
  let internalSchema = `
64234
64050
  enum CachePolicy {
@@ -64351,7 +64167,7 @@ directive @${config.componentFieldDirective}(field: String!, prop: String, expor
64351
64167
  const args = fragmentArguments(config, "", field.parent);
64352
64168
  if (args.length > 0) {
64353
64169
  argString = "(" + args.map((arg) => {
64354
- const typeName = graphql25.print(arg.type);
64170
+ const typeName = graphql24.print(arg.type);
64355
64171
  return `${arg.name}:${typeName}${arg.required ? "!" : ""}`;
64356
64172
  }).join("\n") + ")";
64357
64173
  }
@@ -64361,20 +64177,20 @@ directive @${config.componentFieldDirective}(field: String!, prop: String, expor
64361
64177
  `;
64362
64178
  }).join("\n");
64363
64179
  extensions += `${Object.keys(config.configFile.features?.runtimeScalars ?? {}).map((scalar) => `scalar ${scalar}`).join("\n")}`;
64364
- config.newSchema = graphql25.print(mergeTypeDefs([internalSchema, config.newSchema]));
64180
+ config.newSchema = graphql24.print(mergeTypeDefs([internalSchema, config.newSchema]));
64365
64181
  config.schemaString += extensions;
64366
- config.schema = graphql25.buildSchema(
64367
- graphql25.print(
64368
- mergeTypeDefs([graphql25.printSchema(config.schema), internalSchema, extensions])
64182
+ config.schema = graphql24.buildSchema(
64183
+ graphql24.print(
64184
+ mergeTypeDefs([graphql24.printSchema(config.schema), internalSchema, extensions])
64369
64185
  )
64370
64186
  );
64371
64187
  }
64372
64188
 
64373
64189
  // src/codegen/transforms/typename.ts
64374
- var graphql26 = __toESM(require("graphql"), 1);
64190
+ var graphql25 = __toESM(require("graphql"), 1);
64375
64191
  async function addTypename(config, documents) {
64376
64192
  for (const doc of documents) {
64377
- doc.document = graphql26.visit(doc.document, {
64193
+ doc.document = graphql25.visit(doc.document, {
64378
64194
  Field(node, key, parent2, path2, ancestors) {
64379
64195
  if (!node.selectionSet) {
64380
64196
  return;
@@ -64386,7 +64202,7 @@ async function addTypename(config, documents) {
64386
64202
  );
64387
64203
  const field = type.getFields()[node.name.value];
64388
64204
  const fieldType = unwrapType(config, field.type).type;
64389
- if (graphql26.isInterfaceType(fieldType) || graphql26.isUnionType(fieldType)) {
64205
+ if (graphql25.isInterfaceType(fieldType) || graphql25.isUnionType(fieldType)) {
64390
64206
  return {
64391
64207
  ...node,
64392
64208
  selectionSet: {
@@ -64394,9 +64210,9 @@ async function addTypename(config, documents) {
64394
64210
  selections: [
64395
64211
  ...node.selectionSet.selections,
64396
64212
  {
64397
- kind: graphql26.Kind.FIELD,
64213
+ kind: graphql25.Kind.FIELD,
64398
64214
  name: {
64399
- kind: graphql26.Kind.NAME,
64215
+ kind: graphql25.Kind.NAME,
64400
64216
  value: "__typename"
64401
64217
  }
64402
64218
  }
@@ -64413,9 +64229,9 @@ async function addTypename(config, documents) {
64413
64229
  selections: [
64414
64230
  ...node.selectionSet.selections,
64415
64231
  {
64416
- kind: graphql26.Kind.FIELD,
64232
+ kind: graphql25.Kind.FIELD,
64417
64233
  name: {
64418
- kind: graphql26.Kind.NAME,
64234
+ kind: graphql25.Kind.NAME,
64419
64235
  value: "__typename"
64420
64236
  }
64421
64237
  }
@@ -64428,10 +64244,10 @@ async function addTypename(config, documents) {
64428
64244
  }
64429
64245
 
64430
64246
  // src/codegen/transforms/addID.ts
64431
- var graphql27 = __toESM(require("graphql"), 1);
64247
+ var graphql26 = __toESM(require("graphql"), 1);
64432
64248
  async function addID(config, documents) {
64433
64249
  for (const doc of documents) {
64434
- doc.document = graphql27.visit(doc.document, {
64250
+ doc.document = graphql26.visit(doc.document, {
64435
64251
  Field(node, key, parent2, path2, ancestors) {
64436
64252
  if (!node.selectionSet) {
64437
64253
  return;
@@ -64469,7 +64285,7 @@ function addKeysToSelection(config, node, fieldType) {
64469
64285
  if (!node.selectionSet || node.selectionSet.selections.length == 0) {
64470
64286
  return;
64471
64287
  }
64472
- if (!graphql27.isObjectType(fieldType) && !graphql27.isInterfaceType(fieldType)) {
64288
+ if (!graphql26.isObjectType(fieldType) && !graphql26.isInterfaceType(fieldType)) {
64473
64289
  return;
64474
64290
  }
64475
64291
  const keyFields = config.keyFieldsForType(fieldType.name);
@@ -64484,9 +64300,9 @@ function addKeysToSelection(config, node, fieldType) {
64484
64300
  continue;
64485
64301
  }
64486
64302
  selections.push({
64487
- kind: graphql27.Kind.FIELD,
64303
+ kind: graphql26.Kind.FIELD,
64488
64304
  name: {
64489
- kind: graphql27.Kind.NAME,
64305
+ kind: graphql26.Kind.NAME,
64490
64306
  value: keyField
64491
64307
  }
64492
64308
  });
@@ -64501,13 +64317,13 @@ function addKeysToSelection(config, node, fieldType) {
64501
64317
  }
64502
64318
 
64503
64319
  // src/codegen/transforms/componentFields.ts
64504
- var graphql28 = __toESM(require("graphql"), 1);
64320
+ var graphql27 = __toESM(require("graphql"), 1);
64505
64321
  async function componentFields(config, documents) {
64506
64322
  for (const document of documents) {
64507
- const typeInfo = new graphql28.TypeInfo(config.schema);
64508
- document.document = graphql28.visit(
64323
+ const typeInfo = new graphql27.TypeInfo(config.schema);
64324
+ document.document = graphql27.visit(
64509
64325
  document.document,
64510
- graphql28.visitWithTypeInfo(typeInfo, {
64326
+ graphql27.visitWithTypeInfo(typeInfo, {
64511
64327
  Field(node) {
64512
64328
  const parentType = typeInfo.getParentType();
64513
64329
  if (!parentType) {
@@ -64556,10 +64372,10 @@ async function componentFields(config, documents) {
64556
64372
  }
64557
64373
 
64558
64374
  // src/codegen/transforms/runtimeScalars.ts
64559
- var graphql29 = __toESM(require("graphql"), 1);
64375
+ var graphql28 = __toESM(require("graphql"), 1);
64560
64376
  async function addTypename2(config, documents) {
64561
64377
  for (const doc of documents) {
64562
- doc.document = graphql29.visit(doc.document, {
64378
+ doc.document = graphql28.visit(doc.document, {
64563
64379
  VariableDefinition(node) {
64564
64380
  const { type, wrappers } = unwrapType(config, node.type);
64565
64381
  const runtimeScalar = config.configFile.features?.runtimeScalars?.[type.name];
@@ -64598,7 +64414,7 @@ async function addTypename2(config, documents) {
64598
64414
  }
64599
64415
 
64600
64416
  // src/codegen/validators/typeCheck.ts
64601
- var graphql30 = __toESM(require("graphql"), 1);
64417
+ var graphql29 = __toESM(require("graphql"), 1);
64602
64418
  async function typeCheck(config, docs) {
64603
64419
  const errors = [];
64604
64420
  const freeLists = [];
@@ -64606,7 +64422,7 @@ async function typeCheck(config, docs) {
64606
64422
  const listTypes = [];
64607
64423
  const fragments = {};
64608
64424
  for (const { document: parsed, originalString, filename } of docs) {
64609
- graphql30.visit(parsed, {
64425
+ graphql29.visit(parsed, {
64610
64426
  FragmentDefinition(definition) {
64611
64427
  fragments[definition.name.value] = definition;
64612
64428
  },
@@ -64651,14 +64467,14 @@ async function typeCheck(config, docs) {
64651
64467
  );
64652
64468
  return;
64653
64469
  }
64654
- if (graphql30.isListType(rootType) || graphql30.isNonNullType(rootType) && graphql30.isListType(rootType.ofType)) {
64470
+ if (graphql29.isListType(rootType) || graphql29.isNonNullType(rootType) && graphql29.isListType(rootType.ofType)) {
64655
64471
  needsParent = true;
64656
64472
  break;
64657
64473
  }
64658
- if (graphql30.isNonNullType(rootType) && "ofType" in rootType) {
64474
+ if (graphql29.isNonNullType(rootType) && "ofType" in rootType) {
64659
64475
  rootType = rootType.ofType;
64660
64476
  }
64661
- if (graphql30.isScalarType(rootType)) {
64477
+ if (graphql29.isScalarType(rootType)) {
64662
64478
  break;
64663
64479
  }
64664
64480
  rootType = rootType?.getFields()[parent3.name.value]?.type;
@@ -64734,9 +64550,9 @@ async function typeCheck(config, docs) {
64734
64550
  );
64735
64551
  }
64736
64552
  let targetTypes = [type];
64737
- if (graphql30.isUnionType(type)) {
64553
+ if (graphql29.isUnionType(type)) {
64738
64554
  targetTypes = config.schema.getPossibleTypes(type);
64739
- } else if (graphql30.isInterfaceType(type)) {
64555
+ } else if (graphql29.isInterfaceType(type)) {
64740
64556
  try {
64741
64557
  for (const key of config.keyFieldsForType(type.name)) {
64742
64558
  if (!type.getFields()[key]) {
@@ -64772,13 +64588,13 @@ async function typeCheck(config, docs) {
64772
64588
  if (errors.length > 0) {
64773
64589
  throw errors;
64774
64590
  }
64775
- const rules = (filepath) => [...graphql30.specifiedRules].filter(
64591
+ const rules = (filepath) => [...graphql29.specifiedRules].filter(
64776
64592
  (rule) => ![
64777
- graphql30.NoUnusedFragmentsRule,
64778
- graphql30.KnownFragmentNamesRule,
64779
- graphql30.ExecutableDefinitionsRule,
64780
- graphql30.KnownDirectivesRule,
64781
- graphql30.KnownArgumentNamesRule
64593
+ graphql29.NoUnusedFragmentsRule,
64594
+ graphql29.KnownFragmentNamesRule,
64595
+ graphql29.ExecutableDefinitionsRule,
64596
+ graphql29.KnownDirectivesRule,
64597
+ graphql29.KnownArgumentNamesRule
64782
64598
  ].includes(rule)
64783
64599
  ).concat(
64784
64600
  validateLists({
@@ -64799,7 +64615,7 @@ async function typeCheck(config, docs) {
64799
64615
  validateLoadingDirective(config)
64800
64616
  );
64801
64617
  for (const { filename, document: parsed, originalString } of docs) {
64802
- for (const error of graphql30.validate(config.schema, parsed, rules(filename))) {
64618
+ for (const error of graphql29.validate(config.schema, parsed, rules(filename))) {
64803
64619
  errors.push(
64804
64620
  new HoudiniError({
64805
64621
  filepath: filename,
@@ -64828,20 +64644,20 @@ function validateRequiredDirective(config, filepath) {
64828
64644
  if (!node.directives?.some(({ name }) => name.value === config.requiredDirective))
64829
64645
  return;
64830
64646
  const parentType = parentTypeFromAncestors(config.schema, filepath, ancestors);
64831
- if (!graphql30.isObjectType(parentType)) {
64647
+ if (!graphql29.isObjectType(parentType)) {
64832
64648
  ctx.reportError(
64833
- new graphql30.GraphQLError(
64649
+ new graphql29.GraphQLError(
64834
64650
  `@${config.requiredDirective} may only be used on objects, not arguments`
64835
64651
  )
64836
64652
  );
64837
64653
  return;
64838
64654
  }
64839
64655
  const type = parentType.getFields()[node.name.value].type;
64840
- const isServerNullable = !graphql30.isNonNullType(type);
64656
+ const isServerNullable = !graphql29.isNonNullType(type);
64841
64657
  const isAlreadyClientNullable = isClientNullable(node, true);
64842
64658
  if (!isServerNullable && !isAlreadyClientNullable) {
64843
64659
  ctx.reportError(
64844
- new graphql30.GraphQLError(
64660
+ new graphql29.GraphQLError(
64845
64661
  `@${config.requiredDirective} may only be used on nullable fields`
64846
64662
  )
64847
64663
  );
@@ -64863,7 +64679,7 @@ var validateLists = ({
64863
64679
  if (!config.isListFragment(node.name.value)) {
64864
64680
  if (!fragments[node.name.value]) {
64865
64681
  ctx.reportError(
64866
- new graphql30.GraphQLError(
64682
+ new graphql29.GraphQLError(
64867
64683
  "Encountered unknown fragment: " + node.name.value
64868
64684
  )
64869
64685
  );
@@ -64873,7 +64689,7 @@ var validateLists = ({
64873
64689
  const listName = config.listNameFromFragment(node.name.value);
64874
64690
  if (!lists.includes(listName)) {
64875
64691
  ctx.reportError(
64876
- new graphql30.GraphQLError(
64692
+ new graphql29.GraphQLError(
64877
64693
  "Encountered fragment referencing unknown list: " + listName
64878
64694
  )
64879
64695
  );
@@ -64898,7 +64714,7 @@ var validateLists = ({
64898
64714
  );
64899
64715
  if (parentArg) {
64900
64716
  ctx.reportError(
64901
- new graphql30.GraphQLError(
64717
+ new graphql29.GraphQLError(
64902
64718
  `@${config.deprecatedlistDirectiveParentIDArg} should be defined only in it's own directive now`
64903
64719
  )
64904
64720
  );
@@ -64914,7 +64730,7 @@ var validateLists = ({
64914
64730
  return;
64915
64731
  }
64916
64732
  ctx.reportError(
64917
- new graphql30.GraphQLError(
64733
+ new graphql29.GraphQLError(
64918
64734
  `For this list fragment, you need to add or @${config.listParentDirective} or @${config.listAllListsDirective} directive to specify the behavior`
64919
64735
  )
64920
64736
  );
@@ -64924,7 +64740,7 @@ var validateLists = ({
64924
64740
  const directiveName = node.name.value;
64925
64741
  if (directiveName === "connection") {
64926
64742
  ctx.reportError(
64927
- new graphql30.GraphQLError(
64743
+ new graphql29.GraphQLError(
64928
64744
  "@connection was renamed to @list. Please change your components. If you were using `cache.connection` in your components, you will need to update that to `cache.list` too."
64929
64745
  )
64930
64746
  );
@@ -64933,7 +64749,7 @@ var validateLists = ({
64933
64749
  if (!config.isInternalDirective(node.name.value)) {
64934
64750
  if (!config.schema.getDirective(directiveName)) {
64935
64751
  ctx.reportError(
64936
- new graphql30.GraphQLError(
64752
+ new graphql29.GraphQLError(
64937
64753
  "Encountered unknown directive: " + directiveName
64938
64754
  )
64939
64755
  );
@@ -64942,7 +64758,7 @@ var validateLists = ({
64942
64758
  }
64943
64759
  if (config.isListOperationDirective(directiveName) && !listTypes.includes(config.listNameFromDirective(directiveName))) {
64944
64760
  ctx.reportError(
64945
- new graphql30.GraphQLError(
64761
+ new graphql29.GraphQLError(
64946
64762
  "Encountered directive referencing unknown list: " + directiveName
64947
64763
  )
64948
64764
  );
@@ -64953,7 +64769,7 @@ var validateLists = ({
64953
64769
  };
64954
64770
  function knownArguments(config) {
64955
64771
  return function(ctx) {
64956
- const nativeValidator = graphql30.KnownArgumentNamesRule(ctx);
64772
+ const nativeValidator = graphql29.KnownArgumentNamesRule(ctx);
64957
64773
  return {
64958
64774
  ...nativeValidator,
64959
64775
  Directive(directiveNode) {
@@ -64988,7 +64804,7 @@ function validateFragmentArguments(config, filepath, fragments) {
64988
64804
  for (const arg of node.arguments || []) {
64989
64805
  if (arg.value.kind !== "ObjectValue") {
64990
64806
  ctx.reportError(
64991
- new graphql30.GraphQLError("values in @arguments must be an object")
64807
+ new graphql29.GraphQLError("values in @arguments must be an object")
64992
64808
  );
64993
64809
  return;
64994
64810
  }
@@ -64998,13 +64814,13 @@ function validateFragmentArguments(config, filepath, fragments) {
64998
64814
  );
64999
64815
  if (!typeArg) {
65000
64816
  ctx.reportError(
65001
- new graphql30.GraphQLError("missing type field for @arguments directive")
64817
+ new graphql29.GraphQLError("missing type field for @arguments directive")
65002
64818
  );
65003
64819
  return;
65004
64820
  }
65005
- if (typeArg.value.kind !== graphql30.Kind.STRING) {
64821
+ if (typeArg.value.kind !== graphql29.Kind.STRING) {
65006
64822
  ctx.reportError(
65007
- new graphql30.GraphQLError("type field to @arguments must be a string")
64823
+ new graphql29.GraphQLError("type field to @arguments must be a string")
65008
64824
  );
65009
64825
  return;
65010
64826
  }
@@ -65017,7 +64833,7 @@ function validateFragmentArguments(config, filepath, fragments) {
65017
64833
  );
65018
64834
  if (typeArg.value.value !== defaultValueType) {
65019
64835
  ctx.reportError(
65020
- new graphql30.GraphQLError(
64836
+ new graphql29.GraphQLError(
65021
64837
  `Invalid default value provided for ${arg.name.value}. Expected ${typeArg.value.value}, found ${defaultValueType}`
65022
64838
  )
65023
64839
  );
@@ -65035,7 +64851,7 @@ function validateFragmentArguments(config, filepath, fragments) {
65035
64851
  try {
65036
64852
  args = fragmentArguments(config, filepath, fragments[fragmentName]);
65037
64853
  } catch (e) {
65038
- ctx.reportError(new graphql30.GraphQLError(e.message));
64854
+ ctx.reportError(new graphql29.GraphQLError(e.message));
65039
64855
  return;
65040
64856
  }
65041
64857
  fragmentArguments2[fragmentName] = args;
@@ -65058,7 +64874,7 @@ function validateFragmentArguments(config, filepath, fragments) {
65058
64874
  );
65059
64875
  if (missing.length > 0) {
65060
64876
  ctx.reportError(
65061
- new graphql30.GraphQLError(
64877
+ new graphql29.GraphQLError(
65062
64878
  `The following arguments are missing from the "${fragmentName}" fragment: ` + JSON.stringify(missing)
65063
64879
  )
65064
64880
  );
@@ -65069,7 +64885,7 @@ function validateFragmentArguments(config, filepath, fragments) {
65069
64885
  );
65070
64886
  if (unknown.length > 0) {
65071
64887
  ctx.reportError(
65072
- new graphql30.GraphQLError(
64888
+ new graphql29.GraphQLError(
65073
64889
  "Encountered unknown arguments: " + JSON.stringify(unknown)
65074
64890
  )
65075
64891
  );
@@ -65081,7 +64897,7 @@ function validateFragmentArguments(config, filepath, fragments) {
65081
64897
  for (const [applied, target] of zipped) {
65082
64898
  if (!valueIsType(config, applied.value, target)) {
65083
64899
  ctx.reportError(
65084
- new graphql30.GraphQLError(
64900
+ new graphql29.GraphQLError(
65085
64901
  `Invalid argument type. Expected ${target}, found ${applied.value.kind}`
65086
64902
  )
65087
64903
  );
@@ -65123,7 +64939,7 @@ function valueIsType(config, value, targetType) {
65123
64939
  }
65124
64940
  if (value.kind === "EnumValue" && targetType.kind === "NamedType") {
65125
64941
  const enumType = config.schema.getType(targetType.name.value);
65126
- if (!graphql30.isEnumType(enumType)) {
64942
+ if (!graphql29.isEnumType(enumType)) {
65127
64943
  return false;
65128
64944
  }
65129
64945
  return enumType.getValues().some((enumValue) => enumValue.value === value.value);
@@ -65143,7 +64959,7 @@ function paginateArgs(config, filepath) {
65143
64959
  }
65144
64960
  if (alreadyPaginated) {
65145
64961
  ctx.reportError(
65146
- new graphql30.GraphQLError(
64962
+ new graphql29.GraphQLError(
65147
64963
  `@${config.paginateDirective} can only appear in a document once.`
65148
64964
  )
65149
64965
  );
@@ -65175,7 +64991,7 @@ function paginateArgs(config, filepath) {
65175
64991
  const backwards = appliedArgs.has("last");
65176
64992
  if (!forward && !backwards) {
65177
64993
  ctx.reportError(
65178
- new graphql30.GraphQLError(
64994
+ new graphql29.GraphQLError(
65179
64995
  "A field with cursor-based pagination must have a first or last argument"
65180
64996
  )
65181
64997
  );
@@ -65189,7 +65005,7 @@ function paginateArgs(config, filepath) {
65189
65005
  }
65190
65006
  if (forward && backwards && paginateMode === "Infinite") {
65191
65007
  ctx.reportError(
65192
- new graphql30.GraphQLError(
65008
+ new graphql29.GraphQLError(
65193
65009
  `A field with cursor pagination cannot go forwards an backwards simultaneously`
65194
65010
  )
65195
65011
  );
@@ -65203,7 +65019,7 @@ function paginateArgs(config, filepath) {
65203
65019
  );
65204
65020
  if (!appliedLimitArg) {
65205
65021
  ctx.reportError(
65206
- new graphql30.GraphQLError(
65022
+ new graphql29.GraphQLError(
65207
65023
  "A field with offset-based pagination must have a limit argument"
65208
65024
  )
65209
65025
  );
@@ -65219,20 +65035,20 @@ function noUnusedFragmentArguments(config) {
65219
65035
  const args = /* @__PURE__ */ new Set();
65220
65036
  return {
65221
65037
  enter(node) {
65222
- if (node.kind === graphql30.Kind.FRAGMENT_DEFINITION) {
65038
+ if (node.kind === graphql29.Kind.FRAGMENT_DEFINITION) {
65223
65039
  const definitionArguments = node.directives?.filter((directive) => directive.name.value === config.argumentsDirective).flatMap((directive) => directive.arguments);
65224
65040
  for (const arg of definitionArguments?.map((arg2) => arg2?.name.value) || []) {
65225
65041
  args.add(arg);
65226
65042
  }
65227
- } else if (node.kind === graphql30.Kind.VARIABLE) {
65043
+ } else if (node.kind === graphql29.Kind.VARIABLE) {
65228
65044
  args.delete(node.name.value);
65229
65045
  }
65230
65046
  },
65231
65047
  leave(node) {
65232
- if (node.kind === graphql30.Kind.FRAGMENT_DEFINITION) {
65048
+ if (node.kind === graphql29.Kind.FRAGMENT_DEFINITION) {
65233
65049
  if (args.size > 0) {
65234
65050
  ctx.reportError(
65235
- new graphql30.GraphQLError(
65051
+ new graphql29.GraphQLError(
65236
65052
  "Encountered unused fragment arguments: " + [...args].join(",")
65237
65053
  )
65238
65054
  );
@@ -65268,7 +65084,7 @@ function nodeDirectives(config, directives) {
65268
65084
  if (definition.kind === "OperationDefinition") {
65269
65085
  if (definition.operation !== "query") {
65270
65086
  ctx.reportError(
65271
- new graphql30.GraphQLError(
65087
+ new graphql29.GraphQLError(
65272
65088
  `@${node.name.value} must fall on a fragment or query document`
65273
65089
  )
65274
65090
  );
@@ -65280,7 +65096,7 @@ function nodeDirectives(config, directives) {
65280
65096
  }
65281
65097
  if (!possibleNodes.includes(definitionType)) {
65282
65098
  ctx.reportError(
65283
- new graphql30.GraphQLError(paginateOnNonNodeMessage(node.name.value))
65099
+ new graphql29.GraphQLError(paginateOnNonNodeMessage(node.name.value))
65284
65100
  );
65285
65101
  }
65286
65102
  }
@@ -65299,7 +65115,7 @@ function checkMutationOperation(config) {
65299
65115
  );
65300
65116
  if (append && prepend) {
65301
65117
  ctx.reportError(
65302
- new graphql30.GraphQLError(
65118
+ new graphql29.GraphQLError(
65303
65119
  `You can't apply both @${config.listPrependDirective} and @${config.listAppendDirective} at the same time`
65304
65120
  )
65305
65121
  );
@@ -65313,7 +65129,7 @@ function checkMutationOperation(config) {
65313
65129
  );
65314
65130
  if (parentId && allLists) {
65315
65131
  ctx.reportError(
65316
- new graphql30.GraphQLError(
65132
+ new graphql29.GraphQLError(
65317
65133
  `You can't apply both @${config.listParentDirective} and @${config.listAllListsDirective} at the same time`
65318
65134
  )
65319
65135
  );
@@ -65335,7 +65151,7 @@ function checkMaskDirectives(config) {
65335
65151
  );
65336
65152
  if (maskEnableDirective && maskDisableDirective) {
65337
65153
  ctx.reportError(
65338
- new graphql30.GraphQLError(
65154
+ new graphql29.GraphQLError(
65339
65155
  `You can't apply both @${config.maskEnableDirective} and @${config.maskDisableDirective} at the same time`
65340
65156
  )
65341
65157
  );
@@ -65377,7 +65193,7 @@ function validateLoadingDirective(config) {
65377
65193
  );
65378
65194
  if (!parentLoading && !global2) {
65379
65195
  ctx.reportError(
65380
- new graphql30.GraphQLError(
65196
+ new graphql29.GraphQLError(
65381
65197
  `@${config.loadingDirective} can only be applied on a field or fragment spread at the root of a document or on one whose parent also has @${config.loadingDirective}`
65382
65198
  )
65383
65199
  );
@@ -65399,7 +65215,7 @@ function validateLoadingDirective(config) {
65399
65215
  );
65400
65216
  if (!parentLoading && !global2) {
65401
65217
  ctx.reportError(
65402
- new graphql30.GraphQLError(
65218
+ new graphql29.GraphQLError(
65403
65219
  `@${config.loadingDirective} can only be applied on a field or fragment spread at the root of a document or on one whose parent also has @${config.loadingDirective}`
65404
65220
  )
65405
65221
  );
@@ -65414,7 +65230,7 @@ function getAndVerifyNodeInterface(config) {
65414
65230
  if (!nodeInterface) {
65415
65231
  return null;
65416
65232
  }
65417
- if (!graphql30.isInterfaceType(nodeInterface)) {
65233
+ if (!graphql29.isInterfaceType(nodeInterface)) {
65418
65234
  displayInvalidNodeFieldMessage(config);
65419
65235
  return null;
65420
65236
  }
@@ -65509,11 +65325,11 @@ async function uniqueDocumentNames(config, docs) {
65509
65325
  }
65510
65326
 
65511
65327
  // src/codegen/validators/noIDAlias.ts
65512
- var graphql31 = __toESM(require("graphql"), 1);
65328
+ var graphql30 = __toESM(require("graphql"), 1);
65513
65329
  async function noIDAlias(config, docs) {
65514
65330
  const errors = [];
65515
65331
  for (const { filename, document } of docs) {
65516
- graphql31.visit(document, {
65332
+ graphql30.visit(document, {
65517
65333
  Field(node, _, __, ___, ancestors) {
65518
65334
  const fieldType = parentTypeFromAncestors(config.schema, filename, ancestors).name;
65519
65335
  if (config.keyFieldsForType(fieldType).includes(node.alias?.value || "")) {
@@ -65552,11 +65368,11 @@ async function validatePlugins(config, documents) {
65552
65368
  }
65553
65369
 
65554
65370
  // src/codegen/validators/componentFields.ts
65555
- var graphql32 = __toESM(require("graphql"), 1);
65371
+ var graphql31 = __toESM(require("graphql"), 1);
65556
65372
  async function componentFields2(config, docs) {
65557
65373
  const errors = [];
65558
65374
  for (const { filename: filepath, document } of docs) {
65559
- graphql32.visit(document, {
65375
+ graphql31.visit(document, {
65560
65376
  FragmentDefinition(node, _, __, ___, ancestors) {
65561
65377
  const componentFieldDirective = node.directives?.find(
65562
65378
  (dir) => dir.name.value === config.componentFieldDirective
@@ -65604,7 +65420,7 @@ async function componentFields2(config, docs) {
65604
65420
  if (existingField && existingField.filepath !== filepath) {
65605
65421
  conflict = true;
65606
65422
  } else if (parentType && fieldValue) {
65607
- const fieldDef = graphql32.isObjectType(parentType) && parentType.getFields()[fieldValue];
65423
+ const fieldDef = graphql31.isObjectType(parentType) && parentType.getFields()[fieldValue];
65608
65424
  if (fieldDef && !fieldDef.astNode?.directives?.find(
65609
65425
  (dir) => dir.name.value === config.componentFieldDirective
65610
65426
  )) {
@@ -65617,7 +65433,7 @@ async function componentFields2(config, docs) {
65617
65433
  filepath
65618
65434
  });
65619
65435
  }
65620
- if (parentType && graphql32.isAbstractType(parentType)) {
65436
+ if (parentType && graphql31.isAbstractType(parentType)) {
65621
65437
  errors.push({
65622
65438
  message: `Cannot add component field ${parent2}.${fieldValue} because ${parent2} is an abstract type`,
65623
65439
  filepath
@@ -65813,7 +65629,7 @@ function testConfigFile({ plugins, ...config } = {}) {
65813
65629
  id: ID!
65814
65630
  name(arg: Int): String!
65815
65631
  birthday: DateTime!
65816
- firstName: String!
65632
+ firstName: String! @deprecated(reason: "Use name instead")
65817
65633
  friends: [User!]!
65818
65634
  friendsByCursor(first: Int, after: String, last: Int, before: String, filter: String): UserConnection!
65819
65635
  friendsByCursorSnapshot(snapshot: String!, first: Int, after: String, last: Int, before: String): UserConnection!
@@ -65843,13 +65659,22 @@ function testConfigFile({ plugins, ...config } = {}) {
65843
65659
  believers(first: Int, after: String): GhostConnection
65844
65660
  }
65845
65661
 
65662
+ """
65663
+ Cat's documentation
65664
+ """
65846
65665
  type Cat implements Friend & Node {
65847
65666
  id: ID!
65667
+ """
65668
+ The name of the cat
65669
+ """
65848
65670
  name: String!
65849
65671
  owner: User!
65850
65672
  }
65851
65673
 
65852
65674
  type Query {
65675
+ """
65676
+ Get a user.
65677
+ """
65853
65678
  user: User!
65854
65679
  entity: Entity!
65855
65680
  version: Int!
@@ -66031,11 +65856,19 @@ function testConfigFile({ plugins, ...config } = {}) {
66031
65856
  id: ID!
66032
65857
  }
66033
65858
 
65859
+ """
65860
+ Documentation of testenum1
65861
+ """
66034
65862
  enum TestEnum1 {
65863
+ "Documentation of Value1"
66035
65864
  Value1
65865
+ "Documentation of Value2"
66036
65866
  Value2
66037
65867
  }
66038
65868
 
65869
+ """
65870
+ Documentation of testenum2
65871
+ """
66039
65872
  enum TestEnum2 {
66040
65873
  Value3
66041
65874
  Value2
@@ -66120,7 +65953,7 @@ function pipelineTest(config, documents, shouldPass, testBody) {
66120
65953
  };
66121
65954
  }
66122
65955
  function mockCollectedDoc(query2, data) {
66123
- const parsed = graphql34.parse(query2);
65956
+ const parsed = graphql33.parse(query2);
66124
65957
  const name = parsed.definitions[0].name.value;
66125
65958
  const operations = parsed.definitions;
66126
65959
  let kind = ArtifactKind.Fragment;