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
@@ -53824,7 +53824,7 @@ __export(codegen_exports, {
53824
53824
  runPipeline: () => runPipeline2
53825
53825
  });
53826
53826
  module.exports = __toCommonJS(codegen_exports);
53827
- var graphql33 = __toESM(require("graphql"), 1);
53827
+ var graphql32 = __toESM(require("graphql"), 1);
53828
53828
 
53829
53829
  // src/lib/pipeline.ts
53830
53830
  async function runPipeline(config, pipeline, target) {
@@ -53965,47 +53965,6 @@ function deepMerge(...objects) {
53965
53965
  return mergedObj;
53966
53966
  }
53967
53967
 
53968
- // src/runtime/lib/scalars.ts
53969
- async function marshalSelection({
53970
- selection,
53971
- data
53972
- }) {
53973
- const config = getCurrentConfig();
53974
- if (data === null || typeof data === "undefined") {
53975
- return data;
53976
- }
53977
- if (Array.isArray(data)) {
53978
- return await Promise.all(data.map((val) => marshalSelection({ selection, data: val })));
53979
- }
53980
- const targetSelection = getFieldsForType(selection, data["__typename"], false);
53981
- return Object.fromEntries(
53982
- await Promise.all(
53983
- Object.entries(data).map(async ([fieldName, value]) => {
53984
- const { type, selection: selection2 } = targetSelection[fieldName];
53985
- if (!type) {
53986
- return [fieldName, value];
53987
- }
53988
- if (selection2) {
53989
- return [fieldName, await marshalSelection({ selection: selection2, data: value })];
53990
- }
53991
- if (config.scalars?.[type]) {
53992
- const marshalFn = config.scalars[type].marshal;
53993
- if (!marshalFn) {
53994
- throw new Error(
53995
- `scalar type ${type} is missing a \`marshal\` function. see https://github.com/AlecAivazis/houdini#%EF%B8%8Fcustom-scalars`
53996
- );
53997
- }
53998
- if (Array.isArray(value)) {
53999
- return [fieldName, value.map(marshalFn)];
54000
- }
54001
- return [fieldName, marshalFn(value)];
54002
- }
54003
- return [fieldName, value];
54004
- })
54005
- )
54006
- );
54007
- }
54008
-
54009
53968
  // src/runtime/lib/types.ts
54010
53969
  var CachePolicy = {
54011
53970
  CacheOrNetwork: "CacheOrNetwork",
@@ -54033,11 +53992,6 @@ var RefetchUpdateMode = {
54033
53992
  prepend: "prepend",
54034
53993
  replace: "replace"
54035
53994
  };
54036
- var DataSource = {
54037
- Cache: "cache",
54038
- Network: "network",
54039
- Ssr: "ssr"
54040
- };
54041
53995
  var fragmentKey = " $fragments";
54042
53996
  var PendingValue = Symbol("houdini_loading");
54043
53997
 
@@ -56659,202 +56613,6 @@ var cache_default = new Cache();
56659
56613
  // src/runtime/client/plugins/cache.ts
56660
56614
  var serverSide = typeof globalThis.window === "undefined";
56661
56615
 
56662
- // src/runtime/client/utils/documentPlugins.ts
56663
- var documentPlugin = (kind, source) => {
56664
- return () => {
56665
- const sourceHandlers = source();
56666
- const enterWrapper = (handler) => {
56667
- return !handler ? void 0 : (ctx, handlers) => {
56668
- if (ctx.artifact.kind !== kind) {
56669
- return handlers.next(ctx);
56670
- }
56671
- return handler(ctx, handlers);
56672
- };
56673
- };
56674
- const exitWrapper = (handler) => {
56675
- return !handler ? void 0 : (ctx, handlers) => {
56676
- if (ctx.artifact.kind !== kind) {
56677
- return handlers.resolve(ctx);
56678
- }
56679
- return handler(ctx, handlers);
56680
- };
56681
- };
56682
- return {
56683
- start: enterWrapper(sourceHandlers.start),
56684
- network: enterWrapper(sourceHandlers.network),
56685
- afterNetwork: exitWrapper(sourceHandlers.afterNetwork),
56686
- end: exitWrapper(sourceHandlers.end),
56687
- catch: sourceHandlers.catch ? (ctx, handlers) => sourceHandlers.catch(ctx, handlers) : void 0,
56688
- cleanup: (...args) => sourceHandlers.cleanup?.(...args)
56689
- };
56690
- };
56691
- };
56692
-
56693
- // src/runtime/client/plugins/query.ts
56694
- var query = documentPlugin(ArtifactKind.Query, function() {
56695
- let subscriptionSpec = null;
56696
- let lastVariables = null;
56697
- return {
56698
- start(ctx, { next }) {
56699
- const runtimeScalarPayload = {
56700
- session: ctx.session
56701
- };
56702
- ctx.variables = {
56703
- ...lastVariables,
56704
- ...Object.fromEntries(
56705
- Object.entries(ctx.artifact.input?.runtimeScalars ?? {}).map(
56706
- ([field, type]) => {
56707
- const runtimeScalar = ctx.config.features?.runtimeScalars?.[type];
56708
- if (!runtimeScalar) {
56709
- return [field, type];
56710
- }
56711
- return [field, runtimeScalar.resolve(runtimeScalarPayload)];
56712
- }
56713
- )
56714
- ),
56715
- ...ctx.variables
56716
- };
56717
- next(ctx);
56718
- },
56719
- end(ctx, { resolve: resolve2, marshalVariables, variablesChanged }) {
56720
- if (variablesChanged(ctx) && !ctx.cacheParams?.disableSubscriptions) {
56721
- if (subscriptionSpec) {
56722
- cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
56723
- }
56724
- lastVariables = { ...marshalVariables(ctx) };
56725
- const variables = lastVariables;
56726
- subscriptionSpec = {
56727
- rootType: ctx.artifact.rootType,
56728
- selection: ctx.artifact.selection,
56729
- variables: () => variables,
56730
- set: (newValue) => {
56731
- resolve2(ctx, {
56732
- data: newValue,
56733
- errors: null,
56734
- fetching: false,
56735
- partial: false,
56736
- stale: false,
56737
- source: DataSource.Cache,
56738
- variables: ctx.variables ?? {}
56739
- });
56740
- }
56741
- };
56742
- cache_default.subscribe(subscriptionSpec, lastVariables);
56743
- }
56744
- resolve2(ctx);
56745
- },
56746
- cleanup() {
56747
- if (subscriptionSpec) {
56748
- cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.());
56749
- lastVariables = null;
56750
- }
56751
- }
56752
- };
56753
- });
56754
-
56755
- // src/runtime/client/plugins/fragment.ts
56756
- var fragment = documentPlugin(ArtifactKind.Fragment, function() {
56757
- let subscriptionSpec = null;
56758
- let lastReference = null;
56759
- return {
56760
- start(ctx, { next, resolve: resolve2, variablesChanged, marshalVariables }) {
56761
- if (!ctx.stuff.parentID) {
56762
- return next(ctx);
56763
- }
56764
- const currentReference = {
56765
- parent: ctx.stuff.parentID,
56766
- variables: marshalVariables(ctx)
56767
- };
56768
- if (!ctx.cacheParams?.disableSubscriptions && (!deepEquals(lastReference, currentReference) || variablesChanged(ctx))) {
56769
- if (subscriptionSpec) {
56770
- cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
56771
- }
56772
- const variables = marshalVariables(ctx);
56773
- subscriptionSpec = {
56774
- rootType: ctx.artifact.rootType,
56775
- selection: ctx.artifact.selection,
56776
- variables: () => variables,
56777
- parentID: ctx.stuff.parentID,
56778
- set: (newValue) => {
56779
- resolve2(ctx, {
56780
- data: newValue,
56781
- errors: null,
56782
- fetching: false,
56783
- partial: false,
56784
- stale: false,
56785
- source: DataSource.Cache,
56786
- variables
56787
- });
56788
- }
56789
- };
56790
- cache_default.subscribe(subscriptionSpec, variables);
56791
- lastReference = currentReference;
56792
- }
56793
- next(ctx);
56794
- },
56795
- cleanup() {
56796
- if (subscriptionSpec) {
56797
- cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.());
56798
- }
56799
- }
56800
- };
56801
- });
56802
-
56803
- // src/runtime/client/plugins/mutation.ts
56804
- var mutation = documentPlugin(ArtifactKind.Mutation, () => {
56805
- return {
56806
- async start(ctx, { next, marshalVariables }) {
56807
- const layerOptimistic = cache_default._internal_unstable.storage.createLayer(true);
56808
- const optimisticResponse = ctx.stuff.optimisticResponse;
56809
- let toNotify = [];
56810
- if (optimisticResponse) {
56811
- toNotify = cache_default.write({
56812
- selection: ctx.artifact.selection,
56813
- data: await marshalSelection({
56814
- selection: ctx.artifact.selection,
56815
- data: optimisticResponse
56816
- }),
56817
- variables: marshalVariables(ctx),
56818
- layer: layerOptimistic.id
56819
- });
56820
- }
56821
- ctx.cacheParams = {
56822
- ...ctx.cacheParams,
56823
- layer: layerOptimistic,
56824
- notifySubscribers: toNotify,
56825
- forceNotify: true
56826
- };
56827
- next(ctx);
56828
- },
56829
- afterNetwork(ctx, { resolve: resolve2 }) {
56830
- if (ctx.cacheParams?.layer) {
56831
- cache_default.clearLayer(ctx.cacheParams.layer.id);
56832
- }
56833
- resolve2(ctx);
56834
- },
56835
- end(ctx, { resolve: resolve2, value }) {
56836
- const hasErrors = value.errors && value.errors.length > 0;
56837
- if (hasErrors) {
56838
- if (ctx.cacheParams?.layer) {
56839
- cache_default.clearLayer(ctx.cacheParams.layer.id);
56840
- }
56841
- }
56842
- if (ctx.cacheParams?.layer) {
56843
- cache_default._internal_unstable.storage.resolveLayer(ctx.cacheParams.layer.id);
56844
- }
56845
- resolve2(ctx);
56846
- },
56847
- catch(ctx, { error }) {
56848
- if (ctx.cacheParams?.layer) {
56849
- const { layer } = ctx.cacheParams;
56850
- cache_default.clearLayer(layer.id);
56851
- cache_default._internal_unstable.storage.resolveLayer(layer.id);
56852
- }
56853
- throw error;
56854
- }
56855
- };
56856
- });
56857
-
56858
56616
  // src/lib/types.ts
56859
56617
  var LogLevel = {
56860
56618
  Full: "full",
@@ -56973,7 +56731,7 @@ function definitionFromAncestors(ancestors) {
56973
56731
  }
56974
56732
  return { parents, definition };
56975
56733
  }
56976
- function unwrapType(config, type, wrappers = []) {
56734
+ function unwrapType(config, type, wrappers = [], convertRuntimeScalars) {
56977
56735
  if (type.kind === "NonNullType") {
56978
56736
  return unwrapType(config, type.type, [TypeWrapper.NonNull, ...wrappers]);
56979
56737
  }
@@ -56989,6 +56747,11 @@ function unwrapType(config, type, wrappers = []) {
56989
56747
  if (type instanceof graphql3.GraphQLList) {
56990
56748
  return unwrapType(config, type.ofType, [TypeWrapper.List, ...wrappers]);
56991
56749
  }
56750
+ if (convertRuntimeScalars && config.configFile.features?.runtimeScalars?.[type.name.value]) {
56751
+ type = config.schema.getType(
56752
+ config.configFile.features?.runtimeScalars?.[type.name.value].type
56753
+ );
56754
+ }
56992
56755
  const namedType = config.schema.getType(type.name.value || type.name);
56993
56756
  if (!namedType) {
56994
56757
  throw new Error("Unknown type: " + type.name.value || type.name);
@@ -57056,7 +56819,12 @@ function deepMerge2(filepath, ...targets) {
57056
56819
  // src/lib/parse.ts
57057
56820
  function parseJS(str, config) {
57058
56821
  const defaultConfig = {
57059
- plugins: ["typescript", "importAssertions", "decorators-legacy"],
56822
+ plugins: [
56823
+ "typescript",
56824
+ "importAssertions",
56825
+ "decorators-legacy",
56826
+ "explicitResourceManagement"
56827
+ ],
57060
56828
  sourceType: "module"
57061
56829
  };
57062
56830
  return (0, import_parser.parse)(str || "", config ? deepMerge2("", defaultConfig, config) : defaultConfig).program;
@@ -57128,6 +56896,152 @@ async function cleanupFiles(pathFolder, listOfObj) {
57128
56896
  return allFilesNotInList;
57129
56897
  }
57130
56898
 
56899
+ // src/lib/typescript.ts
56900
+ var graphql4 = __toESM(require("graphql"), 1);
56901
+ var recast2 = __toESM(require_main2(), 1);
56902
+ var AST2 = recast2.types.builders;
56903
+ function unwrappedTsTypeReference(config, filepath, missingScalars, {
56904
+ type,
56905
+ wrappers
56906
+ }, body) {
56907
+ let result;
56908
+ if (graphql4.isScalarType(type)) {
56909
+ result = scalarPropertyValue(config, filepath, missingScalars, type, body, null);
56910
+ } else if (graphql4.isEnumType(type)) {
56911
+ result = enumReference(config, body, type.name);
56912
+ } else {
56913
+ result = AST2.tsTypeReference(AST2.identifier(type.name));
56914
+ }
56915
+ for (const toWrap of wrappers) {
56916
+ if (toWrap === "NonNull" /* NonNull */) {
56917
+ continue;
56918
+ } else if (toWrap === "Nullable" /* Nullable */) {
56919
+ result = nullableField(result, true);
56920
+ } else if (toWrap === "List" /* List */) {
56921
+ result = AST2.tsArrayType(AST2.tsParenthesizedType(result));
56922
+ }
56923
+ }
56924
+ return result;
56925
+ }
56926
+ function tsTypeReference(config, filepath, missingScalars, definition, body) {
56927
+ const { type, wrappers } = unwrapType(config, definition.type);
56928
+ return unwrappedTsTypeReference(
56929
+ config,
56930
+ filepath,
56931
+ missingScalars,
56932
+ { type, wrappers },
56933
+ body
56934
+ );
56935
+ }
56936
+ function enumReference(config, body, name) {
56937
+ ensureImports({
56938
+ config,
56939
+ body,
56940
+ import: ["ValueOf"],
56941
+ importKind: "type",
56942
+ sourceModule: "$houdini/runtime/lib/types"
56943
+ });
56944
+ return AST2.tsTypeReference(
56945
+ AST2.identifier("ValueOf"),
56946
+ AST2.tsTypeParameterInstantiation([AST2.tsTypeQuery(AST2.identifier(name))])
56947
+ );
56948
+ }
56949
+ function readonlyProperty(prop, enable = true) {
56950
+ if (enable) {
56951
+ prop.readonly = true;
56952
+ }
56953
+ return prop;
56954
+ }
56955
+ function nullableField(inner, input = false) {
56956
+ const members = [inner, AST2.tsNullKeyword()];
56957
+ if (input) {
56958
+ members.push(AST2.tsUndefinedKeyword());
56959
+ }
56960
+ return AST2.tsUnionType(members);
56961
+ }
56962
+ function scalarPropertyValue(config, filepath, missingScalars, target, body, field) {
56963
+ if (config.configFile.features?.componentFields && target.name === config.componentScalar) {
56964
+ if (!field) {
56965
+ return AST2.tsNeverKeyword();
56966
+ }
56967
+ const component = config.componentFields[field.parent][field.field];
56968
+ const sourcePathRelative = path_exports.relative(
56969
+ path_exports.join(config.projectRoot, "src"),
56970
+ component.filepath
56971
+ );
56972
+ let sourcePathParsed = path_exports.parse(sourcePathRelative);
56973
+ let sourcePath = path_exports.join(sourcePathParsed.dir, sourcePathParsed.name);
56974
+ const localImport = ensureImports({
56975
+ config,
56976
+ body,
56977
+ import: "__component__" + component.fragment,
56978
+ sourceModule: path_exports.join(
56979
+ path_exports.relative(path_exports.dirname(filepath), config.projectRoot),
56980
+ "src",
56981
+ sourcePath
56982
+ )
56983
+ }) ?? "__component__" + component.fragment;
56984
+ const parameters = AST2.tsTypeReference(AST2.identifier("Parameters"));
56985
+ parameters.typeParameters = AST2.tsTypeParameterInstantiation([
56986
+ AST2.tsTypeQuery(AST2.identifier(localImport))
56987
+ ]);
56988
+ const indexed = AST2.tsIndexedAccessType(
56989
+ parameters,
56990
+ AST2.tsLiteralType(AST2.numericLiteral(0))
56991
+ );
56992
+ const omit = AST2.tsTypeReference(AST2.identifier("Omit"));
56993
+ omit.typeParameters = AST2.tsTypeParameterInstantiation([
56994
+ indexed,
56995
+ AST2.tsLiteralType(AST2.stringLiteral(component.prop))
56996
+ ]);
56997
+ const arg = AST2.identifier("props");
56998
+ arg.typeAnnotation = AST2.tsTypeAnnotation(omit);
56999
+ const returnType = AST2.tsTypeReference(AST2.identifier("ReturnType"));
57000
+ returnType.typeParameters = AST2.tsTypeParameterInstantiation([
57001
+ AST2.tsTypeQuery(AST2.identifier(localImport))
57002
+ ]);
57003
+ const fnType = AST2.tsFunctionType([arg]);
57004
+ fnType.typeAnnotation = AST2.tsTypeAnnotation(returnType);
57005
+ return fnType;
57006
+ }
57007
+ switch (target.name) {
57008
+ case "String": {
57009
+ return AST2.tsStringKeyword();
57010
+ }
57011
+ case "Int": {
57012
+ return AST2.tsNumberKeyword();
57013
+ }
57014
+ case "Float": {
57015
+ return AST2.tsNumberKeyword();
57016
+ }
57017
+ case "Boolean": {
57018
+ return AST2.tsBooleanKeyword();
57019
+ }
57020
+ case "ID": {
57021
+ return AST2.tsStringKeyword();
57022
+ }
57023
+ default: {
57024
+ if (graphql4.isNonNullType(target) && "ofType" in target) {
57025
+ return scalarPropertyValue(
57026
+ config,
57027
+ filepath,
57028
+ missingScalars,
57029
+ target.ofType,
57030
+ body,
57031
+ field
57032
+ );
57033
+ }
57034
+ if (config.scalars?.[target.name]) {
57035
+ return AST2.tsTypeReference(AST2.identifier(config.scalars?.[target.name].type));
57036
+ }
57037
+ if (target.name !== config.componentScalar) {
57038
+ missingScalars.add(target.name);
57039
+ }
57040
+ return AST2.tsAnyKeyword();
57041
+ }
57042
+ }
57043
+ }
57044
+
57131
57045
  // ../../node_modules/.pnpm/estree-walker@3.0.1/node_modules/estree-walker/src/walker.js
57132
57046
  var WalkerBase = class {
57133
57047
  constructor() {
@@ -57241,7 +57155,7 @@ async function asyncWalk(ast, { enter, leave }) {
57241
57155
  }
57242
57156
 
57243
57157
  // src/lib/walk.ts
57244
- var graphql4 = __toESM(require("graphql"), 1);
57158
+ var graphql5 = __toESM(require("graphql"), 1);
57245
57159
  async function find_graphql(config, parsedScript, walker) {
57246
57160
  await asyncWalk(parsedScript, {
57247
57161
  async enter(node, parent2) {
@@ -57296,7 +57210,7 @@ async function find_graphql(config, parsedScript, walker) {
57296
57210
  } else if (!documentString) {
57297
57211
  return;
57298
57212
  }
57299
- const parsedTag = graphql4.parse(documentString);
57213
+ const parsedTag = graphql5.parse(documentString);
57300
57214
  if (walker.where && !walker.where(parsedTag, { node, parent: parent2 })) {
57301
57215
  return;
57302
57216
  }
@@ -57428,7 +57342,7 @@ function extractAnonymousQuery(config, raw, expr, propName) {
57428
57342
  };
57429
57343
  return defs.concat([
57430
57344
  {
57431
- raw: graphql4.print(parsed),
57345
+ raw: graphql5.print(parsed),
57432
57346
  parsed
57433
57347
  }
57434
57348
  ]);
@@ -57443,11 +57357,11 @@ function extractAnonymousQuery(config, raw, expr, propName) {
57443
57357
 
57444
57358
  // src/lib/router/manifest.ts
57445
57359
  var t = __toESM(require_lib6(), 1);
57446
- var graphql5 = __toESM(require("graphql"), 1);
57360
+ var graphql6 = __toESM(require("graphql"), 1);
57447
57361
 
57448
57362
  // src/codegen/generators/artifacts/index.ts
57449
- var graphql16 = __toESM(require("graphql"), 1);
57450
- var recast4 = __toESM(require_main2(), 1);
57363
+ var graphql17 = __toESM(require("graphql"), 1);
57364
+ var recast5 = __toESM(require_main2(), 1);
57451
57365
 
57452
57366
  // src/codegen/utils/commonjs.ts
57453
57367
  var cjsIndexFilePreamble = `"use strict";
@@ -57689,19 +57603,19 @@ var FieldCollection = class {
57689
57603
  };
57690
57604
 
57691
57605
  // src/codegen/utils/moduleExport.ts
57692
- var recast2 = __toESM(require_main2(), 1);
57693
- var AST2 = recast2.types.builders;
57606
+ var recast3 = __toESM(require_main2(), 1);
57607
+ var AST3 = recast3.types.builders;
57694
57608
  function moduleExport(config, key, value) {
57695
57609
  if (config.module === "commonjs") {
57696
- let target = AST2.memberExpression(AST2.identifier("module"), AST2.identifier("exports"));
57610
+ let target = AST3.memberExpression(AST3.identifier("module"), AST3.identifier("exports"));
57697
57611
  if (key !== "default") {
57698
- target = AST2.memberExpression(target, AST2.identifier(key));
57612
+ target = AST3.memberExpression(target, AST3.identifier(key));
57699
57613
  }
57700
- return AST2.expressionStatement(AST2.assignmentExpression("=", target, value));
57614
+ return AST3.expressionStatement(AST3.assignmentExpression("=", target, value));
57701
57615
  }
57702
- return key === "default" ? AST2.exportDefaultDeclaration(value) : AST2.exportNamedDeclaration(
57703
- AST2.variableDeclaration("const", [
57704
- AST2.variableDeclarator(AST2.identifier(key), value)
57616
+ return key === "default" ? AST3.exportDefaultDeclaration(value) : AST3.exportNamedDeclaration(
57617
+ AST3.variableDeclaration("const", [
57618
+ AST3.variableDeclarator(AST3.identifier(key), value)
57705
57619
  ])
57706
57620
  );
57707
57621
  }
@@ -57958,7 +57872,7 @@ var serialize = (value, { json, lossy } = {}) => {
57958
57872
  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));
57959
57873
 
57960
57874
  // src/codegen/transforms/fragmentVariables.ts
57961
- var graphql7 = __toESM(require("graphql"), 1);
57875
+ var graphql8 = __toESM(require("graphql"), 1);
57962
57876
 
57963
57877
  // src/codegen/utils/stripLoc.ts
57964
57878
  function stripLoc(value) {
@@ -57979,13 +57893,13 @@ function stripLoc(value) {
57979
57893
  }
57980
57894
 
57981
57895
  // src/codegen/transforms/collectDefinitions.ts
57982
- var graphql6 = __toESM(require("graphql"), 1);
57983
- var import_graphql = require("graphql");
57896
+ var graphql7 = __toESM(require("graphql"), 1);
57897
+ var import_graphql2 = require("graphql");
57984
57898
  async function includeFragmentDefinitions(config, documents) {
57985
57899
  const fragments = collectDefinitions(config, documents);
57986
57900
  for (const [index, { name, document, filename }] of documents.entries()) {
57987
57901
  const operation = document.definitions.find(
57988
- (def) => def.kind === import_graphql.Kind.OPERATION_DEFINITION || def.kind === "FragmentDefinition"
57902
+ (def) => def.kind === import_graphql2.Kind.OPERATION_DEFINITION || def.kind === "FragmentDefinition"
57989
57903
  );
57990
57904
  if (!operation) {
57991
57905
  continue;
@@ -58029,10 +57943,10 @@ function collectDefinitions(config, docs) {
58029
57943
  }
58030
57944
  function findRequiredFragments(config, definition) {
58031
57945
  const referencedFragments = [];
58032
- const typeInfo = new graphql6.TypeInfo(config.schema);
58033
- definition.selectionSet = graphql6.visit(
57946
+ const typeInfo = new graphql7.TypeInfo(config.schema);
57947
+ definition.selectionSet = graphql7.visit(
58034
57948
  definition,
58035
- graphql6.visitWithTypeInfo(typeInfo, {
57949
+ graphql7.visitWithTypeInfo(typeInfo, {
58036
57950
  FragmentSpread(node) {
58037
57951
  referencedFragments.push(node.name.value);
58038
57952
  }
@@ -58066,7 +57980,7 @@ function flattenFragments(filepath, operation, fragments) {
58066
57980
  }
58067
57981
 
58068
57982
  // src/codegen/transforms/fragmentVariables.ts
58069
- var GraphqlKinds2 = graphql7.Kind;
57983
+ var GraphqlKinds2 = graphql8.Kind;
58070
57984
  async function fragmentVariables(config, documents) {
58071
57985
  const fragments = collectDefinitions(config, documents);
58072
57986
  const generatedFragments = {};
@@ -58089,7 +58003,7 @@ async function fragmentVariables(config, documents) {
58089
58003
  });
58090
58004
  }
58091
58005
  const doc = {
58092
- kind: graphql7.Kind.DOCUMENT,
58006
+ kind: graphql8.Kind.DOCUMENT,
58093
58007
  definitions: Object.values(generatedFragments)
58094
58008
  };
58095
58009
  documents.push({
@@ -58160,7 +58074,7 @@ function inlineFragmentArgs({
58160
58074
  return null;
58161
58075
  };
58162
58076
  const result = esm_default(
58163
- graphql7.visit(document, {
58077
+ graphql8.visit(document, {
58164
58078
  FragmentSpread(node) {
58165
58079
  if (!fragmentDefinitions[node.name.value]) {
58166
58080
  throw new Error("Could not find definition for fragment" + node.name.value);
@@ -58246,7 +58160,7 @@ function inlineFragmentArgs({
58246
58160
  );
58247
58161
  if (newName) {
58248
58162
  result.name = {
58249
- kind: graphql7.Kind.NAME,
58163
+ kind: graphql8.Kind.NAME,
58250
58164
  value: newName
58251
58165
  };
58252
58166
  }
@@ -58413,7 +58327,7 @@ ${exportDefaultFrom(`./${doc.name}`, doc.name)}`,
58413
58327
  }
58414
58328
 
58415
58329
  // src/codegen/generators/artifacts/inputs.ts
58416
- var graphql8 = __toESM(require("graphql"), 1);
58330
+ var graphql9 = __toESM(require("graphql"), 1);
58417
58331
  function inputObject(config, inputs, runtimeScalars) {
58418
58332
  const visitedTypes = /* @__PURE__ */ new Set();
58419
58333
  const inputObj = {
@@ -58443,10 +58357,10 @@ function walkInputs(config, visitedTypes, inputObj, rootType) {
58443
58357
  if (visitedTypes.has(type.name)) {
58444
58358
  return;
58445
58359
  }
58446
- if (graphql8.isEnumType(type) || graphql8.isScalarType(type)) {
58360
+ if (graphql9.isEnumType(type) || graphql9.isScalarType(type)) {
58447
58361
  return;
58448
58362
  }
58449
- if (graphql8.isUnionType(type)) {
58363
+ if (graphql9.isUnionType(type)) {
58450
58364
  return;
58451
58365
  }
58452
58366
  visitedTypes.add(type.name);
@@ -58464,50 +58378,50 @@ function walkInputs(config, visitedTypes, inputObj, rootType) {
58464
58378
  }
58465
58379
 
58466
58380
  // src/codegen/generators/artifacts/operations.ts
58467
- var graphql10 = __toESM(require("graphql"), 1);
58381
+ var graphql11 = __toESM(require("graphql"), 1);
58468
58382
 
58469
58383
  // src/codegen/generators/artifacts/utils.ts
58470
- var graphql9 = __toESM(require("graphql"), 1);
58471
- var recast3 = __toESM(require_main2(), 1);
58472
- var AST3 = recast3.types.builders;
58384
+ var graphql10 = __toESM(require("graphql"), 1);
58385
+ var recast4 = __toESM(require_main2(), 1);
58386
+ var AST4 = recast4.types.builders;
58473
58387
  function serializeValue(value) {
58474
58388
  if (Array.isArray(value)) {
58475
- return AST3.arrayExpression(value.map(serializeValue));
58389
+ return AST4.arrayExpression(value.map(serializeValue));
58476
58390
  }
58477
58391
  if (typeof value === "object" && value !== null) {
58478
- return AST3.objectExpression(
58392
+ return AST4.objectExpression(
58479
58393
  Object.entries(value).filter(([key, value2]) => typeof value2 !== "undefined").map(([key, val]) => {
58480
- return AST3.objectProperty(AST3.stringLiteral(key), serializeValue(val));
58394
+ return AST4.objectProperty(AST4.stringLiteral(key), serializeValue(val));
58481
58395
  })
58482
58396
  );
58483
58397
  }
58484
58398
  if (typeof value === "string") {
58485
58399
  if (value.indexOf("\n") !== -1) {
58486
- return AST3.templateLiteral(
58487
- [AST3.templateElement({ raw: value, cooked: value }, true)],
58400
+ return AST4.templateLiteral(
58401
+ [AST4.templateElement({ raw: value, cooked: value }, true)],
58488
58402
  []
58489
58403
  );
58490
58404
  }
58491
- return AST3.stringLiteral(value);
58405
+ return AST4.stringLiteral(value);
58492
58406
  }
58493
- return AST3.literal(value);
58407
+ return AST4.literal(value);
58494
58408
  }
58495
58409
  function convertValue(config, val) {
58496
58410
  let value;
58497
58411
  let kind;
58498
- if (val.kind === graphql9.Kind.INT) {
58412
+ if (val.kind === graphql10.Kind.INT) {
58499
58413
  value = parseInt(val.value, 10);
58500
58414
  kind = "Int";
58501
- } else if (val.kind === graphql9.Kind.FLOAT) {
58415
+ } else if (val.kind === graphql10.Kind.FLOAT) {
58502
58416
  value = parseFloat(val.value);
58503
58417
  kind = "Float";
58504
- } else if (val.kind === graphql9.Kind.BOOLEAN) {
58418
+ } else if (val.kind === graphql10.Kind.BOOLEAN) {
58505
58419
  value = val.value;
58506
58420
  kind = "Boolean";
58507
- } else if (val.kind === graphql9.Kind.VARIABLE) {
58421
+ } else if (val.kind === graphql10.Kind.VARIABLE) {
58508
58422
  value = val.name.value;
58509
58423
  kind = "Variable";
58510
- } else if (val.kind === graphql9.Kind.STRING) {
58424
+ } else if (val.kind === graphql10.Kind.STRING) {
58511
58425
  value = val.value;
58512
58426
  kind = "String";
58513
58427
  }
@@ -58520,9 +58434,13 @@ function operationsByPath(config, filepath, definition, filterTypes) {
58520
58434
  return {};
58521
58435
  }
58522
58436
  const pathOperations = {};
58523
- graphql10.visit(definition, {
58437
+ graphql11.visit(definition, {
58524
58438
  FragmentSpread(node, _, __, ___, ancestors) {
58525
- if (!config.isListFragment(node.name.value)) {
58439
+ let nameWithoutHash = node.name.value;
58440
+ if (node.directives && node.directives.find((directive) => directive.name.value === "with")) {
58441
+ nameWithoutHash = nameWithoutHash.substring(0, nameWithoutHash.lastIndexOf("_"));
58442
+ }
58443
+ if (!config.isListFragment(nameWithoutHash)) {
58526
58444
  return;
58527
58445
  }
58528
58446
  const path2 = ancestorKey(ancestors);
@@ -58533,8 +58451,8 @@ function operationsByPath(config, filepath, definition, filterTypes) {
58533
58451
  operationObject({
58534
58452
  config,
58535
58453
  filepath,
58536
- listName: config.listNameFromFragment(node.name.value),
58537
- operationKind: config.listOperationFromFragment(node.name.value),
58454
+ listName: config.listNameFromFragment(nameWithoutHash),
58455
+ operationKind: config.listOperationFromFragment(nameWithoutHash),
58538
58456
  type: parentTypeFromAncestors(config.schema, filepath, ancestors).name,
58539
58457
  selection: node
58540
58458
  })
@@ -58679,19 +58597,19 @@ function ancestorKey(ancestors) {
58679
58597
  }
58680
58598
 
58681
58599
  // src/codegen/generators/artifacts/selection.ts
58682
- var graphql15 = __toESM(require("graphql"), 1);
58600
+ var graphql16 = __toESM(require("graphql"), 1);
58683
58601
 
58684
58602
  // src/codegen/transforms/list.ts
58685
- var graphql13 = __toESM(require("graphql"), 1);
58603
+ var graphql14 = __toESM(require("graphql"), 1);
58686
58604
 
58687
58605
  // src/codegen/utils/objectIdentificationSelection.ts
58688
- var graphql11 = __toESM(require("graphql"), 1);
58606
+ var graphql12 = __toESM(require("graphql"), 1);
58689
58607
  var objectIdentificationSelection = (config, type) => {
58690
58608
  return config.keyFieldsForType(type.name).map((key) => {
58691
58609
  return {
58692
- kind: graphql11.Kind.FIELD,
58610
+ kind: graphql12.Kind.FIELD,
58693
58611
  name: {
58694
- kind: graphql11.Kind.NAME,
58612
+ kind: graphql12.Kind.NAME,
58695
58613
  value: key
58696
58614
  }
58697
58615
  };
@@ -58699,7 +58617,7 @@ var objectIdentificationSelection = (config, type) => {
58699
58617
  };
58700
58618
 
58701
58619
  // src/codegen/transforms/paginate.ts
58702
- var graphql12 = __toESM(require("graphql"), 1);
58620
+ var graphql13 = __toESM(require("graphql"), 1);
58703
58621
  async function paginate(config, documents) {
58704
58622
  const newDocs = [];
58705
58623
  for (const doc of documents) {
@@ -58732,7 +58650,7 @@ async function paginate(config, documents) {
58732
58650
  };
58733
58651
  let cursorType = "String";
58734
58652
  let paginationPath = [];
58735
- doc.document = graphql12.visit(doc.document, {
58653
+ doc.document = graphql13.visit(doc.document, {
58736
58654
  Field(node, _, __, ___, ancestors) {
58737
58655
  const paginateDirective = node.directives?.find(
58738
58656
  (directive) => directive.name.value === config.paginateDirective
@@ -58758,7 +58676,7 @@ async function paginate(config, documents) {
58758
58676
  flags.offset.enabled = offsetPagination;
58759
58677
  flags.limit.enabled = offsetPagination;
58760
58678
  paginationPath = ancestors.filter(
58761
- (ancestor) => !Array.isArray(ancestor) && ancestor.kind === graphql12.Kind.FIELD
58679
+ (ancestor) => !Array.isArray(ancestor) && ancestor.kind === graphql13.Kind.FIELD
58762
58680
  ).concat(node).map((field) => field.alias?.value || field.name.value);
58763
58681
  return {
58764
58682
  ...node,
@@ -58777,7 +58695,7 @@ async function paginate(config, documents) {
58777
58695
  let fragment2 = "";
58778
58696
  let paginateMode = config.defaultPaginateMode;
58779
58697
  const requiredArgs = [];
58780
- doc.document = graphql12.visit(doc.document, {
58698
+ doc.document = graphql13.visit(doc.document, {
58781
58699
  OperationDefinition(node) {
58782
58700
  if (node.operation !== "query") {
58783
58701
  throw new HoudiniError({
@@ -58836,9 +58754,9 @@ async function paginate(config, documents) {
58836
58754
  directives: [
58837
58755
  ...node.directives || [],
58838
58756
  {
58839
- kind: graphql12.Kind.DIRECTIVE,
58757
+ kind: graphql13.Kind.DIRECTIVE,
58840
58758
  name: {
58841
- kind: graphql12.Kind.NAME,
58759
+ kind: graphql13.Kind.NAME,
58842
58760
  value: config.argumentsDirective
58843
58761
  }
58844
58762
  }
@@ -58908,22 +58826,22 @@ async function paginate(config, documents) {
58908
58826
  const paginationArgs = Object.entries(flags).filter(([_, { enabled }]) => enabled).map(([key, value]) => ({ name: key, ...value }));
58909
58827
  const fragmentSpreadSelection = [
58910
58828
  {
58911
- kind: graphql12.Kind.FRAGMENT_SPREAD,
58829
+ kind: graphql13.Kind.FRAGMENT_SPREAD,
58912
58830
  name: {
58913
- kind: graphql12.Kind.NAME,
58831
+ kind: graphql13.Kind.NAME,
58914
58832
  value: fragmentName
58915
58833
  },
58916
58834
  directives: [
58917
58835
  {
58918
- kind: graphql12.Kind.DIRECTIVE,
58836
+ kind: graphql13.Kind.DIRECTIVE,
58919
58837
  name: {
58920
- kind: graphql12.Kind.NAME,
58838
+ kind: graphql13.Kind.NAME,
58921
58839
  value: config.withDirective
58922
58840
  },
58923
58841
  ["arguments"]: requiredArgs.map((arg) => variableAsArgument(arg.name)).concat(paginationArgs.map(({ name }) => variableAsArgument(name)))
58924
58842
  },
58925
58843
  {
58926
- kind: graphql12.Kind.DIRECTIVE,
58844
+ kind: graphql13.Kind.DIRECTIVE,
58927
58845
  name: {
58928
58846
  kind: "Name",
58929
58847
  value: config.maskDisableDirective
@@ -58950,23 +58868,23 @@ async function paginate(config, documents) {
58950
58868
  });
58951
58869
  const typeConfig = config.typeConfig?.[fragment2];
58952
58870
  const queryDoc = {
58953
- kind: graphql12.Kind.DOCUMENT,
58871
+ kind: graphql13.Kind.DOCUMENT,
58954
58872
  definitions: [
58955
58873
  {
58956
- kind: graphql12.Kind.OPERATION_DEFINITION,
58874
+ kind: graphql13.Kind.OPERATION_DEFINITION,
58957
58875
  name: {
58958
- kind: graphql12.Kind.NAME,
58876
+ kind: graphql13.Kind.NAME,
58959
58877
  value: refetchQueryName
58960
58878
  },
58961
58879
  operation: "query",
58962
58880
  variableDefinitions: requiredArgs.map(
58963
58881
  (arg) => ({
58964
- kind: graphql12.Kind.VARIABLE_DEFINITION,
58882
+ kind: graphql13.Kind.VARIABLE_DEFINITION,
58965
58883
  type: arg.type,
58966
58884
  variable: {
58967
- kind: graphql12.Kind.VARIABLE,
58885
+ kind: graphql13.Kind.VARIABLE,
58968
58886
  name: {
58969
- kind: graphql12.Kind.NAME,
58887
+ kind: graphql13.Kind.NAME,
58970
58888
  value: arg.name
58971
58889
  }
58972
58890
  }
@@ -58974,18 +58892,18 @@ async function paginate(config, documents) {
58974
58892
  ).concat(
58975
58893
  paginationArgs.map(
58976
58894
  (arg) => ({
58977
- kind: graphql12.Kind.VARIABLE_DEFINITION,
58895
+ kind: graphql13.Kind.VARIABLE_DEFINITION,
58978
58896
  type: {
58979
- kind: graphql12.Kind.NAMED_TYPE,
58897
+ kind: graphql13.Kind.NAMED_TYPE,
58980
58898
  name: {
58981
- kind: graphql12.Kind.NAME,
58899
+ kind: graphql13.Kind.NAME,
58982
58900
  value: arg.type
58983
58901
  }
58984
58902
  },
58985
58903
  variable: {
58986
- kind: graphql12.Kind.VARIABLE,
58904
+ kind: graphql13.Kind.VARIABLE,
58987
58905
  name: {
58988
- kind: graphql12.Kind.NAME,
58906
+ kind: graphql13.Kind.NAME,
58989
58907
  value: arg.name
58990
58908
  }
58991
58909
  },
@@ -58997,12 +58915,12 @@ async function paginate(config, documents) {
58997
58915
  ).concat(
58998
58916
  !nodeQuery ? [] : keys2.map(
58999
58917
  (key) => ({
59000
- kind: graphql12.Kind.VARIABLE_DEFINITION,
58918
+ kind: graphql13.Kind.VARIABLE_DEFINITION,
59001
58919
  type: key.type,
59002
58920
  variable: {
59003
- kind: graphql12.Kind.VARIABLE,
58921
+ kind: graphql13.Kind.VARIABLE,
59004
58922
  name: {
59005
- kind: graphql12.Kind.NAME,
58923
+ kind: graphql13.Kind.NAME,
59006
58924
  value: key.name
59007
58925
  }
59008
58926
  }
@@ -59011,42 +58929,42 @@ async function paginate(config, documents) {
59011
58929
  )
59012
58930
  ),
59013
58931
  selectionSet: {
59014
- kind: graphql12.Kind.SELECTION_SET,
58932
+ kind: graphql13.Kind.SELECTION_SET,
59015
58933
  selections: !nodeQuery ? fragmentSpreadSelection : [
59016
58934
  {
59017
- kind: graphql12.Kind.FIELD,
58935
+ kind: graphql13.Kind.FIELD,
59018
58936
  name: {
59019
- kind: graphql12.Kind.NAME,
58937
+ kind: graphql13.Kind.NAME,
59020
58938
  value: typeConfig?.resolve?.queryField || "node"
59021
58939
  },
59022
58940
  ["arguments"]: keys2.map((key) => ({
59023
- kind: graphql12.Kind.ARGUMENT,
58941
+ kind: graphql13.Kind.ARGUMENT,
59024
58942
  name: {
59025
- kind: graphql12.Kind.NAME,
58943
+ kind: graphql13.Kind.NAME,
59026
58944
  value: key.name
59027
58945
  },
59028
58946
  value: {
59029
- kind: graphql12.Kind.VARIABLE,
58947
+ kind: graphql13.Kind.VARIABLE,
59030
58948
  name: {
59031
- kind: graphql12.Kind.NAME,
58949
+ kind: graphql13.Kind.NAME,
59032
58950
  value: key.name
59033
58951
  }
59034
58952
  }
59035
58953
  })),
59036
58954
  selectionSet: {
59037
- kind: graphql12.Kind.SELECTION_SET,
58955
+ kind: graphql13.Kind.SELECTION_SET,
59038
58956
  selections: [
59039
58957
  {
59040
- kind: graphql12.Kind.FIELD,
58958
+ kind: graphql13.Kind.FIELD,
59041
58959
  name: {
59042
- kind: graphql12.Kind.NAME,
58960
+ kind: graphql13.Kind.NAME,
59043
58961
  value: "__typename"
59044
58962
  }
59045
58963
  },
59046
58964
  ...(typeConfig?.keys || [config.defaultKeys[0]]).map((key) => ({
59047
- kind: graphql12.Kind.FIELD,
58965
+ kind: graphql13.Kind.FIELD,
59048
58966
  name: {
59049
- kind: graphql12.Kind.NAME,
58967
+ kind: graphql13.Kind.NAME,
59050
58968
  value: key
59051
58969
  }
59052
58970
  })),
@@ -59103,15 +59021,15 @@ function replaceArgumentsWithVariables(args, flags) {
59103
59021
  }
59104
59022
  function variableAsArgument(name, variable) {
59105
59023
  return {
59106
- kind: graphql12.Kind.ARGUMENT,
59024
+ kind: graphql13.Kind.ARGUMENT,
59107
59025
  name: {
59108
- kind: graphql12.Kind.NAME,
59026
+ kind: graphql13.Kind.NAME,
59109
59027
  value: name
59110
59028
  },
59111
59029
  value: {
59112
- kind: graphql12.Kind.VARIABLE,
59030
+ kind: graphql13.Kind.VARIABLE,
59113
59031
  name: {
59114
- kind: graphql12.Kind.NAME,
59032
+ kind: graphql13.Kind.NAME,
59115
59033
  value: variable ?? name
59116
59034
  }
59117
59035
  }
@@ -59119,18 +59037,18 @@ function variableAsArgument(name, variable) {
59119
59037
  }
59120
59038
  function staticVariableDefinition(name, type, defaultValue, variableName) {
59121
59039
  return {
59122
- kind: graphql12.Kind.VARIABLE_DEFINITION,
59040
+ kind: graphql13.Kind.VARIABLE_DEFINITION,
59123
59041
  type: {
59124
- kind: graphql12.Kind.NAMED_TYPE,
59042
+ kind: graphql13.Kind.NAMED_TYPE,
59125
59043
  name: {
59126
- kind: graphql12.Kind.NAME,
59044
+ kind: graphql13.Kind.NAME,
59127
59045
  value: type
59128
59046
  }
59129
59047
  },
59130
59048
  variable: {
59131
- kind: graphql12.Kind.VARIABLE,
59049
+ kind: graphql13.Kind.VARIABLE,
59132
59050
  name: {
59133
- kind: graphql12.Kind.NAME,
59051
+ kind: graphql13.Kind.NAME,
59134
59052
  value: variableName ?? name
59135
59053
  }
59136
59054
  },
@@ -59142,9 +59060,9 @@ function staticVariableDefinition(name, type, defaultValue, variableName) {
59142
59060
  }
59143
59061
  function argumentNode(name, value) {
59144
59062
  return {
59145
- kind: graphql12.Kind.ARGUMENT,
59063
+ kind: graphql13.Kind.ARGUMENT,
59146
59064
  name: {
59147
- kind: graphql12.Kind.NAME,
59065
+ kind: graphql13.Kind.NAME,
59148
59066
  value: name
59149
59067
  },
59150
59068
  value: objectNode(value)
@@ -59152,16 +59070,16 @@ function argumentNode(name, value) {
59152
59070
  }
59153
59071
  function objectNode([type, defaultValue]) {
59154
59072
  const node = {
59155
- kind: graphql12.Kind.OBJECT,
59073
+ kind: graphql13.Kind.OBJECT,
59156
59074
  fields: [
59157
59075
  {
59158
- kind: graphql12.Kind.OBJECT_FIELD,
59076
+ kind: graphql13.Kind.OBJECT_FIELD,
59159
59077
  name: {
59160
- kind: graphql12.Kind.NAME,
59078
+ kind: graphql13.Kind.NAME,
59161
59079
  value: "type"
59162
59080
  },
59163
59081
  value: {
59164
- kind: graphql12.Kind.STRING,
59082
+ kind: graphql13.Kind.STRING,
59165
59083
  value: type
59166
59084
  }
59167
59085
  }
@@ -59169,8 +59087,8 @@ function objectNode([type, defaultValue]) {
59169
59087
  };
59170
59088
  if (defaultValue) {
59171
59089
  node.fields.push({
59172
- kind: graphql12.Kind.OBJECT_FIELD,
59173
- name: { kind: graphql12.Kind.NAME, value: "default" },
59090
+ kind: graphql13.Kind.OBJECT_FIELD,
59091
+ name: { kind: graphql13.Kind.NAME, value: "default" },
59174
59092
  value: {
59175
59093
  kind: typeof defaultValue === "number" ? "IntValue" : "StringValue",
59176
59094
  value: defaultValue.toString()
@@ -59181,34 +59099,34 @@ function objectNode([type, defaultValue]) {
59181
59099
  }
59182
59100
  var pageInfoSelection = [
59183
59101
  {
59184
- kind: graphql12.Kind.FIELD,
59102
+ kind: graphql13.Kind.FIELD,
59185
59103
  name: {
59186
- kind: graphql12.Kind.NAME,
59104
+ kind: graphql13.Kind.NAME,
59187
59105
  value: "edges"
59188
59106
  },
59189
59107
  selectionSet: {
59190
- kind: graphql12.Kind.SELECTION_SET,
59108
+ kind: graphql13.Kind.SELECTION_SET,
59191
59109
  selections: [
59192
59110
  {
59193
- kind: graphql12.Kind.FIELD,
59111
+ kind: graphql13.Kind.FIELD,
59194
59112
  name: {
59195
- kind: graphql12.Kind.NAME,
59113
+ kind: graphql13.Kind.NAME,
59196
59114
  value: "cursor"
59197
59115
  }
59198
59116
  },
59199
59117
  {
59200
- kind: graphql12.Kind.FIELD,
59118
+ kind: graphql13.Kind.FIELD,
59201
59119
  name: {
59202
- kind: graphql12.Kind.NAME,
59120
+ kind: graphql13.Kind.NAME,
59203
59121
  value: "node"
59204
59122
  },
59205
59123
  selectionSet: {
59206
- kind: graphql12.Kind.SELECTION_SET,
59124
+ kind: graphql13.Kind.SELECTION_SET,
59207
59125
  selections: [
59208
59126
  {
59209
- kind: graphql12.Kind.FIELD,
59127
+ kind: graphql13.Kind.FIELD,
59210
59128
  name: {
59211
- kind: graphql12.Kind.NAME,
59129
+ kind: graphql13.Kind.NAME,
59212
59130
  value: "__typename"
59213
59131
  }
59214
59132
  }
@@ -59219,39 +59137,39 @@ var pageInfoSelection = [
59219
59137
  }
59220
59138
  },
59221
59139
  {
59222
- kind: graphql12.Kind.FIELD,
59140
+ kind: graphql13.Kind.FIELD,
59223
59141
  name: {
59224
- kind: graphql12.Kind.NAME,
59142
+ kind: graphql13.Kind.NAME,
59225
59143
  value: "pageInfo"
59226
59144
  },
59227
59145
  selectionSet: {
59228
- kind: graphql12.Kind.SELECTION_SET,
59146
+ kind: graphql13.Kind.SELECTION_SET,
59229
59147
  selections: [
59230
59148
  {
59231
- kind: graphql12.Kind.FIELD,
59149
+ kind: graphql13.Kind.FIELD,
59232
59150
  name: {
59233
- kind: graphql12.Kind.NAME,
59151
+ kind: graphql13.Kind.NAME,
59234
59152
  value: "hasPreviousPage"
59235
59153
  }
59236
59154
  },
59237
59155
  {
59238
- kind: graphql12.Kind.FIELD,
59156
+ kind: graphql13.Kind.FIELD,
59239
59157
  name: {
59240
- kind: graphql12.Kind.NAME,
59158
+ kind: graphql13.Kind.NAME,
59241
59159
  value: "hasNextPage"
59242
59160
  }
59243
59161
  },
59244
59162
  {
59245
- kind: graphql12.Kind.FIELD,
59163
+ kind: graphql13.Kind.FIELD,
59246
59164
  name: {
59247
- kind: graphql12.Kind.NAME,
59165
+ kind: graphql13.Kind.NAME,
59248
59166
  value: "startCursor"
59249
59167
  }
59250
59168
  },
59251
59169
  {
59252
- kind: graphql12.Kind.FIELD,
59170
+ kind: graphql13.Kind.FIELD,
59253
59171
  name: {
59254
- kind: graphql12.Kind.NAME,
59172
+ kind: graphql13.Kind.NAME,
59255
59173
  value: "endCursor"
59256
59174
  }
59257
59175
  }
@@ -59265,17 +59183,17 @@ async function addListFragments(config, documents) {
59265
59183
  const lists = {};
59266
59184
  const errors = [];
59267
59185
  for (const doc of documents) {
59268
- doc.document = graphql13.visit(doc.document, {
59186
+ doc.document = graphql14.visit(doc.document, {
59269
59187
  Directive(node, key, parent2, path2, ancestors) {
59270
59188
  if ([config.listDirective, config.paginateDirective].includes(node.name.value)) {
59271
59189
  const nameArg = node.arguments?.find(
59272
59190
  (arg) => arg.name.value === config.listOrPaginateNameArg
59273
59191
  );
59274
59192
  let error = {
59275
- ...new graphql13.GraphQLError(
59193
+ ...new graphql14.GraphQLError(
59276
59194
  "",
59277
59195
  node,
59278
- new graphql13.Source(""),
59196
+ new graphql14.Source(""),
59279
59197
  node.loc ? [node.loc.start, node.loc.end] : null,
59280
59198
  path2
59281
59199
  ),
@@ -59327,7 +59245,7 @@ async function addListFragments(config, documents) {
59327
59245
  {
59328
59246
  kind: "Argument",
59329
59247
  name: {
59330
- kind: graphql13.Kind.NAME,
59248
+ kind: graphql14.Kind.NAME,
59331
59249
  value: "connection"
59332
59250
  },
59333
59251
  value: {
@@ -59377,7 +59295,7 @@ async function addListFragments(config, documents) {
59377
59295
  const validDeletes = [
59378
59296
  ...new Set(
59379
59297
  Object.values(lists).map(({ type }) => {
59380
- if (!(type instanceof graphql13.GraphQLObjectType)) {
59298
+ if (!(type instanceof graphql14.GraphQLObjectType)) {
59381
59299
  return "";
59382
59300
  }
59383
59301
  if (config.keyFieldsForType(type.name).length !== 1) {
@@ -59391,7 +59309,7 @@ async function addListFragments(config, documents) {
59391
59309
  return;
59392
59310
  }
59393
59311
  const generatedDoc = {
59394
- kind: graphql13.Kind.DOCUMENT,
59312
+ kind: graphql14.Kind.DOCUMENT,
59395
59313
  definitions: Object.entries(lists).flatMap(
59396
59314
  ([name, { selection, type }]) => {
59397
59315
  const schemaType = config.schema.getType(type.name);
@@ -59399,7 +59317,7 @@ async function addListFragments(config, documents) {
59399
59317
  throw new HoudiniError({ message: "Lists must have a selection" });
59400
59318
  }
59401
59319
  const fragmentSelection = {
59402
- kind: graphql13.Kind.SELECTION_SET,
59320
+ kind: graphql14.Kind.SELECTION_SET,
59403
59321
  selections: [...selection.selections]
59404
59322
  };
59405
59323
  if (schemaType && fragmentSelection && !fragmentSelection?.selections.find(
@@ -59414,14 +59332,14 @@ async function addListFragments(config, documents) {
59414
59332
  {
59415
59333
  name: {
59416
59334
  value: config.listInsertFragment(name),
59417
- kind: graphql13.Kind.NAME
59335
+ kind: graphql14.Kind.NAME
59418
59336
  },
59419
- kind: graphql13.Kind.FRAGMENT_DEFINITION,
59337
+ kind: graphql14.Kind.FRAGMENT_DEFINITION,
59420
59338
  selectionSet: fragmentSelection,
59421
59339
  typeCondition: {
59422
- kind: graphql13.Kind.NAMED_TYPE,
59340
+ kind: graphql14.Kind.NAMED_TYPE,
59423
59341
  name: {
59424
- kind: graphql13.Kind.NAME,
59342
+ kind: graphql14.Kind.NAME,
59425
59343
  value: type.name
59426
59344
  }
59427
59345
  }
@@ -59429,32 +59347,32 @@ async function addListFragments(config, documents) {
59429
59347
  {
59430
59348
  name: {
59431
59349
  value: config.listToggleFragment(name),
59432
- kind: graphql13.Kind.NAME
59350
+ kind: graphql14.Kind.NAME
59433
59351
  },
59434
- kind: graphql13.Kind.FRAGMENT_DEFINITION,
59352
+ kind: graphql14.Kind.FRAGMENT_DEFINITION,
59435
59353
  selectionSet: fragmentSelection,
59436
59354
  typeCondition: {
59437
- kind: graphql13.Kind.NAMED_TYPE,
59355
+ kind: graphql14.Kind.NAMED_TYPE,
59438
59356
  name: {
59439
- kind: graphql13.Kind.NAME,
59357
+ kind: graphql14.Kind.NAME,
59440
59358
  value: type.name
59441
59359
  }
59442
59360
  }
59443
59361
  },
59444
59362
  {
59445
- kind: graphql13.Kind.FRAGMENT_DEFINITION,
59363
+ kind: graphql14.Kind.FRAGMENT_DEFINITION,
59446
59364
  name: {
59447
59365
  value: config.listRemoveFragment(name),
59448
- kind: graphql13.Kind.NAME
59366
+ kind: graphql14.Kind.NAME
59449
59367
  },
59450
59368
  selectionSet: {
59451
- kind: graphql13.Kind.SELECTION_SET,
59369
+ kind: graphql14.Kind.SELECTION_SET,
59452
59370
  selections: [...objectIdentificationSelection(config, type)]
59453
59371
  },
59454
59372
  typeCondition: {
59455
- kind: graphql13.Kind.NAMED_TYPE,
59373
+ kind: graphql14.Kind.NAMED_TYPE,
59456
59374
  name: {
59457
- kind: graphql13.Kind.NAME,
59375
+ kind: graphql14.Kind.NAME,
59458
59376
  value: type.name
59459
59377
  }
59460
59378
  }
@@ -59463,14 +59381,14 @@ async function addListFragments(config, documents) {
59463
59381
  }
59464
59382
  ).concat(
59465
59383
  ...validDeletes.map((typeName) => ({
59466
- kind: graphql13.Kind.DIRECTIVE_DEFINITION,
59384
+ kind: graphql14.Kind.DIRECTIVE_DEFINITION,
59467
59385
  name: {
59468
- kind: graphql13.Kind.NAME,
59386
+ kind: graphql14.Kind.NAME,
59469
59387
  value: config.listDeleteDirective(typeName)
59470
59388
  },
59471
59389
  locations: [
59472
59390
  {
59473
- kind: graphql13.Kind.NAME,
59391
+ kind: graphql14.Kind.NAME,
59474
59392
  value: "FIELD"
59475
59393
  }
59476
59394
  ],
@@ -59478,8 +59396,8 @@ async function addListFragments(config, documents) {
59478
59396
  }))
59479
59397
  )
59480
59398
  };
59481
- config.newSchema += "\n" + generatedDoc.definitions.filter((c) => c.kind !== "FragmentDefinition").map(graphql13.print).join("\n\n");
59482
- config.newDocuments += "\n" + generatedDoc.definitions.filter((c) => c.kind === "FragmentDefinition").map(graphql13.print).join("\n\n");
59399
+ config.newSchema += "\n" + generatedDoc.definitions.filter((c) => c.kind !== "FragmentDefinition").map(graphql14.print).join("\n\n");
59400
+ config.newDocuments += "\n" + generatedDoc.definitions.filter((c) => c.kind === "FragmentDefinition").map(graphql14.print).join("\n\n");
59483
59401
  documents.push({
59484
59402
  name: "generated::lists",
59485
59403
  kind: ArtifactKind.Fragment,
@@ -59565,11 +59483,11 @@ var nodeNotDefinedMessage = (config) => `Looks like you are trying to use the ${
59565
59483
  For more information, visit this link: ${siteURL}/guides/pagination`;
59566
59484
 
59567
59485
  // src/codegen/generators/artifacts/fieldKey.ts
59568
- var graphql14 = __toESM(require("graphql"), 1);
59486
+ var graphql15 = __toESM(require("graphql"), 1);
59569
59487
  function fieldKey(config, field) {
59570
59488
  const attributeName = field.alias?.value || field.name.value;
59571
- const printed = graphql14.print(field);
59572
- const secondParse = graphql14.parse(`{${printed}}`).definitions[0].selectionSet.selections[0];
59489
+ const printed = graphql15.print(field);
59490
+ const secondParse = graphql15.parse(`{${printed}}`).definitions[0].selectionSet.selections[0];
59573
59491
  let paginateMode = config.defaultPaginateMode;
59574
59492
  const paginatedDirective = field.directives?.find(
59575
59493
  (directive) => directive.name.value === config.paginateDirective
@@ -59692,13 +59610,13 @@ function prepareSelection({
59692
59610
  } else if ("getFields" in type) {
59693
59611
  let typeRef = type.getFields()[field.name.value].type;
59694
59612
  fieldType = getRootType(typeRef);
59695
- nullable = !graphql15.isNonNullType(typeRef);
59696
- } else if (graphql15.isAbstractType(type)) {
59613
+ nullable = !graphql16.isNonNullType(typeRef);
59614
+ } else if (graphql16.isAbstractType(type)) {
59697
59615
  for (const possible of config.schema.getPossibleTypes(type)) {
59698
- if (graphql15.isObjectType(possible)) {
59616
+ if (graphql16.isObjectType(possible)) {
59699
59617
  if (possible.getFields()[field.name.value]) {
59700
59618
  fieldType = possible.getFields()[field.name.value].type;
59701
- nullable = !graphql15.isNonNullType(fieldType);
59619
+ nullable = !graphql16.isNonNullType(fieldType);
59702
59620
  break;
59703
59621
  }
59704
59622
  }
@@ -59835,7 +59753,7 @@ function prepareSelection({
59835
59753
  kind: "value"
59836
59754
  } : { kind: "continue" };
59837
59755
  const parentType = config.schema.getType(rootType);
59838
- if (graphql15.isObjectType(parentType) || graphql15.isInterfaceType(parentType)) {
59756
+ if (graphql16.isObjectType(parentType) || graphql16.isInterfaceType(parentType)) {
59839
59757
  const fieldType2 = parentType.getFields()[field.name.value]?.type;
59840
59758
  if (fieldType2) {
59841
59759
  const listCount = unwrapType(config, fieldType2).wrappers.filter(
@@ -59858,7 +59776,7 @@ function prepareSelection({
59858
59776
  }
59859
59777
  fieldObj.loading = loadingValue;
59860
59778
  }
59861
- if (graphql15.isInterfaceType(fieldType) || graphql15.isUnionType(fieldType)) {
59779
+ if (graphql16.isInterfaceType(fieldType) || graphql16.isUnionType(fieldType)) {
59862
59780
  fieldObj.abstract = true;
59863
59781
  if (Object.values(fieldObj.selection?.abstractFields?.fields ?? {}).some(
59864
59782
  (fields) => Object.values(fields ?? {}).some((field2) => field2.required)
@@ -59940,7 +59858,7 @@ function mergeSelection({
59940
59858
  typeSelection,
59941
59859
  abstractSelection.fields[typeName] ?? {}
59942
59860
  );
59943
- if (graphql15.isAbstractType(gqlType)) {
59861
+ if (graphql16.isAbstractType(gqlType)) {
59944
59862
  for (const possible of config.schema.getPossibleTypes(gqlType)) {
59945
59863
  if (!possibleSelectionTypes[typeName]) {
59946
59864
  possibleSelectionTypes[typeName] = [];
@@ -59975,7 +59893,7 @@ function mergeSelection({
59975
59893
  }
59976
59894
  }
59977
59895
  const parentType = config.schema.getType(rootType);
59978
- const possibleParents = graphql15.isAbstractType(parentType) ? config.schema.getPossibleTypes(parentType)?.map((t2) => t2.name) : [parentType.name];
59896
+ const possibleParents = graphql16.isAbstractType(parentType) ? config.schema.getPossibleTypes(parentType)?.map((t2) => t2.name) : [parentType.name];
59979
59897
  for (const key of Object.keys(abstractSelection.typeMap)) {
59980
59898
  if (!possibleParents.includes(key) && rootType !== key || abstractSelection.fields[key]) {
59981
59899
  delete abstractSelection.typeMap[key];
@@ -60032,12 +59950,12 @@ function mergeSelection({
60032
59950
  }
60033
59951
 
60034
59952
  // src/codegen/generators/artifacts/index.ts
60035
- var AST4 = recast4.types.builders;
59953
+ var AST5 = recast5.types.builders;
60036
59954
  function artifactGenerator(stats) {
60037
59955
  return async function(config, docs) {
60038
59956
  const filterTypes = {};
60039
59957
  for (const doc of docs) {
60040
- graphql16.visit(doc.document, {
59958
+ graphql17.visit(doc.document, {
60041
59959
  Directive(node, _, __, ___, ancestors) {
60042
59960
  if (node.name.value !== config.listDirective) {
60043
59961
  return;
@@ -60097,7 +60015,7 @@ function artifactGenerator(stats) {
60097
60015
  return;
60098
60016
  }
60099
60017
  const usedVariableNames = /* @__PURE__ */ new Set();
60100
- let documentWithoutInternalDirectives = graphql16.visit(document, {
60018
+ let documentWithoutInternalDirectives = graphql17.visit(document, {
60101
60019
  Directive(node) {
60102
60020
  if (config.isInternalDirective(node.name.value)) {
60103
60021
  return null;
@@ -60110,7 +60028,7 @@ function artifactGenerator(stats) {
60110
60028
  }
60111
60029
  }
60112
60030
  });
60113
- let documentWithoutExtraVariables = graphql16.visit(
60031
+ let documentWithoutExtraVariables = graphql17.visit(
60114
60032
  documentWithoutInternalDirectives,
60115
60033
  {
60116
60034
  VariableDefinition(variableDefinitionNode) {
@@ -60121,13 +60039,13 @@ function artifactGenerator(stats) {
60121
60039
  }
60122
60040
  }
60123
60041
  );
60124
- let rawString = graphql16.print(documentWithoutExtraVariables);
60042
+ let rawString = graphql17.print(documentWithoutExtraVariables);
60125
60043
  let docKind = doc.kind;
60126
60044
  const operations = document.definitions.filter(
60127
- ({ kind }) => kind === graphql16.Kind.OPERATION_DEFINITION
60045
+ ({ kind }) => kind === graphql17.Kind.OPERATION_DEFINITION
60128
60046
  );
60129
60047
  const fragments = document.definitions.filter(
60130
- ({ kind }) => kind === graphql16.Kind.FRAGMENT_DEFINITION
60048
+ ({ kind }) => kind === graphql17.Kind.FRAGMENT_DEFINITION
60131
60049
  );
60132
60050
  let rootType = "";
60133
60051
  let selectionSet;
@@ -60327,9 +60245,9 @@ function artifactGenerator(stats) {
60327
60245
  plugin2.artifactEnd({ config, document: doc });
60328
60246
  }
60329
60247
  const _houdiniHash = hashOriginal({ document: doc });
60330
- const file = AST4.program([
60248
+ const file = AST5.program([
60331
60249
  moduleExport(config, "default", serializeValue(artifact)),
60332
- AST4.expressionStatement(AST4.stringLiteral(`HoudiniHash=${_houdiniHash}`))
60250
+ AST5.expressionStatement(AST5.stringLiteral(`HoudiniHash=${_houdiniHash}`))
60333
60251
  ]);
60334
60252
  const artifactPath = config.artifactPath(document);
60335
60253
  const countDocument = doc.generateStore;
@@ -60387,7 +60305,7 @@ function applyMask(config, target, mask) {
60387
60305
  if (!targetType) {
60388
60306
  continue;
60389
60307
  }
60390
- if (graphql16.isAbstractType(targetType)) {
60308
+ if (graphql17.isAbstractType(targetType)) {
60391
60309
  for (const possible of config.schema.getPossibleTypes(targetType)) {
60392
60310
  if (target.abstractFields?.fields[possible.name]) {
60393
60311
  applyMask(
@@ -60410,8 +60328,8 @@ function applyMask(config, target, mask) {
60410
60328
  }
60411
60329
 
60412
60330
  // src/codegen/generators/runtime/graphqlFunction.ts
60413
- var recast5 = __toESM(require_main2(), 1);
60414
- var AST5 = recast5.types.builders;
60331
+ var recast6 = __toESM(require_main2(), 1);
60332
+ var AST6 = recast6.types.builders;
60415
60333
  async function generateGraphqlReturnTypes(config, docs) {
60416
60334
  const indexPath = path_exports.join(config.runtimeDirectory, "index.d.ts");
60417
60335
  const fileContent = await fs_exports.readFile(indexPath) || "";
@@ -60446,18 +60364,18 @@ async function generateGraphqlReturnTypes(config, docs) {
60446
60364
  continue;
60447
60365
  }
60448
60366
  for (const [queryString, returnValue] of Object.entries(overloaded_returns)) {
60449
- const input = AST5.identifier("str");
60450
- input.typeAnnotation = AST5.tsTypeAnnotation(
60451
- AST5.tsLiteralType(AST5.stringLiteral(queryString))
60367
+ const input = AST6.identifier("str");
60368
+ input.typeAnnotation = AST6.tsTypeAnnotation(
60369
+ AST6.tsLiteralType(AST6.stringLiteral(queryString))
60452
60370
  );
60453
60371
  script.body.splice(
60454
60372
  i,
60455
60373
  0,
60456
- AST5.exportNamedDeclaration(
60457
- AST5.tsDeclareFunction(
60458
- AST5.identifier("graphql"),
60374
+ AST6.exportNamedDeclaration(
60375
+ AST6.tsDeclareFunction(
60376
+ AST6.identifier("graphql"),
60459
60377
  [input],
60460
- AST5.tsTypeAnnotation(AST5.tsTypeReference(AST5.identifier(returnValue)))
60378
+ AST6.tsTypeAnnotation(AST6.tsTypeReference(AST6.identifier(returnValue)))
60461
60379
  )
60462
60380
  )
60463
60381
  );
@@ -60632,165 +60550,22 @@ function moduleStatments(config) {
60632
60550
  var recast11 = __toESM(require_main2(), 1);
60633
60551
 
60634
60552
  // src/codegen/generators/typescript/addReferencedInputTypes.ts
60635
- var graphql19 = __toESM(require("graphql"), 1);
60636
- var recast8 = __toESM(require_main2(), 1);
60637
-
60638
- // src/codegen/generators/typescript/typeReference.ts
60639
60553
  var graphql18 = __toESM(require("graphql"), 1);
60640
60554
  var recast7 = __toESM(require_main2(), 1);
60641
-
60642
- // src/codegen/generators/typescript/types.ts
60643
- var graphql17 = __toESM(require("graphql"), 1);
60644
- var recast6 = __toESM(require_main2(), 1);
60645
- var AST6 = recast6.types.builders;
60646
- function readonlyProperty(prop, enable = true) {
60647
- if (enable) {
60648
- prop.readonly = true;
60649
- }
60650
- return prop;
60651
- }
60652
- function nullableField(inner, input = false) {
60653
- const members = [inner, AST6.tsNullKeyword()];
60654
- if (input) {
60655
- members.push(AST6.tsUndefinedKeyword());
60656
- }
60657
- return AST6.tsUnionType(members);
60658
- }
60659
- function scalarPropertyValue(config, filepath, missingScalars, target, body, field) {
60660
- if (config.configFile.features?.componentFields && target.name === config.componentScalar) {
60661
- if (!field) {
60662
- return AST6.tsNeverKeyword();
60663
- }
60664
- const component = config.componentFields[field.parent][field.field];
60665
- const sourcePathRelative = path_exports.relative(
60666
- path_exports.join(config.projectRoot, "src"),
60667
- component.filepath
60668
- );
60669
- let sourcePathParsed = path_exports.parse(sourcePathRelative);
60670
- let sourcePath = path_exports.join(sourcePathParsed.dir, sourcePathParsed.name);
60671
- const localImport = ensureImports({
60672
- config,
60673
- body,
60674
- import: "__component__" + component.fragment,
60675
- sourceModule: path_exports.join(
60676
- path_exports.relative(path_exports.dirname(filepath), config.projectRoot),
60677
- "src",
60678
- sourcePath
60679
- )
60680
- });
60681
- const parameters = AST6.tsTypeReference(AST6.identifier("Parameters"));
60682
- parameters.typeParameters = AST6.tsTypeParameterInstantiation([
60683
- AST6.tsTypeQuery(AST6.identifier(localImport))
60684
- ]);
60685
- const indexed = AST6.tsIndexedAccessType(
60686
- parameters,
60687
- AST6.tsLiteralType(AST6.numericLiteral(0))
60688
- );
60689
- const omit = AST6.tsTypeReference(AST6.identifier("Omit"));
60690
- omit.typeParameters = AST6.tsTypeParameterInstantiation([
60691
- indexed,
60692
- AST6.tsLiteralType(AST6.stringLiteral(component.prop))
60693
- ]);
60694
- const arg = AST6.identifier("props");
60695
- arg.typeAnnotation = AST6.tsTypeAnnotation(omit);
60696
- const returnType = AST6.tsTypeReference(AST6.identifier("ReturnType"));
60697
- returnType.typeParameters = AST6.tsTypeParameterInstantiation([
60698
- AST6.tsTypeQuery(AST6.identifier(localImport))
60699
- ]);
60700
- const fnType = AST6.tsFunctionType([arg]);
60701
- fnType.typeAnnotation = AST6.tsTypeAnnotation(returnType);
60702
- return fnType;
60703
- }
60704
- switch (target.name) {
60705
- case "String": {
60706
- return AST6.tsStringKeyword();
60707
- }
60708
- case "Int": {
60709
- return AST6.tsNumberKeyword();
60710
- }
60711
- case "Float": {
60712
- return AST6.tsNumberKeyword();
60713
- }
60714
- case "Boolean": {
60715
- return AST6.tsBooleanKeyword();
60716
- }
60717
- case "ID": {
60718
- return AST6.tsStringKeyword();
60719
- }
60720
- default: {
60721
- if (graphql17.isNonNullType(target) && "ofType" in target) {
60722
- return scalarPropertyValue(
60723
- config,
60724
- filepath,
60725
- missingScalars,
60726
- target.ofType,
60727
- body,
60728
- field
60729
- );
60730
- }
60731
- if (config.scalars?.[target.name]) {
60732
- return AST6.tsTypeReference(AST6.identifier(config.scalars?.[target.name].type));
60733
- }
60734
- if (target.name !== config.componentScalar) {
60735
- missingScalars.add(target.name);
60736
- }
60737
- return AST6.tsAnyKeyword();
60738
- }
60739
- }
60740
- }
60741
-
60742
- // src/codegen/generators/typescript/typeReference.ts
60743
60555
  var AST7 = recast7.types.builders;
60744
- function tsTypeReference(config, filepath, missingScalars, definition, body) {
60745
- const { type, wrappers } = unwrapType(config, definition.type);
60746
- let result;
60747
- if (graphql18.isScalarType(type)) {
60748
- result = scalarPropertyValue(config, filepath, missingScalars, type, body, null);
60749
- } else if (graphql18.isEnumType(type)) {
60750
- result = enumReference(config, body, type.name);
60751
- } else {
60752
- result = AST7.tsTypeReference(AST7.identifier(type.name));
60753
- }
60754
- for (const toWrap of wrappers) {
60755
- if (toWrap === "NonNull" /* NonNull */) {
60756
- continue;
60757
- } else if (toWrap === "Nullable" /* Nullable */) {
60758
- result = nullableField(result, true);
60759
- } else if (toWrap === "List" /* List */) {
60760
- result = AST7.tsArrayType(AST7.tsParenthesizedType(result));
60761
- }
60762
- }
60763
- return result;
60764
- }
60765
- function enumReference(config, body, name) {
60766
- ensureImports({
60767
- config,
60768
- body,
60769
- import: ["ValueOf"],
60770
- importKind: "type",
60771
- sourceModule: "$houdini/runtime/lib/types"
60772
- });
60773
- return AST7.tsTypeReference(
60774
- AST7.identifier("ValueOf"),
60775
- AST7.tsTypeParameterInstantiation([AST7.tsTypeQuery(AST7.identifier(name))])
60776
- );
60777
- }
60778
-
60779
- // src/codegen/generators/typescript/addReferencedInputTypes.ts
60780
- var AST8 = recast8.types.builders;
60781
60556
  function addReferencedInputTypes(config, filepath, body, visitedTypes, missingScalars, rootType) {
60782
60557
  const { type } = unwrapType(config, rootType);
60783
- if (graphql19.isScalarType(type)) {
60558
+ if (graphql18.isScalarType(type)) {
60784
60559
  return;
60785
60560
  }
60786
60561
  if (visitedTypes.has(type.name)) {
60787
60562
  return;
60788
60563
  }
60789
- if (graphql19.isUnionType(type)) {
60564
+ if (graphql18.isUnionType(type)) {
60790
60565
  throw new HoudiniError({ filepath, message: "Input Unions are not supported yet. Sorry!" });
60791
60566
  }
60792
60567
  visitedTypes.add(type.name);
60793
- if (graphql19.isEnumType(type)) {
60568
+ if (graphql18.isEnumType(type)) {
60794
60569
  ensureImports({
60795
60570
  config,
60796
60571
  body,
@@ -60804,21 +60579,37 @@ function addReferencedInputTypes(config, filepath, body, visitedTypes, missingSc
60804
60579
  for (const field of Object.values(type.getFields())) {
60805
60580
  addReferencedInputTypes(config, filepath, body, visitedTypes, missingScalars, field.type);
60806
60581
  members.push(
60807
- AST8.tsPropertySignature(
60808
- AST8.identifier(field.name),
60809
- AST8.tsTypeAnnotation(
60582
+ AST7.tsPropertySignature(
60583
+ AST7.identifier(field.name),
60584
+ AST7.tsTypeAnnotation(
60810
60585
  tsTypeReference(config, filepath, missingScalars, field, body)
60811
60586
  ),
60812
- graphql19.isNullableType(field.type)
60587
+ graphql18.isNullableType(field.type)
60813
60588
  )
60814
60589
  );
60815
60590
  }
60816
- body.push(AST8.tsTypeAliasDeclaration(AST8.identifier(type.name), AST8.tsTypeLiteral(members)));
60591
+ body.push(AST7.tsTypeAliasDeclaration(AST7.identifier(type.name), AST7.tsTypeLiteral(members)));
60817
60592
  }
60818
60593
 
60819
60594
  // src/codegen/generators/typescript/inlineType.ts
60820
- var graphql20 = __toESM(require("graphql"), 1);
60595
+ var graphql19 = __toESM(require("graphql"), 1);
60821
60596
  var recast9 = __toESM(require_main2(), 1);
60597
+
60598
+ // src/codegen/generators/comments/jsdoc.ts
60599
+ var recast8 = __toESM(require_main2(), 1);
60600
+ var AST8 = recast8.types.builders;
60601
+ function jsdocComment(text, deprecated) {
60602
+ let commentContent = `*
60603
+ * ${text}
60604
+ `;
60605
+ if (deprecated) {
60606
+ commentContent = `${commentContent} * @deprecated ${deprecated}
60607
+ `;
60608
+ }
60609
+ return AST8.commentBlock(commentContent, true);
60610
+ }
60611
+
60612
+ // src/codegen/generators/typescript/inlineType.ts
60822
60613
  var AST9 = recast9.types.builders;
60823
60614
  var fragmentKey2 = " $fragments";
60824
60615
  function inlineType({
@@ -60839,7 +60630,7 @@ function inlineType({
60839
60630
  const { type, wrappers } = unwrapType(config, rootType);
60840
60631
  let result;
60841
60632
  let forceNullable = false;
60842
- if (graphql20.isScalarType(type)) {
60633
+ if (graphql19.isScalarType(type)) {
60843
60634
  result = scalarPropertyValue(
60844
60635
  config,
60845
60636
  filepath,
@@ -60848,7 +60639,7 @@ function inlineType({
60848
60639
  body,
60849
60640
  field
60850
60641
  );
60851
- } else if (graphql20.isEnumType(type)) {
60642
+ } else if (graphql19.isEnumType(type)) {
60852
60643
  ensureImports({
60853
60644
  config,
60854
60645
  body,
@@ -60873,11 +60664,11 @@ function inlineType({
60873
60664
  for (const selection of selections) {
60874
60665
  if (selection.kind === "InlineFragment" && selection.typeCondition) {
60875
60666
  const fragmentType = config.schema.getType(selection.typeCondition.name.value);
60876
- if (!graphql20.isInterfaceType(type) && !graphql20.isUnionType(type)) {
60667
+ if (!graphql19.isInterfaceType(type) && !graphql19.isUnionType(type)) {
60877
60668
  selectedFields.push(...selection.selectionSet.selections);
60878
60669
  continue;
60879
60670
  }
60880
- if (!graphql20.isInterfaceType(fragmentType) && !graphql20.isUnionType(fragmentType)) {
60671
+ if (!graphql19.isInterfaceType(fragmentType) && !graphql19.isUnionType(fragmentType)) {
60881
60672
  if (!inlineFragments[fragmentType.name]) {
60882
60673
  inlineFragments[fragmentType.name] = [];
60883
60674
  }
@@ -60969,6 +60760,11 @@ function inlineType({
60969
60760
  if (allOptional) {
60970
60761
  prop.optional = true;
60971
60762
  }
60763
+ if (field2.description || field2.deprecationReason) {
60764
+ prop.comments = [
60765
+ jsdocComment(field2.description ?? "", field2.deprecationReason ?? void 0)
60766
+ ];
60767
+ }
60972
60768
  return prop;
60973
60769
  })
60974
60770
  ]);
@@ -61020,7 +60816,7 @@ function inlineType({
61020
60816
  }
61021
60817
  }
61022
60818
  }
61023
- if (objectType.type === "TSTypeLiteral" && !graphql20.isInterfaceType(fragmentRootType) && !graphql20.isUnionType(fragmentRootType)) {
60819
+ if (objectType.type === "TSTypeLiteral" && !graphql19.isInterfaceType(fragmentRootType) && !graphql19.isUnionType(fragmentRootType)) {
61024
60820
  const existingTypenameIndex = objectType.members.findIndex(
61025
60821
  (member) => member.type === "TSPropertySignature" && member.key.type === "Identifier" && member.key.name === "__typename"
61026
60822
  );
@@ -61045,11 +60841,11 @@ function inlineType({
61045
60841
  ];
61046
60842
  }
61047
60843
  let coveredTypenames;
61048
- if (graphql20.isInterfaceType(fragmentRootType)) {
60844
+ if (graphql19.isInterfaceType(fragmentRootType)) {
61049
60845
  coveredTypenames = interfaceCoveredTypenames(fragmentRootType);
61050
- } else if (graphql20.isUnionType(fragmentRootType)) {
60846
+ } else if (graphql19.isUnionType(fragmentRootType)) {
61051
60847
  coveredTypenames = fragmentRootType.getTypes().map((type2) => type2.name);
61052
- } else if (graphql20.isObjectType(fragmentRootType)) {
60848
+ } else if (graphql19.isObjectType(fragmentRootType)) {
61053
60849
  coveredTypenames = [fragmentRootType.name];
61054
60850
  } else {
61055
60851
  throw Error("unreachable code");
@@ -61085,7 +60881,7 @@ function inlineType({
61085
60881
  );
61086
60882
  }
61087
60883
  );
61088
- const parentIsUnionOrInterface = !graphql20.isInterfaceType(type) && !graphql20.isUnionType(type);
60884
+ const parentIsUnionOrInterface = !graphql19.isInterfaceType(type) && !graphql19.isUnionType(type);
61089
60885
  const possibleTypenames = parentIsUnionOrInterface ? [parent.name] : config.schema.getPossibleTypes(type).map((type2) => type2.name);
61090
60886
  const coveredTypenames = new Set(
61091
60887
  Object.values(inlineFragmentSelections).flatMap((sel) => sel.coveredTypenames)
@@ -61152,7 +60948,7 @@ function selectionTypeInfo(schema, filepath, rootType, selection) {
61152
60948
  },
61153
60949
  type: schema.getType("String")
61154
60950
  };
61155
- } else if (graphql20.isNonNullType(rootType) && "getFields" in rootType.ofType) {
60951
+ } else if (graphql19.isNonNullType(rootType) && "getFields" in rootType.ofType) {
61156
60952
  fields = rootType.ofType.getFields();
61157
60953
  } else {
61158
60954
  fields = rootType.getFields();
@@ -61164,7 +60960,7 @@ function selectionTypeInfo(schema, filepath, rootType, selection) {
61164
60960
  message: `Could not find type information for field ${rootType.toString()}.${selectionName} ${field}`
61165
60961
  });
61166
60962
  }
61167
- const fieldType = graphql20.getNamedType(field.type);
60963
+ const fieldType = graphql19.getNamedType(field.type);
61168
60964
  if (!fieldType) {
61169
60965
  throw new HoudiniError({
61170
60966
  filepath,
@@ -61672,7 +61468,7 @@ async function generateFragmentTypeDefs(config, filepath, body, selections, defi
61672
61468
  }
61673
61469
 
61674
61470
  // src/codegen/generators/typescript/imperativeTypeDef.ts
61675
- var graphql21 = __toESM(require("graphql"), 1);
61471
+ var graphql20 = __toESM(require("graphql"), 1);
61676
61472
  var recast12 = __toESM(require_main2(), 1);
61677
61473
  var AST12 = recast12.types.builders;
61678
61474
  async function imperativeCacheTypef(config, docs) {
@@ -61724,7 +61520,7 @@ function typeDefinitions(config, filepath, body, docs, returnType) {
61724
61520
  const operationTypes = [config.schema.getMutationType(), config.schema.getSubscriptionType()].filter(Boolean).map((type) => type?.name);
61725
61521
  const visitedTypes = /* @__PURE__ */ new Set();
61726
61522
  const types14 = Object.values(config.schema.getTypeMap()).filter(
61727
- (type) => !graphql21.isAbstractType(type) && !graphql21.isScalarType(type) && !graphql21.isEnumType(type) && !graphql21.isInputObjectType(type) && !type.name.startsWith("__") && !operationTypes.includes(type.name)
61523
+ (type) => !graphql20.isAbstractType(type) && !graphql20.isScalarType(type) && !graphql20.isEnumType(type) && !graphql20.isInputObjectType(type) && !type.name.startsWith("__") && !operationTypes.includes(type.name)
61728
61524
  );
61729
61525
  const fragmentMap = fragmentListMap(
61730
61526
  config,
@@ -61741,7 +61537,7 @@ function typeDefinitions(config, filepath, body, docs, returnType) {
61741
61537
  }
61742
61538
  let idFields = AST12.tsNeverKeyword();
61743
61539
  const keys2 = keyFieldsForType(config.configFile, type.name);
61744
- if (graphql21.isObjectType(type) && keys2.length > 0 && keys2.every((key) => type.getFields()[key])) {
61540
+ if (graphql20.isObjectType(type) && keys2.length > 0 && keys2.every((key) => type.getFields()[key])) {
61745
61541
  idFields = AST12.tsTypeLiteral(
61746
61542
  keys2.map((key) => {
61747
61543
  const fieldType = type.getFields()[key];
@@ -61768,13 +61564,13 @@ function typeDefinitions(config, filepath, body, docs, returnType) {
61768
61564
  idFields = AST12.tsTypeLiteral([]);
61769
61565
  }
61770
61566
  let fields = AST12.tsTypeLiteral([]);
61771
- if (graphql21.isObjectType(type)) {
61567
+ if (graphql20.isObjectType(type)) {
61772
61568
  fields = AST12.tsTypeLiteral(
61773
61569
  Object.entries(type.getFields()).map(
61774
61570
  ([key, fieldType]) => {
61775
61571
  const unwrapped = unwrapType(config, fieldType.type);
61776
61572
  let typeOptions = AST12.tsUnionType([]);
61777
- if (graphql21.isScalarType(unwrapped.type)) {
61573
+ if (graphql20.isScalarType(unwrapped.type)) {
61778
61574
  typeOptions.types.push(
61779
61575
  scalarPropertyValue(
61780
61576
  config,
@@ -61788,11 +61584,11 @@ function typeDefinitions(config, filepath, body, docs, returnType) {
61788
61584
  }
61789
61585
  )
61790
61586
  );
61791
- } else if (graphql21.isEnumType(unwrapped.type)) {
61587
+ } else if (graphql20.isEnumType(unwrapped.type)) {
61792
61588
  typeOptions.types.push(
61793
61589
  AST12.tsTypeReference(AST12.identifier(unwrapped.type.name))
61794
61590
  );
61795
- } else if (!graphql21.isAbstractType(unwrapped.type)) {
61591
+ } else if (!graphql20.isAbstractType(unwrapped.type)) {
61796
61592
  typeOptions.types.push(record(unwrapped.type.name));
61797
61593
  } else {
61798
61594
  typeOptions.types.push(
@@ -61888,7 +61684,7 @@ function listDefinitions(config, filepath, body, docs) {
61888
61684
  const lists = [];
61889
61685
  const visitedLists = /* @__PURE__ */ new Set();
61890
61686
  for (const doc of docs) {
61891
- graphql21.visit(doc.document, {
61687
+ graphql20.visit(doc.document, {
61892
61688
  Directive(node, key, parent2, path2, ancestors) {
61893
61689
  if (![config.listDirective, config.paginateDirective].includes(node.name.value)) {
61894
61690
  return;
@@ -61910,7 +61706,7 @@ function listDefinitions(config, filepath, body, docs) {
61910
61706
  const targetFieldDefinition = parentType.getFields()[targetField.name.value];
61911
61707
  const { type: listType } = unwrapType(config, targetFieldDefinition.type);
61912
61708
  const possibleTypes = [];
61913
- if (graphql21.isAbstractType(listType)) {
61709
+ if (graphql20.isAbstractType(listType)) {
61914
61710
  possibleTypes.push(
61915
61711
  ...config.schema.getPossibleTypes(listType).map((possible) => possible.name)
61916
61712
  );
@@ -62072,7 +61868,7 @@ async function typescriptGenerator(config, docs) {
62072
61868
  }
62073
61869
 
62074
61870
  // src/codegen/generators/persistedQueries/index.ts
62075
- var graphql22 = __toESM(require("graphql"), 1);
61871
+ var graphql21 = __toESM(require("graphql"), 1);
62076
61872
  async function persistOutputGenerator(config, docs) {
62077
61873
  if (!config.persistedQueriesPath.endsWith(".json")) {
62078
61874
  throw new Error('Can write Persisted Queries only in a ".json" file.');
@@ -62082,8 +61878,8 @@ async function persistOutputGenerator(config, docs) {
62082
61878
  if (!generateArtifact) {
62083
61879
  return acc;
62084
61880
  }
62085
- let rawString = graphql22.print(
62086
- graphql22.visit(document, {
61881
+ let rawString = graphql21.print(
61882
+ graphql21.visit(document, {
62087
61883
  Directive(node) {
62088
61884
  if (config.isInternalDirective(node.name.value)) {
62089
61885
  return null;
@@ -62092,7 +61888,7 @@ async function persistOutputGenerator(config, docs) {
62092
61888
  })
62093
61889
  );
62094
61890
  const operations = document.definitions.filter(
62095
- ({ kind }) => kind === graphql22.Kind.OPERATION_DEFINITION
61891
+ ({ kind }) => kind === graphql21.Kind.OPERATION_DEFINITION
62096
61892
  );
62097
61893
  if (operations.length > 0 && operations[0].kind === "OperationDefinition") {
62098
61894
  if (artifact) {
@@ -62107,33 +61903,45 @@ async function persistOutputGenerator(config, docs) {
62107
61903
  }
62108
61904
 
62109
61905
  // src/codegen/generators/definitions/index.ts
62110
- var graphql24 = __toESM(require("graphql"), 1);
61906
+ var graphql23 = __toESM(require("graphql"), 1);
62111
61907
 
62112
61908
  // src/codegen/generators/definitions/enums.ts
62113
- var graphql23 = __toESM(require("graphql"), 1);
61909
+ var graphql22 = __toESM(require("graphql"), 1);
62114
61910
  var recast13 = __toESM(require_main2(), 1);
62115
61911
  var AST13 = recast13.types.builders;
62116
61912
  async function definitionsGenerator(config) {
62117
- const enums = graphql23.parse(graphql23.printSchema(config.schema)).definitions.filter(
61913
+ const enums = graphql22.parse(graphql22.printSchema(config.schema)).definitions.filter(
62118
61914
  (definition) => definition.kind === "EnumTypeDefinition"
62119
61915
  ).filter((def) => !config.isInternalEnum(def));
62120
61916
  const { code: runtimeDefinitions } = await printJS(
62121
61917
  AST13.program(
62122
61918
  enums.map((defn) => {
62123
61919
  const name = defn.name.value;
62124
- return moduleExport(
61920
+ const declaration = moduleExport(
62125
61921
  config,
62126
61922
  name,
62127
61923
  AST13.objectExpression(
62128
61924
  defn.values?.map((value) => {
62129
61925
  const str = value.name.value;
62130
- return AST13.objectProperty(
61926
+ const prop = AST13.objectProperty(
62131
61927
  AST13.stringLiteral(str),
62132
61928
  AST13.stringLiteral(str)
62133
61929
  );
61930
+ const deprecationReason = value.directives?.find((d) => d.name.value === "deprecated")?.arguments?.find((a) => a.name.value === "reason")?.value?.value;
61931
+ if (value.description || deprecationReason)
61932
+ prop.comments = [
61933
+ jsdocComment(value.description?.value ?? "", deprecationReason)
61934
+ ];
61935
+ return prop;
62134
61936
  }) || []
62135
61937
  )
62136
61938
  );
61939
+ if (defn.description) {
61940
+ declaration.comments = [
61941
+ AST13.commentBlock(`* ${defn.description.value} `, true, false)
61942
+ ];
61943
+ }
61944
+ return declaration;
62137
61945
  })
62138
61946
  )
62139
61947
  );
@@ -62142,11 +61950,19 @@ type ValuesOf<T> = T[keyof T]
62142
61950
  ` + enums.sort((a, b) => a.name.value.localeCompare(b.name.value)).map((definition) => {
62143
61951
  const name = definition.name.value;
62144
61952
  const values = definition.values;
62145
- return `
61953
+ let jsdoc = "";
61954
+ if (definition.description) {
61955
+ jsdoc = `
61956
+ /** ${definition.description.value} */`;
61957
+ }
61958
+ return `${jsdoc}
62146
61959
  export declare const ${name}: {
62147
- ${values?.map((value) => ` readonly ${value.name.value}: "${value.name.value}";`).join("\n")}
61960
+ ${values?.map(
61961
+ (value) => (value.description ? ` /** ${value.description.value} */
61962
+ ` : "") + ` readonly ${value.name.value}: "${value.name.value}";`
61963
+ ).join("\n")}
62148
61964
  }
62149
-
61965
+ ${jsdoc}
62150
61966
  export type ${name}$options = ValuesOf<typeof ${name}>
62151
61967
  `;
62152
61968
  }).join("");
@@ -62166,7 +61982,7 @@ async function schemaGenerator(config) {
62166
61982
  await Promise.all([
62167
61983
  fs_exports.writeFile(
62168
61984
  config.definitionsSchemaPath,
62169
- config.localSchema ? graphql24.printSchema(config.schema) : config.newSchema
61985
+ config.localSchema ? graphql23.printSchema(config.schema) : config.newSchema
62170
61986
  ),
62171
61987
  fs_exports.writeFile(config.definitionsDocumentsPath, config.newDocuments),
62172
61988
  definitionsGenerator(config)
@@ -62211,7 +62027,7 @@ async function writeIndexFile2(config, docs) {
62211
62027
  }
62212
62028
 
62213
62029
  // ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/helpers.js
62214
- var import_graphql2 = require("graphql");
62030
+ var import_graphql3 = require("graphql");
62215
62031
  function compareStrings(a, b) {
62216
62032
  if (String(a) < String(b)) {
62217
62033
  return -1;
@@ -62247,7 +62063,7 @@ function isSome(input) {
62247
62063
  }
62248
62064
 
62249
62065
  // ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/inspect.js
62250
- var import_graphql3 = require("graphql");
62066
+ var import_graphql4 = require("graphql");
62251
62067
  var MAX_RECURSIVE_DEPTH = 3;
62252
62068
  function inspect(value) {
62253
62069
  return formatValue(value, []);
@@ -62265,7 +62081,7 @@ function formatValue(value, seenValues) {
62265
62081
  }
62266
62082
  }
62267
62083
  function formatError(value) {
62268
- if (value instanceof import_graphql3.GraphQLError) {
62084
+ if (value instanceof import_graphql4.GraphQLError) {
62269
62085
  return value.toString();
62270
62086
  }
62271
62087
  return `${value.name}: ${value.message};
@@ -62348,43 +62164,43 @@ function getDirectivesInExtensions(node, pathToDirectivesInExtensions = ["direct
62348
62164
  }
62349
62165
 
62350
62166
  // ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/print-schema-with-directives.js
62351
- var import_graphql7 = require("graphql");
62167
+ var import_graphql8 = require("graphql");
62352
62168
 
62353
62169
  // ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/astFromType.js
62354
- var import_graphql4 = require("graphql");
62170
+ var import_graphql5 = require("graphql");
62355
62171
  function astFromType(type) {
62356
- if ((0, import_graphql4.isNonNullType)(type)) {
62172
+ if ((0, import_graphql5.isNonNullType)(type)) {
62357
62173
  const innerType = astFromType(type.ofType);
62358
- if (innerType.kind === import_graphql4.Kind.NON_NULL_TYPE) {
62174
+ if (innerType.kind === import_graphql5.Kind.NON_NULL_TYPE) {
62359
62175
  throw new Error(`Invalid type node ${inspect(type)}. Inner type of non-null type cannot be a non-null type.`);
62360
62176
  }
62361
62177
  return {
62362
- kind: import_graphql4.Kind.NON_NULL_TYPE,
62178
+ kind: import_graphql5.Kind.NON_NULL_TYPE,
62363
62179
  type: innerType
62364
62180
  };
62365
- } else if ((0, import_graphql4.isListType)(type)) {
62181
+ } else if ((0, import_graphql5.isListType)(type)) {
62366
62182
  return {
62367
- kind: import_graphql4.Kind.LIST_TYPE,
62183
+ kind: import_graphql5.Kind.LIST_TYPE,
62368
62184
  type: astFromType(type.ofType)
62369
62185
  };
62370
62186
  }
62371
62187
  return {
62372
- kind: import_graphql4.Kind.NAMED_TYPE,
62188
+ kind: import_graphql5.Kind.NAMED_TYPE,
62373
62189
  name: {
62374
- kind: import_graphql4.Kind.NAME,
62190
+ kind: import_graphql5.Kind.NAME,
62375
62191
  value: type.name
62376
62192
  }
62377
62193
  };
62378
62194
  }
62379
62195
 
62380
62196
  // ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/astFromValue.js
62381
- var import_graphql6 = require("graphql");
62197
+ var import_graphql7 = require("graphql");
62382
62198
 
62383
62199
  // ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/astFromValueUntyped.js
62384
- var import_graphql5 = require("graphql");
62200
+ var import_graphql6 = require("graphql");
62385
62201
  function astFromValueUntyped(value) {
62386
62202
  if (value === null) {
62387
- return { kind: import_graphql5.Kind.NULL };
62203
+ return { kind: import_graphql6.Kind.NULL };
62388
62204
  }
62389
62205
  if (value === void 0) {
62390
62206
  return null;
@@ -62397,7 +62213,7 @@ function astFromValueUntyped(value) {
62397
62213
  valuesNodes.push(itemNode);
62398
62214
  }
62399
62215
  }
62400
- return { kind: import_graphql5.Kind.LIST, values: valuesNodes };
62216
+ return { kind: import_graphql6.Kind.LIST, values: valuesNodes };
62401
62217
  }
62402
62218
  if (typeof value === "object") {
62403
62219
  const fieldNodes = [];
@@ -62406,26 +62222,26 @@ function astFromValueUntyped(value) {
62406
62222
  const ast = astFromValueUntyped(fieldValue);
62407
62223
  if (ast) {
62408
62224
  fieldNodes.push({
62409
- kind: import_graphql5.Kind.OBJECT_FIELD,
62410
- name: { kind: import_graphql5.Kind.NAME, value: fieldName },
62225
+ kind: import_graphql6.Kind.OBJECT_FIELD,
62226
+ name: { kind: import_graphql6.Kind.NAME, value: fieldName },
62411
62227
  value: ast
62412
62228
  });
62413
62229
  }
62414
62230
  }
62415
- return { kind: import_graphql5.Kind.OBJECT, fields: fieldNodes };
62231
+ return { kind: import_graphql6.Kind.OBJECT, fields: fieldNodes };
62416
62232
  }
62417
62233
  if (typeof value === "boolean") {
62418
- return { kind: import_graphql5.Kind.BOOLEAN, value };
62234
+ return { kind: import_graphql6.Kind.BOOLEAN, value };
62419
62235
  }
62420
62236
  if (typeof value === "bigint") {
62421
- return { kind: import_graphql5.Kind.INT, value: String(value) };
62237
+ return { kind: import_graphql6.Kind.INT, value: String(value) };
62422
62238
  }
62423
62239
  if (typeof value === "number" && isFinite(value)) {
62424
62240
  const stringNum = String(value);
62425
- return integerStringRegExp.test(stringNum) ? { kind: import_graphql5.Kind.INT, value: stringNum } : { kind: import_graphql5.Kind.FLOAT, value: stringNum };
62241
+ return integerStringRegExp.test(stringNum) ? { kind: import_graphql6.Kind.INT, value: stringNum } : { kind: import_graphql6.Kind.FLOAT, value: stringNum };
62426
62242
  }
62427
62243
  if (typeof value === "string") {
62428
- return { kind: import_graphql5.Kind.STRING, value };
62244
+ return { kind: import_graphql6.Kind.STRING, value };
62429
62245
  }
62430
62246
  throw new TypeError(`Cannot convert value to AST: ${value}.`);
62431
62247
  }
@@ -62433,20 +62249,20 @@ var integerStringRegExp = /^-?(?:0|[1-9][0-9]*)$/;
62433
62249
 
62434
62250
  // ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/astFromValue.js
62435
62251
  function astFromValue(value, type) {
62436
- if ((0, import_graphql6.isNonNullType)(type)) {
62252
+ if ((0, import_graphql7.isNonNullType)(type)) {
62437
62253
  const astValue = astFromValue(value, type.ofType);
62438
- if (astValue?.kind === import_graphql6.Kind.NULL) {
62254
+ if (astValue?.kind === import_graphql7.Kind.NULL) {
62439
62255
  return null;
62440
62256
  }
62441
62257
  return astValue;
62442
62258
  }
62443
62259
  if (value === null) {
62444
- return { kind: import_graphql6.Kind.NULL };
62260
+ return { kind: import_graphql7.Kind.NULL };
62445
62261
  }
62446
62262
  if (value === void 0) {
62447
62263
  return null;
62448
62264
  }
62449
- if ((0, import_graphql6.isListType)(type)) {
62265
+ if ((0, import_graphql7.isListType)(type)) {
62450
62266
  const itemType = type.ofType;
62451
62267
  if (isIterableObject(value)) {
62452
62268
  const valuesNodes = [];
@@ -62456,11 +62272,11 @@ function astFromValue(value, type) {
62456
62272
  valuesNodes.push(itemNode);
62457
62273
  }
62458
62274
  }
62459
- return { kind: import_graphql6.Kind.LIST, values: valuesNodes };
62275
+ return { kind: import_graphql7.Kind.LIST, values: valuesNodes };
62460
62276
  }
62461
62277
  return astFromValue(value, itemType);
62462
62278
  }
62463
- if ((0, import_graphql6.isInputObjectType)(type)) {
62279
+ if ((0, import_graphql7.isInputObjectType)(type)) {
62464
62280
  if (!isObjectLike(value)) {
62465
62281
  return null;
62466
62282
  }
@@ -62469,24 +62285,24 @@ function astFromValue(value, type) {
62469
62285
  const fieldValue = astFromValue(value[field.name], field.type);
62470
62286
  if (fieldValue) {
62471
62287
  fieldNodes.push({
62472
- kind: import_graphql6.Kind.OBJECT_FIELD,
62473
- name: { kind: import_graphql6.Kind.NAME, value: field.name },
62288
+ kind: import_graphql7.Kind.OBJECT_FIELD,
62289
+ name: { kind: import_graphql7.Kind.NAME, value: field.name },
62474
62290
  value: fieldValue
62475
62291
  });
62476
62292
  }
62477
62293
  }
62478
- return { kind: import_graphql6.Kind.OBJECT, fields: fieldNodes };
62294
+ return { kind: import_graphql7.Kind.OBJECT, fields: fieldNodes };
62479
62295
  }
62480
- if ((0, import_graphql6.isLeafType)(type)) {
62296
+ if ((0, import_graphql7.isLeafType)(type)) {
62481
62297
  const serialized = type.serialize(value);
62482
62298
  if (serialized == null) {
62483
62299
  return null;
62484
62300
  }
62485
- if ((0, import_graphql6.isEnumType)(type)) {
62486
- return { kind: import_graphql6.Kind.ENUM, value: serialized };
62301
+ if ((0, import_graphql7.isEnumType)(type)) {
62302
+ return { kind: import_graphql7.Kind.ENUM, value: serialized };
62487
62303
  }
62488
62304
  if (type.name === "ID" && typeof serialized === "string" && integerStringRegExp2.test(serialized)) {
62489
- return { kind: import_graphql6.Kind.INT, value: serialized };
62305
+ return { kind: import_graphql7.Kind.INT, value: serialized };
62490
62306
  }
62491
62307
  return astFromValueUntyped(serialized);
62492
62308
  }
@@ -62542,36 +62358,36 @@ function getDocumentNodeFromSchema(schema, options = {}) {
62542
62358
  const definitions = schemaNode != null ? [schemaNode] : [];
62543
62359
  const directives = schema.getDirectives();
62544
62360
  for (const directive of directives) {
62545
- if ((0, import_graphql7.isSpecifiedDirective)(directive)) {
62361
+ if ((0, import_graphql8.isSpecifiedDirective)(directive)) {
62546
62362
  continue;
62547
62363
  }
62548
62364
  definitions.push(astFromDirective(directive, schema, pathToDirectivesInExtensions));
62549
62365
  }
62550
62366
  for (const typeName in typesMap) {
62551
62367
  const type = typesMap[typeName];
62552
- const isPredefinedScalar = (0, import_graphql7.isSpecifiedScalarType)(type);
62553
- const isIntrospection = (0, import_graphql7.isIntrospectionType)(type);
62368
+ const isPredefinedScalar = (0, import_graphql8.isSpecifiedScalarType)(type);
62369
+ const isIntrospection = (0, import_graphql8.isIntrospectionType)(type);
62554
62370
  if (isPredefinedScalar || isIntrospection) {
62555
62371
  continue;
62556
62372
  }
62557
- if ((0, import_graphql7.isObjectType)(type)) {
62373
+ if ((0, import_graphql8.isObjectType)(type)) {
62558
62374
  definitions.push(astFromObjectType(type, schema, pathToDirectivesInExtensions));
62559
- } else if ((0, import_graphql7.isInterfaceType)(type)) {
62375
+ } else if ((0, import_graphql8.isInterfaceType)(type)) {
62560
62376
  definitions.push(astFromInterfaceType(type, schema, pathToDirectivesInExtensions));
62561
- } else if ((0, import_graphql7.isUnionType)(type)) {
62377
+ } else if ((0, import_graphql8.isUnionType)(type)) {
62562
62378
  definitions.push(astFromUnionType(type, schema, pathToDirectivesInExtensions));
62563
- } else if ((0, import_graphql7.isInputObjectType)(type)) {
62379
+ } else if ((0, import_graphql8.isInputObjectType)(type)) {
62564
62380
  definitions.push(astFromInputObjectType(type, schema, pathToDirectivesInExtensions));
62565
- } else if ((0, import_graphql7.isEnumType)(type)) {
62381
+ } else if ((0, import_graphql8.isEnumType)(type)) {
62566
62382
  definitions.push(astFromEnumType(type, schema, pathToDirectivesInExtensions));
62567
- } else if ((0, import_graphql7.isScalarType)(type)) {
62383
+ } else if ((0, import_graphql8.isScalarType)(type)) {
62568
62384
  definitions.push(astFromScalarType(type, schema, pathToDirectivesInExtensions));
62569
62385
  } else {
62570
62386
  throw new Error(`Unknown type ${type}.`);
62571
62387
  }
62572
62388
  }
62573
62389
  return {
62574
- kind: import_graphql7.Kind.DOCUMENT,
62390
+ kind: import_graphql8.Kind.DOCUMENT,
62575
62391
  definitions
62576
62392
  };
62577
62393
  }
@@ -62606,7 +62422,7 @@ function astFromSchema(schema, pathToDirectivesInExtensions) {
62606
62422
  operationTypeDefinitionNode.type = rootTypeAST;
62607
62423
  } else {
62608
62424
  operationTypeMap.set(operationTypeNode, {
62609
- kind: import_graphql7.Kind.OPERATION_TYPE_DEFINITION,
62425
+ kind: import_graphql8.Kind.OPERATION_TYPE_DEFINITION,
62610
62426
  operation: operationTypeNode,
62611
62427
  type: rootTypeAST
62612
62428
  });
@@ -62619,12 +62435,12 @@ function astFromSchema(schema, pathToDirectivesInExtensions) {
62619
62435
  return null;
62620
62436
  }
62621
62437
  const schemaNode = {
62622
- kind: operationTypes != null ? import_graphql7.Kind.SCHEMA_DEFINITION : import_graphql7.Kind.SCHEMA_EXTENSION,
62438
+ kind: operationTypes != null ? import_graphql8.Kind.SCHEMA_DEFINITION : import_graphql8.Kind.SCHEMA_EXTENSION,
62623
62439
  operationTypes,
62624
62440
  directives
62625
62441
  };
62626
62442
  schemaNode.description = schema.astNode?.description ?? schema.description != null ? {
62627
- kind: import_graphql7.Kind.STRING,
62443
+ kind: import_graphql8.Kind.STRING,
62628
62444
  value: schema.description,
62629
62445
  block: true
62630
62446
  } : void 0;
@@ -62632,19 +62448,19 @@ function astFromSchema(schema, pathToDirectivesInExtensions) {
62632
62448
  }
62633
62449
  function astFromDirective(directive, schema, pathToDirectivesInExtensions) {
62634
62450
  return {
62635
- kind: import_graphql7.Kind.DIRECTIVE_DEFINITION,
62451
+ kind: import_graphql8.Kind.DIRECTIVE_DEFINITION,
62636
62452
  description: directive.astNode?.description ?? (directive.description ? {
62637
- kind: import_graphql7.Kind.STRING,
62453
+ kind: import_graphql8.Kind.STRING,
62638
62454
  value: directive.description
62639
62455
  } : void 0),
62640
62456
  name: {
62641
- kind: import_graphql7.Kind.NAME,
62457
+ kind: import_graphql8.Kind.NAME,
62642
62458
  value: directive.name
62643
62459
  },
62644
62460
  arguments: directive.args?.map((arg) => astFromArg(arg, schema, pathToDirectivesInExtensions)),
62645
62461
  repeatable: directive.isRepeatable,
62646
62462
  locations: directive.locations?.map((location) => ({
62647
- kind: import_graphql7.Kind.NAME,
62463
+ kind: import_graphql8.Kind.NAME,
62648
62464
  value: location
62649
62465
  })) || []
62650
62466
  };
@@ -62694,14 +62510,14 @@ function getDeprecatableDirectiveNodes(entity, schema, pathToDirectivesInExtensi
62694
62510
  }
62695
62511
  function astFromArg(arg, schema, pathToDirectivesInExtensions) {
62696
62512
  return {
62697
- kind: import_graphql7.Kind.INPUT_VALUE_DEFINITION,
62513
+ kind: import_graphql8.Kind.INPUT_VALUE_DEFINITION,
62698
62514
  description: arg.astNode?.description ?? (arg.description ? {
62699
- kind: import_graphql7.Kind.STRING,
62515
+ kind: import_graphql8.Kind.STRING,
62700
62516
  value: arg.description,
62701
62517
  block: true
62702
62518
  } : void 0),
62703
62519
  name: {
62704
- kind: import_graphql7.Kind.NAME,
62520
+ kind: import_graphql8.Kind.NAME,
62705
62521
  value: arg.name
62706
62522
  },
62707
62523
  type: astFromType(arg.type),
@@ -62711,14 +62527,14 @@ function astFromArg(arg, schema, pathToDirectivesInExtensions) {
62711
62527
  }
62712
62528
  function astFromObjectType(type, schema, pathToDirectivesInExtensions) {
62713
62529
  return {
62714
- kind: import_graphql7.Kind.OBJECT_TYPE_DEFINITION,
62530
+ kind: import_graphql8.Kind.OBJECT_TYPE_DEFINITION,
62715
62531
  description: type.astNode?.description ?? (type.description ? {
62716
- kind: import_graphql7.Kind.STRING,
62532
+ kind: import_graphql8.Kind.STRING,
62717
62533
  value: type.description,
62718
62534
  block: true
62719
62535
  } : void 0),
62720
62536
  name: {
62721
- kind: import_graphql7.Kind.NAME,
62537
+ kind: import_graphql8.Kind.NAME,
62722
62538
  value: type.name
62723
62539
  },
62724
62540
  fields: Object.values(type.getFields()).map((field) => astFromField(field, schema, pathToDirectivesInExtensions)),
@@ -62728,14 +62544,14 @@ function astFromObjectType(type, schema, pathToDirectivesInExtensions) {
62728
62544
  }
62729
62545
  function astFromInterfaceType(type, schema, pathToDirectivesInExtensions) {
62730
62546
  const node = {
62731
- kind: import_graphql7.Kind.INTERFACE_TYPE_DEFINITION,
62547
+ kind: import_graphql8.Kind.INTERFACE_TYPE_DEFINITION,
62732
62548
  description: type.astNode?.description ?? (type.description ? {
62733
- kind: import_graphql7.Kind.STRING,
62549
+ kind: import_graphql8.Kind.STRING,
62734
62550
  value: type.description,
62735
62551
  block: true
62736
62552
  } : void 0),
62737
62553
  name: {
62738
- kind: import_graphql7.Kind.NAME,
62554
+ kind: import_graphql8.Kind.NAME,
62739
62555
  value: type.name
62740
62556
  },
62741
62557
  fields: Object.values(type.getFields()).map((field) => astFromField(field, schema, pathToDirectivesInExtensions)),
@@ -62748,14 +62564,14 @@ function astFromInterfaceType(type, schema, pathToDirectivesInExtensions) {
62748
62564
  }
62749
62565
  function astFromUnionType(type, schema, pathToDirectivesInExtensions) {
62750
62566
  return {
62751
- kind: import_graphql7.Kind.UNION_TYPE_DEFINITION,
62567
+ kind: import_graphql8.Kind.UNION_TYPE_DEFINITION,
62752
62568
  description: type.astNode?.description ?? (type.description ? {
62753
- kind: import_graphql7.Kind.STRING,
62569
+ kind: import_graphql8.Kind.STRING,
62754
62570
  value: type.description,
62755
62571
  block: true
62756
62572
  } : void 0),
62757
62573
  name: {
62758
- kind: import_graphql7.Kind.NAME,
62574
+ kind: import_graphql8.Kind.NAME,
62759
62575
  value: type.name
62760
62576
  },
62761
62577
  directives: getDirectiveNodes(type, schema, pathToDirectivesInExtensions),
@@ -62764,14 +62580,14 @@ function astFromUnionType(type, schema, pathToDirectivesInExtensions) {
62764
62580
  }
62765
62581
  function astFromInputObjectType(type, schema, pathToDirectivesInExtensions) {
62766
62582
  return {
62767
- kind: import_graphql7.Kind.INPUT_OBJECT_TYPE_DEFINITION,
62583
+ kind: import_graphql8.Kind.INPUT_OBJECT_TYPE_DEFINITION,
62768
62584
  description: type.astNode?.description ?? (type.description ? {
62769
- kind: import_graphql7.Kind.STRING,
62585
+ kind: import_graphql8.Kind.STRING,
62770
62586
  value: type.description,
62771
62587
  block: true
62772
62588
  } : void 0),
62773
62589
  name: {
62774
- kind: import_graphql7.Kind.NAME,
62590
+ kind: import_graphql8.Kind.NAME,
62775
62591
  value: type.name
62776
62592
  },
62777
62593
  fields: Object.values(type.getFields()).map((field) => astFromInputField(field, schema, pathToDirectivesInExtensions)),
@@ -62780,14 +62596,14 @@ function astFromInputObjectType(type, schema, pathToDirectivesInExtensions) {
62780
62596
  }
62781
62597
  function astFromEnumType(type, schema, pathToDirectivesInExtensions) {
62782
62598
  return {
62783
- kind: import_graphql7.Kind.ENUM_TYPE_DEFINITION,
62599
+ kind: import_graphql8.Kind.ENUM_TYPE_DEFINITION,
62784
62600
  description: type.astNode?.description ?? (type.description ? {
62785
- kind: import_graphql7.Kind.STRING,
62601
+ kind: import_graphql8.Kind.STRING,
62786
62602
  value: type.description,
62787
62603
  block: true
62788
62604
  } : void 0),
62789
62605
  name: {
62790
- kind: import_graphql7.Kind.NAME,
62606
+ kind: import_graphql8.Kind.NAME,
62791
62607
  value: type.name
62792
62608
  },
62793
62609
  values: Object.values(type.getValues()).map((value) => astFromEnumValue(value, schema, pathToDirectivesInExtensions)),
@@ -62805,14 +62621,14 @@ function astFromScalarType(type, schema, pathToDirectivesInExtensions) {
62805
62621
  directives.push(makeDirectiveNode("specifiedBy", specifiedByArgs));
62806
62622
  }
62807
62623
  return {
62808
- kind: import_graphql7.Kind.SCALAR_TYPE_DEFINITION,
62624
+ kind: import_graphql8.Kind.SCALAR_TYPE_DEFINITION,
62809
62625
  description: type.astNode?.description ?? (type.description ? {
62810
- kind: import_graphql7.Kind.STRING,
62626
+ kind: import_graphql8.Kind.STRING,
62811
62627
  value: type.description,
62812
62628
  block: true
62813
62629
  } : void 0),
62814
62630
  name: {
62815
- kind: import_graphql7.Kind.NAME,
62631
+ kind: import_graphql8.Kind.NAME,
62816
62632
  value: type.name
62817
62633
  },
62818
62634
  directives
@@ -62820,14 +62636,14 @@ function astFromScalarType(type, schema, pathToDirectivesInExtensions) {
62820
62636
  }
62821
62637
  function astFromField(field, schema, pathToDirectivesInExtensions) {
62822
62638
  return {
62823
- kind: import_graphql7.Kind.FIELD_DEFINITION,
62639
+ kind: import_graphql8.Kind.FIELD_DEFINITION,
62824
62640
  description: field.astNode?.description ?? (field.description ? {
62825
- kind: import_graphql7.Kind.STRING,
62641
+ kind: import_graphql8.Kind.STRING,
62826
62642
  value: field.description,
62827
62643
  block: true
62828
62644
  } : void 0),
62829
62645
  name: {
62830
- kind: import_graphql7.Kind.NAME,
62646
+ kind: import_graphql8.Kind.NAME,
62831
62647
  value: field.name
62832
62648
  },
62833
62649
  arguments: field.args.map((arg) => astFromArg(arg, schema, pathToDirectivesInExtensions)),
@@ -62837,14 +62653,14 @@ function astFromField(field, schema, pathToDirectivesInExtensions) {
62837
62653
  }
62838
62654
  function astFromInputField(field, schema, pathToDirectivesInExtensions) {
62839
62655
  return {
62840
- kind: import_graphql7.Kind.INPUT_VALUE_DEFINITION,
62656
+ kind: import_graphql8.Kind.INPUT_VALUE_DEFINITION,
62841
62657
  description: field.astNode?.description ?? (field.description ? {
62842
- kind: import_graphql7.Kind.STRING,
62658
+ kind: import_graphql8.Kind.STRING,
62843
62659
  value: field.description,
62844
62660
  block: true
62845
62661
  } : void 0),
62846
62662
  name: {
62847
- kind: import_graphql7.Kind.NAME,
62663
+ kind: import_graphql8.Kind.NAME,
62848
62664
  value: field.name
62849
62665
  },
62850
62666
  type: astFromType(field.type),
@@ -62854,21 +62670,21 @@ function astFromInputField(field, schema, pathToDirectivesInExtensions) {
62854
62670
  }
62855
62671
  function astFromEnumValue(value, schema, pathToDirectivesInExtensions) {
62856
62672
  return {
62857
- kind: import_graphql7.Kind.ENUM_VALUE_DEFINITION,
62673
+ kind: import_graphql8.Kind.ENUM_VALUE_DEFINITION,
62858
62674
  description: value.astNode?.description ?? (value.description ? {
62859
- kind: import_graphql7.Kind.STRING,
62675
+ kind: import_graphql8.Kind.STRING,
62860
62676
  value: value.description,
62861
62677
  block: true
62862
62678
  } : void 0),
62863
62679
  name: {
62864
- kind: import_graphql7.Kind.NAME,
62680
+ kind: import_graphql8.Kind.NAME,
62865
62681
  value: value.name
62866
62682
  },
62867
62683
  directives: getDeprecatableDirectiveNodes(value, schema, pathToDirectivesInExtensions)
62868
62684
  };
62869
62685
  }
62870
62686
  function makeDeprecatedDirective(deprecationReason) {
62871
- return makeDirectiveNode("deprecated", { reason: deprecationReason }, import_graphql7.GraphQLDeprecatedDirective);
62687
+ return makeDirectiveNode("deprecated", { reason: deprecationReason }, import_graphql8.GraphQLDeprecatedDirective);
62872
62688
  }
62873
62689
  function makeDirectiveNode(name, args, directive) {
62874
62690
  const directiveArguments = [];
@@ -62880,9 +62696,9 @@ function makeDirectiveNode(name, args, directive) {
62880
62696
  const value = astFromValue(argValue, arg.type);
62881
62697
  if (value) {
62882
62698
  directiveArguments.push({
62883
- kind: import_graphql7.Kind.ARGUMENT,
62699
+ kind: import_graphql8.Kind.ARGUMENT,
62884
62700
  name: {
62885
- kind: import_graphql7.Kind.NAME,
62701
+ kind: import_graphql8.Kind.NAME,
62886
62702
  value: argName
62887
62703
  },
62888
62704
  value
@@ -62896,9 +62712,9 @@ function makeDirectiveNode(name, args, directive) {
62896
62712
  const value = astFromValueUntyped(argValue);
62897
62713
  if (value) {
62898
62714
  directiveArguments.push({
62899
- kind: import_graphql7.Kind.ARGUMENT,
62715
+ kind: import_graphql8.Kind.ARGUMENT,
62900
62716
  name: {
62901
- kind: import_graphql7.Kind.NAME,
62717
+ kind: import_graphql8.Kind.NAME,
62902
62718
  value: argName
62903
62719
  },
62904
62720
  value
@@ -62907,9 +62723,9 @@ function makeDirectiveNode(name, args, directive) {
62907
62723
  }
62908
62724
  }
62909
62725
  return {
62910
- kind: import_graphql7.Kind.DIRECTIVE,
62726
+ kind: import_graphql8.Kind.DIRECTIVE,
62911
62727
  name: {
62912
- kind: import_graphql7.Kind.NAME,
62728
+ kind: import_graphql8.Kind.NAME,
62913
62729
  value: name
62914
62730
  },
62915
62731
  arguments: directiveArguments
@@ -62932,7 +62748,7 @@ function makeDirectiveNodes(schema, directiveValues) {
62932
62748
  }
62933
62749
 
62934
62750
  // ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/comments.js
62935
- var import_graphql8 = require("graphql");
62751
+ var import_graphql9 = require("graphql");
62936
62752
  var MAX_LINE_LENGTH = 80;
62937
62753
  var commentsRegistry = {};
62938
62754
  function resetComments() {
@@ -63177,7 +62993,7 @@ var printDocASTReducerWithComments = Object.keys(printDocASTReducer).reduce((pre
63177
62993
  }
63178
62994
  }), {});
63179
62995
  function printWithComments(ast) {
63180
- return (0, import_graphql8.visit)(ast, printDocASTReducerWithComments);
62996
+ return (0, import_graphql9.visit)(ast, printDocASTReducerWithComments);
63181
62997
  }
63182
62998
  function isFieldDefinitionNode(node) {
63183
62999
  return node.kind === "FieldDefinition";
@@ -63196,7 +63012,7 @@ function getLeadingCommentBlock(node) {
63196
63012
  }
63197
63013
  const comments = [];
63198
63014
  let token = loc.startToken.prev;
63199
- 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) {
63015
+ 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) {
63200
63016
  const value = String(token.value);
63201
63017
  comments.push(value);
63202
63018
  token = token.prev;
@@ -63248,9 +63064,9 @@ function isBlank(str) {
63248
63064
  }
63249
63065
 
63250
63066
  // ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/isDocumentNode.js
63251
- var import_graphql9 = require("graphql");
63067
+ var import_graphql10 = require("graphql");
63252
63068
  function isDocumentNode(object) {
63253
- return object && typeof object === "object" && "kind" in object && object.kind === import_graphql9.Kind.DOCUMENT;
63069
+ return object && typeof object === "object" && "kind" in object && object.kind === import_graphql10.Kind.DOCUMENT;
63254
63070
  }
63255
63071
 
63256
63072
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/arguments.js
@@ -63274,7 +63090,7 @@ function deduplicateArguments(args, config) {
63274
63090
  }
63275
63091
 
63276
63092
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/directives.js
63277
- var import_graphql10 = require("graphql");
63093
+ var import_graphql11 = require("graphql");
63278
63094
  function directiveAlreadyExists(directivesArr, otherDirective) {
63279
63095
  return !!directivesArr.find((directive) => directive.name.value === otherDirective.name.value);
63280
63096
  }
@@ -63334,11 +63150,11 @@ function mergeDirectives(d1 = [], d2 = [], config, directives) {
63334
63150
  return result;
63335
63151
  }
63336
63152
  function validateInputs(node, existingNode) {
63337
- const printedNode = (0, import_graphql10.print)({
63153
+ const printedNode = (0, import_graphql11.print)({
63338
63154
  ...node,
63339
63155
  description: void 0
63340
63156
  });
63341
- const printedExistingNode = (0, import_graphql10.print)({
63157
+ const printedExistingNode = (0, import_graphql11.print)({
63342
63158
  ...existingNode,
63343
63159
  description: void 0
63344
63160
  });
@@ -63405,7 +63221,7 @@ function mergeEnumValues(first, second, config, directives) {
63405
63221
  }
63406
63222
 
63407
63223
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/enum.js
63408
- var import_graphql11 = require("graphql");
63224
+ var import_graphql12 = require("graphql");
63409
63225
  function mergeEnum(e1, e2, config, directives) {
63410
63226
  if (e2) {
63411
63227
  return {
@@ -63419,33 +63235,33 @@ function mergeEnum(e1, e2, config, directives) {
63419
63235
  }
63420
63236
  return config?.convertExtensions ? {
63421
63237
  ...e1,
63422
- kind: import_graphql11.Kind.ENUM_TYPE_DEFINITION
63238
+ kind: import_graphql12.Kind.ENUM_TYPE_DEFINITION
63423
63239
  } : e1;
63424
63240
  }
63425
63241
 
63426
63242
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/utils.js
63427
- var import_graphql12 = require("graphql");
63243
+ var import_graphql13 = require("graphql");
63428
63244
  function isStringTypes(types14) {
63429
63245
  return typeof types14 === "string";
63430
63246
  }
63431
63247
  function isSourceTypes(types14) {
63432
- return types14 instanceof import_graphql12.Source;
63248
+ return types14 instanceof import_graphql13.Source;
63433
63249
  }
63434
63250
  function extractType(type) {
63435
63251
  let visitedType = type;
63436
- while (visitedType.kind === import_graphql12.Kind.LIST_TYPE || visitedType.kind === "NonNullType") {
63252
+ while (visitedType.kind === import_graphql13.Kind.LIST_TYPE || visitedType.kind === "NonNullType") {
63437
63253
  visitedType = visitedType.type;
63438
63254
  }
63439
63255
  return visitedType;
63440
63256
  }
63441
63257
  function isWrappingTypeNode(type) {
63442
- return type.kind !== import_graphql12.Kind.NAMED_TYPE;
63258
+ return type.kind !== import_graphql13.Kind.NAMED_TYPE;
63443
63259
  }
63444
63260
  function isListTypeNode(type) {
63445
- return type.kind === import_graphql12.Kind.LIST_TYPE;
63261
+ return type.kind === import_graphql13.Kind.LIST_TYPE;
63446
63262
  }
63447
63263
  function isNonNullTypeNode(type) {
63448
- return type.kind === import_graphql12.Kind.NON_NULL_TYPE;
63264
+ return type.kind === import_graphql13.Kind.NON_NULL_TYPE;
63449
63265
  }
63450
63266
  function printTypeNode(type) {
63451
63267
  if (isListTypeNode(type)) {
@@ -63548,7 +63364,7 @@ function safeChangeForFieldType(oldType, newType, ignoreNullability = false) {
63548
63364
  }
63549
63365
 
63550
63366
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/input-type.js
63551
- var import_graphql13 = require("graphql");
63367
+ var import_graphql14 = require("graphql");
63552
63368
  function mergeInputType(node, existingNode, config, directives) {
63553
63369
  if (existingNode) {
63554
63370
  try {
@@ -63566,12 +63382,12 @@ function mergeInputType(node, existingNode, config, directives) {
63566
63382
  }
63567
63383
  return config?.convertExtensions ? {
63568
63384
  ...node,
63569
- kind: import_graphql13.Kind.INPUT_OBJECT_TYPE_DEFINITION
63385
+ kind: import_graphql14.Kind.INPUT_OBJECT_TYPE_DEFINITION
63570
63386
  } : node;
63571
63387
  }
63572
63388
 
63573
63389
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/interface.js
63574
- var import_graphql14 = require("graphql");
63390
+ var import_graphql15 = require("graphql");
63575
63391
 
63576
63392
  // ../../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
63577
63393
  function alreadyExists(arr, other) {
@@ -63604,15 +63420,15 @@ function mergeInterface(node, existingNode, config, directives) {
63604
63420
  }
63605
63421
  return config?.convertExtensions ? {
63606
63422
  ...node,
63607
- kind: import_graphql14.Kind.INTERFACE_TYPE_DEFINITION
63423
+ kind: import_graphql15.Kind.INTERFACE_TYPE_DEFINITION
63608
63424
  } : node;
63609
63425
  }
63610
63426
 
63611
63427
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/merge-nodes.js
63612
- var import_graphql19 = require("graphql");
63428
+ var import_graphql20 = require("graphql");
63613
63429
 
63614
63430
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/type.js
63615
- var import_graphql15 = require("graphql");
63431
+ var import_graphql16 = require("graphql");
63616
63432
  function mergeType(node, existingNode, config, directives) {
63617
63433
  if (existingNode) {
63618
63434
  try {
@@ -63631,12 +63447,12 @@ function mergeType(node, existingNode, config, directives) {
63631
63447
  }
63632
63448
  return config?.convertExtensions ? {
63633
63449
  ...node,
63634
- kind: import_graphql15.Kind.OBJECT_TYPE_DEFINITION
63450
+ kind: import_graphql16.Kind.OBJECT_TYPE_DEFINITION
63635
63451
  } : node;
63636
63452
  }
63637
63453
 
63638
63454
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/scalar.js
63639
- var import_graphql16 = require("graphql");
63455
+ var import_graphql17 = require("graphql");
63640
63456
  function mergeScalar(node, existingNode, config, directives) {
63641
63457
  if (existingNode) {
63642
63458
  return {
@@ -63649,31 +63465,31 @@ function mergeScalar(node, existingNode, config, directives) {
63649
63465
  }
63650
63466
  return config?.convertExtensions ? {
63651
63467
  ...node,
63652
- kind: import_graphql16.Kind.SCALAR_TYPE_DEFINITION
63468
+ kind: import_graphql17.Kind.SCALAR_TYPE_DEFINITION
63653
63469
  } : node;
63654
63470
  }
63655
63471
 
63656
63472
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/union.js
63657
- var import_graphql17 = require("graphql");
63473
+ var import_graphql18 = require("graphql");
63658
63474
  function mergeUnion(first, second, config, directives) {
63659
63475
  if (second) {
63660
63476
  return {
63661
63477
  name: first.name,
63662
63478
  description: first["description"] || second["description"],
63663
63479
  directives: mergeDirectives(first.directives, second.directives, config, directives),
63664
- kind: config?.convertExtensions || first.kind === "UnionTypeDefinition" || second.kind === "UnionTypeDefinition" ? import_graphql17.Kind.UNION_TYPE_DEFINITION : import_graphql17.Kind.UNION_TYPE_EXTENSION,
63480
+ kind: config?.convertExtensions || first.kind === "UnionTypeDefinition" || second.kind === "UnionTypeDefinition" ? import_graphql18.Kind.UNION_TYPE_DEFINITION : import_graphql18.Kind.UNION_TYPE_EXTENSION,
63665
63481
  loc: first.loc,
63666
63482
  types: mergeNamedTypeArray(first.types, second.types, config)
63667
63483
  };
63668
63484
  }
63669
63485
  return config?.convertExtensions ? {
63670
63486
  ...first,
63671
- kind: import_graphql17.Kind.UNION_TYPE_DEFINITION
63487
+ kind: import_graphql18.Kind.UNION_TYPE_DEFINITION
63672
63488
  } : first;
63673
63489
  }
63674
63490
 
63675
63491
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/schema-def.js
63676
- var import_graphql18 = require("graphql");
63492
+ var import_graphql19 = require("graphql");
63677
63493
  var DEFAULT_OPERATION_TYPE_NAME_MAP = {
63678
63494
  query: "Query",
63679
63495
  mutation: "Mutation",
@@ -63692,7 +63508,7 @@ function mergeOperationTypes(opNodeList = [], existingOpNodeList = []) {
63692
63508
  function mergeSchemaDefs(node, existingNode, config, directives) {
63693
63509
  if (existingNode) {
63694
63510
  return {
63695
- 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,
63511
+ 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,
63696
63512
  description: node["description"] || existingNode["description"],
63697
63513
  directives: mergeDirectives(node.directives, existingNode.directives, config, directives),
63698
63514
  operationTypes: mergeOperationTypes(node.operationTypes, existingNode.operationTypes)
@@ -63700,7 +63516,7 @@ function mergeSchemaDefs(node, existingNode, config, directives) {
63700
63516
  }
63701
63517
  return config?.convertExtensions ? {
63702
63518
  ...node,
63703
- kind: import_graphql18.Kind.SCHEMA_DEFINITION
63519
+ kind: import_graphql19.Kind.SCHEMA_DEFINITION
63704
63520
  } : node;
63705
63521
  }
63706
63522
 
@@ -63724,36 +63540,36 @@ function mergeGraphQLNodes(nodes, config, directives = {}) {
63724
63540
  delete mergedResultMap[name];
63725
63541
  } else {
63726
63542
  switch (nodeDefinition.kind) {
63727
- case import_graphql19.Kind.OBJECT_TYPE_DEFINITION:
63728
- case import_graphql19.Kind.OBJECT_TYPE_EXTENSION:
63543
+ case import_graphql20.Kind.OBJECT_TYPE_DEFINITION:
63544
+ case import_graphql20.Kind.OBJECT_TYPE_EXTENSION:
63729
63545
  mergedResultMap[name] = mergeType(nodeDefinition, mergedResultMap[name], config, directives);
63730
63546
  break;
63731
- case import_graphql19.Kind.ENUM_TYPE_DEFINITION:
63732
- case import_graphql19.Kind.ENUM_TYPE_EXTENSION:
63547
+ case import_graphql20.Kind.ENUM_TYPE_DEFINITION:
63548
+ case import_graphql20.Kind.ENUM_TYPE_EXTENSION:
63733
63549
  mergedResultMap[name] = mergeEnum(nodeDefinition, mergedResultMap[name], config, directives);
63734
63550
  break;
63735
- case import_graphql19.Kind.UNION_TYPE_DEFINITION:
63736
- case import_graphql19.Kind.UNION_TYPE_EXTENSION:
63551
+ case import_graphql20.Kind.UNION_TYPE_DEFINITION:
63552
+ case import_graphql20.Kind.UNION_TYPE_EXTENSION:
63737
63553
  mergedResultMap[name] = mergeUnion(nodeDefinition, mergedResultMap[name], config, directives);
63738
63554
  break;
63739
- case import_graphql19.Kind.SCALAR_TYPE_DEFINITION:
63740
- case import_graphql19.Kind.SCALAR_TYPE_EXTENSION:
63555
+ case import_graphql20.Kind.SCALAR_TYPE_DEFINITION:
63556
+ case import_graphql20.Kind.SCALAR_TYPE_EXTENSION:
63741
63557
  mergedResultMap[name] = mergeScalar(nodeDefinition, mergedResultMap[name], config, directives);
63742
63558
  break;
63743
- case import_graphql19.Kind.INPUT_OBJECT_TYPE_DEFINITION:
63744
- case import_graphql19.Kind.INPUT_OBJECT_TYPE_EXTENSION:
63559
+ case import_graphql20.Kind.INPUT_OBJECT_TYPE_DEFINITION:
63560
+ case import_graphql20.Kind.INPUT_OBJECT_TYPE_EXTENSION:
63745
63561
  mergedResultMap[name] = mergeInputType(nodeDefinition, mergedResultMap[name], config, directives);
63746
63562
  break;
63747
- case import_graphql19.Kind.INTERFACE_TYPE_DEFINITION:
63748
- case import_graphql19.Kind.INTERFACE_TYPE_EXTENSION:
63563
+ case import_graphql20.Kind.INTERFACE_TYPE_DEFINITION:
63564
+ case import_graphql20.Kind.INTERFACE_TYPE_EXTENSION:
63749
63565
  mergedResultMap[name] = mergeInterface(nodeDefinition, mergedResultMap[name], config, directives);
63750
63566
  break;
63751
- case import_graphql19.Kind.DIRECTIVE_DEFINITION:
63567
+ case import_graphql20.Kind.DIRECTIVE_DEFINITION:
63752
63568
  mergedResultMap[name] = mergeDirective(nodeDefinition, mergedResultMap[name]);
63753
63569
  break;
63754
63570
  }
63755
63571
  }
63756
- } else if (nodeDefinition.kind === import_graphql19.Kind.SCHEMA_DEFINITION || nodeDefinition.kind === import_graphql19.Kind.SCHEMA_EXTENSION) {
63572
+ } else if (nodeDefinition.kind === import_graphql20.Kind.SCHEMA_DEFINITION || nodeDefinition.kind === import_graphql20.Kind.SCHEMA_EXTENSION) {
63757
63573
  mergedResultMap[schemaDefSymbol] = mergeSchemaDefs(nodeDefinition, mergedResultMap[schemaDefSymbol], config);
63758
63574
  }
63759
63575
  }
@@ -63761,11 +63577,11 @@ function mergeGraphQLNodes(nodes, config, directives = {}) {
63761
63577
  }
63762
63578
 
63763
63579
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/merge-typedefs.js
63764
- var import_graphql20 = require("graphql");
63580
+ var import_graphql21 = require("graphql");
63765
63581
  function mergeTypeDefs(typeSource, config) {
63766
63582
  resetComments();
63767
63583
  const doc = {
63768
- kind: import_graphql20.Kind.DOCUMENT,
63584
+ kind: import_graphql21.Kind.DOCUMENT,
63769
63585
  definitions: mergeGraphQLTypes(typeSource, {
63770
63586
  useSchemaDefinition: true,
63771
63587
  forceSchemaDefinition: false,
@@ -63792,14 +63608,14 @@ function visitTypeSources(typeSource, options, allDirectives = [], allNodes = []
63792
63608
  for (const type of typeSource) {
63793
63609
  visitTypeSources(type, options, allDirectives, allNodes, visitedTypeSources);
63794
63610
  }
63795
- } else if ((0, import_graphql20.isSchema)(typeSource)) {
63611
+ } else if ((0, import_graphql21.isSchema)(typeSource)) {
63796
63612
  const documentNode = getDocumentNodeFromSchema(typeSource, options);
63797
63613
  visitTypeSources(documentNode.definitions, options, allDirectives, allNodes, visitedTypeSources);
63798
63614
  } else if (isStringTypes(typeSource) || isSourceTypes(typeSource)) {
63799
- const documentNode = (0, import_graphql20.parse)(typeSource, options);
63615
+ const documentNode = (0, import_graphql21.parse)(typeSource, options);
63800
63616
  visitTypeSources(documentNode.definitions, options, allDirectives, allNodes, visitedTypeSources);
63801
- } else if (typeof typeSource === "object" && (0, import_graphql20.isDefinitionNode)(typeSource)) {
63802
- if (typeSource.kind === import_graphql20.Kind.DIRECTIVE_DEFINITION) {
63617
+ } else if (typeof typeSource === "object" && (0, import_graphql21.isDefinitionNode)(typeSource)) {
63618
+ if (typeSource.kind === import_graphql21.Kind.DIRECTIVE_DEFINITION) {
63803
63619
  allDirectives.push(typeSource);
63804
63620
  } else {
63805
63621
  allNodes.push(typeSource);
@@ -63819,7 +63635,7 @@ function mergeGraphQLTypes(typeSource, config) {
63819
63635
  const mergedNodes = mergeGraphQLNodes(allNodes, config, mergedDirectives);
63820
63636
  if (config?.useSchemaDefinition) {
63821
63637
  const schemaDef = mergedNodes[schemaDefSymbol] || {
63822
- kind: import_graphql20.Kind.SCHEMA_DEFINITION,
63638
+ kind: import_graphql21.Kind.SCHEMA_DEFINITION,
63823
63639
  operationTypes: []
63824
63640
  };
63825
63641
  const operationTypes = schemaDef.operationTypes;
@@ -63830,9 +63646,9 @@ function mergeGraphQLTypes(typeSource, config) {
63830
63646
  const existingPossibleRootType = mergedNodes[possibleRootTypeName];
63831
63647
  if (existingPossibleRootType != null && existingPossibleRootType.name != null) {
63832
63648
  operationTypes.push({
63833
- kind: import_graphql20.Kind.OPERATION_TYPE_DEFINITION,
63649
+ kind: import_graphql21.Kind.OPERATION_TYPE_DEFINITION,
63834
63650
  type: {
63835
- kind: import_graphql20.Kind.NAMED_TYPE,
63651
+ kind: import_graphql21.Kind.NAMED_TYPE,
63836
63652
  name: existingPossibleRootType.name
63837
63653
  },
63838
63654
  operation: opTypeDefNodeType
@@ -63846,15 +63662,15 @@ function mergeGraphQLTypes(typeSource, config) {
63846
63662
  }
63847
63663
  if (config?.forceSchemaDefinition && !mergedNodes[schemaDefSymbol]?.operationTypes?.length) {
63848
63664
  mergedNodes[schemaDefSymbol] = {
63849
- kind: import_graphql20.Kind.SCHEMA_DEFINITION,
63665
+ kind: import_graphql21.Kind.SCHEMA_DEFINITION,
63850
63666
  operationTypes: [
63851
63667
  {
63852
- kind: import_graphql20.Kind.OPERATION_TYPE_DEFINITION,
63668
+ kind: import_graphql21.Kind.OPERATION_TYPE_DEFINITION,
63853
63669
  operation: "query",
63854
63670
  type: {
63855
- kind: import_graphql20.Kind.NAMED_TYPE,
63671
+ kind: import_graphql21.Kind.NAMED_TYPE,
63856
63672
  name: {
63857
- kind: import_graphql20.Kind.NAME,
63673
+ kind: import_graphql21.Kind.NAME,
63858
63674
  value: "Query"
63859
63675
  }
63860
63676
  }
@@ -63871,7 +63687,7 @@ function mergeGraphQLTypes(typeSource, config) {
63871
63687
  }
63872
63688
 
63873
63689
  // src/codegen/transforms/schema.ts
63874
- var graphql25 = __toESM(require("graphql"), 1);
63690
+ var graphql24 = __toESM(require("graphql"), 1);
63875
63691
  async function graphqlExtensions(config, documents) {
63876
63692
  let internalSchema = `
63877
63693
  enum CachePolicy {
@@ -63994,7 +63810,7 @@ directive @${config.componentFieldDirective}(field: String!, prop: String, expor
63994
63810
  const args = fragmentArguments(config, "", field.parent);
63995
63811
  if (args.length > 0) {
63996
63812
  argString = "(" + args.map((arg) => {
63997
- const typeName = graphql25.print(arg.type);
63813
+ const typeName = graphql24.print(arg.type);
63998
63814
  return `${arg.name}:${typeName}${arg.required ? "!" : ""}`;
63999
63815
  }).join("\n") + ")";
64000
63816
  }
@@ -64004,20 +63820,20 @@ directive @${config.componentFieldDirective}(field: String!, prop: String, expor
64004
63820
  `;
64005
63821
  }).join("\n");
64006
63822
  extensions += `${Object.keys(config.configFile.features?.runtimeScalars ?? {}).map((scalar) => `scalar ${scalar}`).join("\n")}`;
64007
- config.newSchema = graphql25.print(mergeTypeDefs([internalSchema, config.newSchema]));
63823
+ config.newSchema = graphql24.print(mergeTypeDefs([internalSchema, config.newSchema]));
64008
63824
  config.schemaString += extensions;
64009
- config.schema = graphql25.buildSchema(
64010
- graphql25.print(
64011
- mergeTypeDefs([graphql25.printSchema(config.schema), internalSchema, extensions])
63825
+ config.schema = graphql24.buildSchema(
63826
+ graphql24.print(
63827
+ mergeTypeDefs([graphql24.printSchema(config.schema), internalSchema, extensions])
64012
63828
  )
64013
63829
  );
64014
63830
  }
64015
63831
 
64016
63832
  // src/codegen/transforms/typename.ts
64017
- var graphql26 = __toESM(require("graphql"), 1);
63833
+ var graphql25 = __toESM(require("graphql"), 1);
64018
63834
  async function addTypename(config, documents) {
64019
63835
  for (const doc of documents) {
64020
- doc.document = graphql26.visit(doc.document, {
63836
+ doc.document = graphql25.visit(doc.document, {
64021
63837
  Field(node, key, parent2, path2, ancestors) {
64022
63838
  if (!node.selectionSet) {
64023
63839
  return;
@@ -64029,7 +63845,7 @@ async function addTypename(config, documents) {
64029
63845
  );
64030
63846
  const field = type.getFields()[node.name.value];
64031
63847
  const fieldType = unwrapType(config, field.type).type;
64032
- if (graphql26.isInterfaceType(fieldType) || graphql26.isUnionType(fieldType)) {
63848
+ if (graphql25.isInterfaceType(fieldType) || graphql25.isUnionType(fieldType)) {
64033
63849
  return {
64034
63850
  ...node,
64035
63851
  selectionSet: {
@@ -64037,9 +63853,9 @@ async function addTypename(config, documents) {
64037
63853
  selections: [
64038
63854
  ...node.selectionSet.selections,
64039
63855
  {
64040
- kind: graphql26.Kind.FIELD,
63856
+ kind: graphql25.Kind.FIELD,
64041
63857
  name: {
64042
- kind: graphql26.Kind.NAME,
63858
+ kind: graphql25.Kind.NAME,
64043
63859
  value: "__typename"
64044
63860
  }
64045
63861
  }
@@ -64056,9 +63872,9 @@ async function addTypename(config, documents) {
64056
63872
  selections: [
64057
63873
  ...node.selectionSet.selections,
64058
63874
  {
64059
- kind: graphql26.Kind.FIELD,
63875
+ kind: graphql25.Kind.FIELD,
64060
63876
  name: {
64061
- kind: graphql26.Kind.NAME,
63877
+ kind: graphql25.Kind.NAME,
64062
63878
  value: "__typename"
64063
63879
  }
64064
63880
  }
@@ -64071,10 +63887,10 @@ async function addTypename(config, documents) {
64071
63887
  }
64072
63888
 
64073
63889
  // src/codegen/transforms/addID.ts
64074
- var graphql27 = __toESM(require("graphql"), 1);
63890
+ var graphql26 = __toESM(require("graphql"), 1);
64075
63891
  async function addID(config, documents) {
64076
63892
  for (const doc of documents) {
64077
- doc.document = graphql27.visit(doc.document, {
63893
+ doc.document = graphql26.visit(doc.document, {
64078
63894
  Field(node, key, parent2, path2, ancestors) {
64079
63895
  if (!node.selectionSet) {
64080
63896
  return;
@@ -64112,7 +63928,7 @@ function addKeysToSelection(config, node, fieldType) {
64112
63928
  if (!node.selectionSet || node.selectionSet.selections.length == 0) {
64113
63929
  return;
64114
63930
  }
64115
- if (!graphql27.isObjectType(fieldType) && !graphql27.isInterfaceType(fieldType)) {
63931
+ if (!graphql26.isObjectType(fieldType) && !graphql26.isInterfaceType(fieldType)) {
64116
63932
  return;
64117
63933
  }
64118
63934
  const keyFields = config.keyFieldsForType(fieldType.name);
@@ -64127,9 +63943,9 @@ function addKeysToSelection(config, node, fieldType) {
64127
63943
  continue;
64128
63944
  }
64129
63945
  selections.push({
64130
- kind: graphql27.Kind.FIELD,
63946
+ kind: graphql26.Kind.FIELD,
64131
63947
  name: {
64132
- kind: graphql27.Kind.NAME,
63948
+ kind: graphql26.Kind.NAME,
64133
63949
  value: keyField
64134
63950
  }
64135
63951
  });
@@ -64144,13 +63960,13 @@ function addKeysToSelection(config, node, fieldType) {
64144
63960
  }
64145
63961
 
64146
63962
  // src/codegen/transforms/componentFields.ts
64147
- var graphql28 = __toESM(require("graphql"), 1);
63963
+ var graphql27 = __toESM(require("graphql"), 1);
64148
63964
  async function componentFields(config, documents) {
64149
63965
  for (const document of documents) {
64150
- const typeInfo = new graphql28.TypeInfo(config.schema);
64151
- document.document = graphql28.visit(
63966
+ const typeInfo = new graphql27.TypeInfo(config.schema);
63967
+ document.document = graphql27.visit(
64152
63968
  document.document,
64153
- graphql28.visitWithTypeInfo(typeInfo, {
63969
+ graphql27.visitWithTypeInfo(typeInfo, {
64154
63970
  Field(node) {
64155
63971
  const parentType = typeInfo.getParentType();
64156
63972
  if (!parentType) {
@@ -64199,10 +64015,10 @@ async function componentFields(config, documents) {
64199
64015
  }
64200
64016
 
64201
64017
  // src/codegen/transforms/runtimeScalars.ts
64202
- var graphql29 = __toESM(require("graphql"), 1);
64018
+ var graphql28 = __toESM(require("graphql"), 1);
64203
64019
  async function addTypename2(config, documents) {
64204
64020
  for (const doc of documents) {
64205
- doc.document = graphql29.visit(doc.document, {
64021
+ doc.document = graphql28.visit(doc.document, {
64206
64022
  VariableDefinition(node) {
64207
64023
  const { type, wrappers } = unwrapType(config, node.type);
64208
64024
  const runtimeScalar = config.configFile.features?.runtimeScalars?.[type.name];
@@ -64241,7 +64057,7 @@ async function addTypename2(config, documents) {
64241
64057
  }
64242
64058
 
64243
64059
  // src/codegen/validators/typeCheck.ts
64244
- var graphql30 = __toESM(require("graphql"), 1);
64060
+ var graphql29 = __toESM(require("graphql"), 1);
64245
64061
  async function typeCheck(config, docs) {
64246
64062
  const errors = [];
64247
64063
  const freeLists = [];
@@ -64249,7 +64065,7 @@ async function typeCheck(config, docs) {
64249
64065
  const listTypes = [];
64250
64066
  const fragments = {};
64251
64067
  for (const { document: parsed, originalString, filename } of docs) {
64252
- graphql30.visit(parsed, {
64068
+ graphql29.visit(parsed, {
64253
64069
  FragmentDefinition(definition) {
64254
64070
  fragments[definition.name.value] = definition;
64255
64071
  },
@@ -64294,14 +64110,14 @@ async function typeCheck(config, docs) {
64294
64110
  );
64295
64111
  return;
64296
64112
  }
64297
- if (graphql30.isListType(rootType) || graphql30.isNonNullType(rootType) && graphql30.isListType(rootType.ofType)) {
64113
+ if (graphql29.isListType(rootType) || graphql29.isNonNullType(rootType) && graphql29.isListType(rootType.ofType)) {
64298
64114
  needsParent = true;
64299
64115
  break;
64300
64116
  }
64301
- if (graphql30.isNonNullType(rootType) && "ofType" in rootType) {
64117
+ if (graphql29.isNonNullType(rootType) && "ofType" in rootType) {
64302
64118
  rootType = rootType.ofType;
64303
64119
  }
64304
- if (graphql30.isScalarType(rootType)) {
64120
+ if (graphql29.isScalarType(rootType)) {
64305
64121
  break;
64306
64122
  }
64307
64123
  rootType = rootType?.getFields()[parent3.name.value]?.type;
@@ -64377,9 +64193,9 @@ async function typeCheck(config, docs) {
64377
64193
  );
64378
64194
  }
64379
64195
  let targetTypes = [type];
64380
- if (graphql30.isUnionType(type)) {
64196
+ if (graphql29.isUnionType(type)) {
64381
64197
  targetTypes = config.schema.getPossibleTypes(type);
64382
- } else if (graphql30.isInterfaceType(type)) {
64198
+ } else if (graphql29.isInterfaceType(type)) {
64383
64199
  try {
64384
64200
  for (const key of config.keyFieldsForType(type.name)) {
64385
64201
  if (!type.getFields()[key]) {
@@ -64415,13 +64231,13 @@ async function typeCheck(config, docs) {
64415
64231
  if (errors.length > 0) {
64416
64232
  throw errors;
64417
64233
  }
64418
- const rules = (filepath) => [...graphql30.specifiedRules].filter(
64234
+ const rules = (filepath) => [...graphql29.specifiedRules].filter(
64419
64235
  (rule) => ![
64420
- graphql30.NoUnusedFragmentsRule,
64421
- graphql30.KnownFragmentNamesRule,
64422
- graphql30.ExecutableDefinitionsRule,
64423
- graphql30.KnownDirectivesRule,
64424
- graphql30.KnownArgumentNamesRule
64236
+ graphql29.NoUnusedFragmentsRule,
64237
+ graphql29.KnownFragmentNamesRule,
64238
+ graphql29.ExecutableDefinitionsRule,
64239
+ graphql29.KnownDirectivesRule,
64240
+ graphql29.KnownArgumentNamesRule
64425
64241
  ].includes(rule)
64426
64242
  ).concat(
64427
64243
  validateLists({
@@ -64442,7 +64258,7 @@ async function typeCheck(config, docs) {
64442
64258
  validateLoadingDirective(config)
64443
64259
  );
64444
64260
  for (const { filename, document: parsed, originalString } of docs) {
64445
- for (const error of graphql30.validate(config.schema, parsed, rules(filename))) {
64261
+ for (const error of graphql29.validate(config.schema, parsed, rules(filename))) {
64446
64262
  errors.push(
64447
64263
  new HoudiniError({
64448
64264
  filepath: filename,
@@ -64471,20 +64287,20 @@ function validateRequiredDirective(config, filepath) {
64471
64287
  if (!node.directives?.some(({ name }) => name.value === config.requiredDirective))
64472
64288
  return;
64473
64289
  const parentType = parentTypeFromAncestors(config.schema, filepath, ancestors);
64474
- if (!graphql30.isObjectType(parentType)) {
64290
+ if (!graphql29.isObjectType(parentType)) {
64475
64291
  ctx.reportError(
64476
- new graphql30.GraphQLError(
64292
+ new graphql29.GraphQLError(
64477
64293
  `@${config.requiredDirective} may only be used on objects, not arguments`
64478
64294
  )
64479
64295
  );
64480
64296
  return;
64481
64297
  }
64482
64298
  const type = parentType.getFields()[node.name.value].type;
64483
- const isServerNullable = !graphql30.isNonNullType(type);
64299
+ const isServerNullable = !graphql29.isNonNullType(type);
64484
64300
  const isAlreadyClientNullable = isClientNullable(node, true);
64485
64301
  if (!isServerNullable && !isAlreadyClientNullable) {
64486
64302
  ctx.reportError(
64487
- new graphql30.GraphQLError(
64303
+ new graphql29.GraphQLError(
64488
64304
  `@${config.requiredDirective} may only be used on nullable fields`
64489
64305
  )
64490
64306
  );
@@ -64506,7 +64322,7 @@ var validateLists = ({
64506
64322
  if (!config.isListFragment(node.name.value)) {
64507
64323
  if (!fragments[node.name.value]) {
64508
64324
  ctx.reportError(
64509
- new graphql30.GraphQLError(
64325
+ new graphql29.GraphQLError(
64510
64326
  "Encountered unknown fragment: " + node.name.value
64511
64327
  )
64512
64328
  );
@@ -64516,7 +64332,7 @@ var validateLists = ({
64516
64332
  const listName = config.listNameFromFragment(node.name.value);
64517
64333
  if (!lists.includes(listName)) {
64518
64334
  ctx.reportError(
64519
- new graphql30.GraphQLError(
64335
+ new graphql29.GraphQLError(
64520
64336
  "Encountered fragment referencing unknown list: " + listName
64521
64337
  )
64522
64338
  );
@@ -64541,7 +64357,7 @@ var validateLists = ({
64541
64357
  );
64542
64358
  if (parentArg) {
64543
64359
  ctx.reportError(
64544
- new graphql30.GraphQLError(
64360
+ new graphql29.GraphQLError(
64545
64361
  `@${config.deprecatedlistDirectiveParentIDArg} should be defined only in it's own directive now`
64546
64362
  )
64547
64363
  );
@@ -64557,7 +64373,7 @@ var validateLists = ({
64557
64373
  return;
64558
64374
  }
64559
64375
  ctx.reportError(
64560
- new graphql30.GraphQLError(
64376
+ new graphql29.GraphQLError(
64561
64377
  `For this list fragment, you need to add or @${config.listParentDirective} or @${config.listAllListsDirective} directive to specify the behavior`
64562
64378
  )
64563
64379
  );
@@ -64567,7 +64383,7 @@ var validateLists = ({
64567
64383
  const directiveName = node.name.value;
64568
64384
  if (directiveName === "connection") {
64569
64385
  ctx.reportError(
64570
- new graphql30.GraphQLError(
64386
+ new graphql29.GraphQLError(
64571
64387
  "@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."
64572
64388
  )
64573
64389
  );
@@ -64576,7 +64392,7 @@ var validateLists = ({
64576
64392
  if (!config.isInternalDirective(node.name.value)) {
64577
64393
  if (!config.schema.getDirective(directiveName)) {
64578
64394
  ctx.reportError(
64579
- new graphql30.GraphQLError(
64395
+ new graphql29.GraphQLError(
64580
64396
  "Encountered unknown directive: " + directiveName
64581
64397
  )
64582
64398
  );
@@ -64585,7 +64401,7 @@ var validateLists = ({
64585
64401
  }
64586
64402
  if (config.isListOperationDirective(directiveName) && !listTypes.includes(config.listNameFromDirective(directiveName))) {
64587
64403
  ctx.reportError(
64588
- new graphql30.GraphQLError(
64404
+ new graphql29.GraphQLError(
64589
64405
  "Encountered directive referencing unknown list: " + directiveName
64590
64406
  )
64591
64407
  );
@@ -64596,7 +64412,7 @@ var validateLists = ({
64596
64412
  };
64597
64413
  function knownArguments(config) {
64598
64414
  return function(ctx) {
64599
- const nativeValidator = graphql30.KnownArgumentNamesRule(ctx);
64415
+ const nativeValidator = graphql29.KnownArgumentNamesRule(ctx);
64600
64416
  return {
64601
64417
  ...nativeValidator,
64602
64418
  Directive(directiveNode) {
@@ -64631,7 +64447,7 @@ function validateFragmentArguments(config, filepath, fragments) {
64631
64447
  for (const arg of node.arguments || []) {
64632
64448
  if (arg.value.kind !== "ObjectValue") {
64633
64449
  ctx.reportError(
64634
- new graphql30.GraphQLError("values in @arguments must be an object")
64450
+ new graphql29.GraphQLError("values in @arguments must be an object")
64635
64451
  );
64636
64452
  return;
64637
64453
  }
@@ -64641,13 +64457,13 @@ function validateFragmentArguments(config, filepath, fragments) {
64641
64457
  );
64642
64458
  if (!typeArg) {
64643
64459
  ctx.reportError(
64644
- new graphql30.GraphQLError("missing type field for @arguments directive")
64460
+ new graphql29.GraphQLError("missing type field for @arguments directive")
64645
64461
  );
64646
64462
  return;
64647
64463
  }
64648
- if (typeArg.value.kind !== graphql30.Kind.STRING) {
64464
+ if (typeArg.value.kind !== graphql29.Kind.STRING) {
64649
64465
  ctx.reportError(
64650
- new graphql30.GraphQLError("type field to @arguments must be a string")
64466
+ new graphql29.GraphQLError("type field to @arguments must be a string")
64651
64467
  );
64652
64468
  return;
64653
64469
  }
@@ -64660,7 +64476,7 @@ function validateFragmentArguments(config, filepath, fragments) {
64660
64476
  );
64661
64477
  if (typeArg.value.value !== defaultValueType) {
64662
64478
  ctx.reportError(
64663
- new graphql30.GraphQLError(
64479
+ new graphql29.GraphQLError(
64664
64480
  `Invalid default value provided for ${arg.name.value}. Expected ${typeArg.value.value}, found ${defaultValueType}`
64665
64481
  )
64666
64482
  );
@@ -64678,7 +64494,7 @@ function validateFragmentArguments(config, filepath, fragments) {
64678
64494
  try {
64679
64495
  args = fragmentArguments(config, filepath, fragments[fragmentName]);
64680
64496
  } catch (e) {
64681
- ctx.reportError(new graphql30.GraphQLError(e.message));
64497
+ ctx.reportError(new graphql29.GraphQLError(e.message));
64682
64498
  return;
64683
64499
  }
64684
64500
  fragmentArguments2[fragmentName] = args;
@@ -64701,7 +64517,7 @@ function validateFragmentArguments(config, filepath, fragments) {
64701
64517
  );
64702
64518
  if (missing.length > 0) {
64703
64519
  ctx.reportError(
64704
- new graphql30.GraphQLError(
64520
+ new graphql29.GraphQLError(
64705
64521
  `The following arguments are missing from the "${fragmentName}" fragment: ` + JSON.stringify(missing)
64706
64522
  )
64707
64523
  );
@@ -64712,7 +64528,7 @@ function validateFragmentArguments(config, filepath, fragments) {
64712
64528
  );
64713
64529
  if (unknown.length > 0) {
64714
64530
  ctx.reportError(
64715
- new graphql30.GraphQLError(
64531
+ new graphql29.GraphQLError(
64716
64532
  "Encountered unknown arguments: " + JSON.stringify(unknown)
64717
64533
  )
64718
64534
  );
@@ -64724,7 +64540,7 @@ function validateFragmentArguments(config, filepath, fragments) {
64724
64540
  for (const [applied, target] of zipped) {
64725
64541
  if (!valueIsType(config, applied.value, target)) {
64726
64542
  ctx.reportError(
64727
- new graphql30.GraphQLError(
64543
+ new graphql29.GraphQLError(
64728
64544
  `Invalid argument type. Expected ${target}, found ${applied.value.kind}`
64729
64545
  )
64730
64546
  );
@@ -64766,7 +64582,7 @@ function valueIsType(config, value, targetType) {
64766
64582
  }
64767
64583
  if (value.kind === "EnumValue" && targetType.kind === "NamedType") {
64768
64584
  const enumType = config.schema.getType(targetType.name.value);
64769
- if (!graphql30.isEnumType(enumType)) {
64585
+ if (!graphql29.isEnumType(enumType)) {
64770
64586
  return false;
64771
64587
  }
64772
64588
  return enumType.getValues().some((enumValue) => enumValue.value === value.value);
@@ -64786,7 +64602,7 @@ function paginateArgs(config, filepath) {
64786
64602
  }
64787
64603
  if (alreadyPaginated) {
64788
64604
  ctx.reportError(
64789
- new graphql30.GraphQLError(
64605
+ new graphql29.GraphQLError(
64790
64606
  `@${config.paginateDirective} can only appear in a document once.`
64791
64607
  )
64792
64608
  );
@@ -64818,7 +64634,7 @@ function paginateArgs(config, filepath) {
64818
64634
  const backwards = appliedArgs.has("last");
64819
64635
  if (!forward && !backwards) {
64820
64636
  ctx.reportError(
64821
- new graphql30.GraphQLError(
64637
+ new graphql29.GraphQLError(
64822
64638
  "A field with cursor-based pagination must have a first or last argument"
64823
64639
  )
64824
64640
  );
@@ -64832,7 +64648,7 @@ function paginateArgs(config, filepath) {
64832
64648
  }
64833
64649
  if (forward && backwards && paginateMode === "Infinite") {
64834
64650
  ctx.reportError(
64835
- new graphql30.GraphQLError(
64651
+ new graphql29.GraphQLError(
64836
64652
  `A field with cursor pagination cannot go forwards an backwards simultaneously`
64837
64653
  )
64838
64654
  );
@@ -64846,7 +64662,7 @@ function paginateArgs(config, filepath) {
64846
64662
  );
64847
64663
  if (!appliedLimitArg) {
64848
64664
  ctx.reportError(
64849
- new graphql30.GraphQLError(
64665
+ new graphql29.GraphQLError(
64850
64666
  "A field with offset-based pagination must have a limit argument"
64851
64667
  )
64852
64668
  );
@@ -64862,20 +64678,20 @@ function noUnusedFragmentArguments(config) {
64862
64678
  const args = /* @__PURE__ */ new Set();
64863
64679
  return {
64864
64680
  enter(node) {
64865
- if (node.kind === graphql30.Kind.FRAGMENT_DEFINITION) {
64681
+ if (node.kind === graphql29.Kind.FRAGMENT_DEFINITION) {
64866
64682
  const definitionArguments = node.directives?.filter((directive) => directive.name.value === config.argumentsDirective).flatMap((directive) => directive.arguments);
64867
64683
  for (const arg of definitionArguments?.map((arg2) => arg2?.name.value) || []) {
64868
64684
  args.add(arg);
64869
64685
  }
64870
- } else if (node.kind === graphql30.Kind.VARIABLE) {
64686
+ } else if (node.kind === graphql29.Kind.VARIABLE) {
64871
64687
  args.delete(node.name.value);
64872
64688
  }
64873
64689
  },
64874
64690
  leave(node) {
64875
- if (node.kind === graphql30.Kind.FRAGMENT_DEFINITION) {
64691
+ if (node.kind === graphql29.Kind.FRAGMENT_DEFINITION) {
64876
64692
  if (args.size > 0) {
64877
64693
  ctx.reportError(
64878
- new graphql30.GraphQLError(
64694
+ new graphql29.GraphQLError(
64879
64695
  "Encountered unused fragment arguments: " + [...args].join(",")
64880
64696
  )
64881
64697
  );
@@ -64911,7 +64727,7 @@ function nodeDirectives(config, directives) {
64911
64727
  if (definition.kind === "OperationDefinition") {
64912
64728
  if (definition.operation !== "query") {
64913
64729
  ctx.reportError(
64914
- new graphql30.GraphQLError(
64730
+ new graphql29.GraphQLError(
64915
64731
  `@${node.name.value} must fall on a fragment or query document`
64916
64732
  )
64917
64733
  );
@@ -64923,7 +64739,7 @@ function nodeDirectives(config, directives) {
64923
64739
  }
64924
64740
  if (!possibleNodes.includes(definitionType)) {
64925
64741
  ctx.reportError(
64926
- new graphql30.GraphQLError(paginateOnNonNodeMessage(node.name.value))
64742
+ new graphql29.GraphQLError(paginateOnNonNodeMessage(node.name.value))
64927
64743
  );
64928
64744
  }
64929
64745
  }
@@ -64942,7 +64758,7 @@ function checkMutationOperation(config) {
64942
64758
  );
64943
64759
  if (append && prepend) {
64944
64760
  ctx.reportError(
64945
- new graphql30.GraphQLError(
64761
+ new graphql29.GraphQLError(
64946
64762
  `You can't apply both @${config.listPrependDirective} and @${config.listAppendDirective} at the same time`
64947
64763
  )
64948
64764
  );
@@ -64956,7 +64772,7 @@ function checkMutationOperation(config) {
64956
64772
  );
64957
64773
  if (parentId && allLists) {
64958
64774
  ctx.reportError(
64959
- new graphql30.GraphQLError(
64775
+ new graphql29.GraphQLError(
64960
64776
  `You can't apply both @${config.listParentDirective} and @${config.listAllListsDirective} at the same time`
64961
64777
  )
64962
64778
  );
@@ -64978,7 +64794,7 @@ function checkMaskDirectives(config) {
64978
64794
  );
64979
64795
  if (maskEnableDirective && maskDisableDirective) {
64980
64796
  ctx.reportError(
64981
- new graphql30.GraphQLError(
64797
+ new graphql29.GraphQLError(
64982
64798
  `You can't apply both @${config.maskEnableDirective} and @${config.maskDisableDirective} at the same time`
64983
64799
  )
64984
64800
  );
@@ -65020,7 +64836,7 @@ function validateLoadingDirective(config) {
65020
64836
  );
65021
64837
  if (!parentLoading && !global2) {
65022
64838
  ctx.reportError(
65023
- new graphql30.GraphQLError(
64839
+ new graphql29.GraphQLError(
65024
64840
  `@${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}`
65025
64841
  )
65026
64842
  );
@@ -65042,7 +64858,7 @@ function validateLoadingDirective(config) {
65042
64858
  );
65043
64859
  if (!parentLoading && !global2) {
65044
64860
  ctx.reportError(
65045
- new graphql30.GraphQLError(
64861
+ new graphql29.GraphQLError(
65046
64862
  `@${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}`
65047
64863
  )
65048
64864
  );
@@ -65057,7 +64873,7 @@ function getAndVerifyNodeInterface(config) {
65057
64873
  if (!nodeInterface) {
65058
64874
  return null;
65059
64875
  }
65060
- if (!graphql30.isInterfaceType(nodeInterface)) {
64876
+ if (!graphql29.isInterfaceType(nodeInterface)) {
65061
64877
  displayInvalidNodeFieldMessage(config);
65062
64878
  return null;
65063
64879
  }
@@ -65152,11 +64968,11 @@ async function uniqueDocumentNames(config, docs) {
65152
64968
  }
65153
64969
 
65154
64970
  // src/codegen/validators/noIDAlias.ts
65155
- var graphql31 = __toESM(require("graphql"), 1);
64971
+ var graphql30 = __toESM(require("graphql"), 1);
65156
64972
  async function noIDAlias(config, docs) {
65157
64973
  const errors = [];
65158
64974
  for (const { filename, document } of docs) {
65159
- graphql31.visit(document, {
64975
+ graphql30.visit(document, {
65160
64976
  Field(node, _, __, ___, ancestors) {
65161
64977
  const fieldType = parentTypeFromAncestors(config.schema, filename, ancestors).name;
65162
64978
  if (config.keyFieldsForType(fieldType).includes(node.alias?.value || "")) {
@@ -65195,11 +65011,11 @@ async function validatePlugins(config, documents) {
65195
65011
  }
65196
65012
 
65197
65013
  // src/codegen/validators/componentFields.ts
65198
- var graphql32 = __toESM(require("graphql"), 1);
65014
+ var graphql31 = __toESM(require("graphql"), 1);
65199
65015
  async function componentFields2(config, docs) {
65200
65016
  const errors = [];
65201
65017
  for (const { filename: filepath, document } of docs) {
65202
- graphql32.visit(document, {
65018
+ graphql31.visit(document, {
65203
65019
  FragmentDefinition(node, _, __, ___, ancestors) {
65204
65020
  const componentFieldDirective = node.directives?.find(
65205
65021
  (dir) => dir.name.value === config.componentFieldDirective
@@ -65247,7 +65063,7 @@ async function componentFields2(config, docs) {
65247
65063
  if (existingField && existingField.filepath !== filepath) {
65248
65064
  conflict = true;
65249
65065
  } else if (parentType && fieldValue) {
65250
- const fieldDef = graphql32.isObjectType(parentType) && parentType.getFields()[fieldValue];
65066
+ const fieldDef = graphql31.isObjectType(parentType) && parentType.getFields()[fieldValue];
65251
65067
  if (fieldDef && !fieldDef.astNode?.directives?.find(
65252
65068
  (dir) => dir.name.value === config.componentFieldDirective
65253
65069
  )) {
@@ -65260,7 +65076,7 @@ async function componentFields2(config, docs) {
65260
65076
  filepath
65261
65077
  });
65262
65078
  }
65263
- if (parentType && graphql32.isAbstractType(parentType)) {
65079
+ if (parentType && graphql31.isAbstractType(parentType)) {
65264
65080
  errors.push({
65265
65081
  message: `Cannot add component field ${parent2}.${fieldValue} because ${parent2} is an abstract type`,
65266
65082
  filepath
@@ -65481,12 +65297,12 @@ async function processJSFile(config, contents) {
65481
65297
  return documents;
65482
65298
  }
65483
65299
  async function processGraphQLDocument(config, filepath, document) {
65484
- const parsedDoc = graphql33.parse(document);
65300
+ const parsedDoc = graphql32.parse(document);
65485
65301
  const operations = parsedDoc.definitions.filter(
65486
- ({ kind: kind2 }) => kind2 === graphql33.Kind.OPERATION_DEFINITION
65302
+ ({ kind: kind2 }) => kind2 === graphql32.Kind.OPERATION_DEFINITION
65487
65303
  );
65488
65304
  const fragments = parsedDoc.definitions.filter(
65489
- ({ kind: kind2 }) => kind2 === graphql33.Kind.FRAGMENT_DEFINITION
65305
+ ({ kind: kind2 }) => kind2 === graphql32.Kind.FRAGMENT_DEFINITION
65490
65306
  );
65491
65307
  if (operations.length > 1) {
65492
65308
  throw new HoudiniError({