houdini 1.2.44 → 1.2.45

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 (48) hide show
  1. package/build/cmd-cjs/index.js +651 -844
  2. package/build/cmd-esm/index.js +501 -694
  3. package/build/codegen/generators/comments/jsdoc.d.ts +2 -0
  4. package/build/codegen-cjs/index.js +649 -842
  5. package/build/codegen-esm/index.js +499 -692
  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 +667 -464
  10. package/build/lib-esm/index.js +661 -464
  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/types.d.ts +3 -1
  18. package/build/runtime-cjs/client/index.d.ts +7 -1
  19. package/build/runtime-cjs/client/index.js +26 -11
  20. package/build/runtime-cjs/client/plugins/fragment.d.ts +2 -2
  21. package/build/runtime-cjs/client/plugins/fragment.js +4 -11
  22. package/build/runtime-cjs/client/plugins/mutation.d.ts +2 -1
  23. package/build/runtime-cjs/client/plugins/mutation.js +8 -15
  24. package/build/runtime-cjs/client/plugins/query.d.ts +2 -2
  25. package/build/runtime-cjs/client/plugins/query.js +4 -11
  26. package/build/runtime-cjs/lib/scalars.d.ts +1 -1
  27. package/build/runtime-cjs/lib/scalars.js +4 -0
  28. package/build/runtime-cjs/lib/types.d.ts +13 -2
  29. package/build/runtime-cjs/router/types.d.ts +3 -1
  30. package/build/runtime-esm/client/index.d.ts +7 -1
  31. package/build/runtime-esm/client/index.js +26 -11
  32. package/build/runtime-esm/client/plugins/fragment.d.ts +2 -2
  33. package/build/runtime-esm/client/plugins/fragment.js +1 -2
  34. package/build/runtime-esm/client/plugins/mutation.d.ts +2 -1
  35. package/build/runtime-esm/client/plugins/mutation.js +1 -2
  36. package/build/runtime-esm/client/plugins/query.d.ts +2 -2
  37. package/build/runtime-esm/client/plugins/query.js +1 -2
  38. package/build/runtime-esm/lib/scalars.d.ts +1 -1
  39. package/build/runtime-esm/lib/scalars.js +6 -0
  40. package/build/runtime-esm/lib/types.d.ts +13 -2
  41. package/build/runtime-esm/router/types.d.ts +3 -1
  42. package/build/test-cjs/index.js +664 -840
  43. package/build/test-esm/index.js +514 -690
  44. package/build/vite-cjs/index.js +761 -852
  45. package/build/vite-esm/index.js +611 -702
  46. package/package.json +1 -1
  47. package/build/codegen/generators/typescript/typeReference.d.ts +0 -8
  48. 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);
@@ -57128,6 +56891,152 @@ async function cleanupFiles(pathFolder, listOfObj) {
57128
56891
  return allFilesNotInList;
57129
56892
  }
57130
56893
 
56894
+ // src/lib/typescript.ts
56895
+ var graphql4 = __toESM(require("graphql"), 1);
56896
+ var recast2 = __toESM(require_main2(), 1);
56897
+ var AST2 = recast2.types.builders;
56898
+ function unwrappedTsTypeReference(config, filepath, missingScalars, {
56899
+ type,
56900
+ wrappers
56901
+ }, body) {
56902
+ let result;
56903
+ if (graphql4.isScalarType(type)) {
56904
+ result = scalarPropertyValue(config, filepath, missingScalars, type, body, null);
56905
+ } else if (graphql4.isEnumType(type)) {
56906
+ result = enumReference(config, body, type.name);
56907
+ } else {
56908
+ result = AST2.tsTypeReference(AST2.identifier(type.name));
56909
+ }
56910
+ for (const toWrap of wrappers) {
56911
+ if (toWrap === "NonNull" /* NonNull */) {
56912
+ continue;
56913
+ } else if (toWrap === "Nullable" /* Nullable */) {
56914
+ result = nullableField(result, true);
56915
+ } else if (toWrap === "List" /* List */) {
56916
+ result = AST2.tsArrayType(AST2.tsParenthesizedType(result));
56917
+ }
56918
+ }
56919
+ return result;
56920
+ }
56921
+ function tsTypeReference(config, filepath, missingScalars, definition, body) {
56922
+ const { type, wrappers } = unwrapType(config, definition.type);
56923
+ return unwrappedTsTypeReference(
56924
+ config,
56925
+ filepath,
56926
+ missingScalars,
56927
+ { type, wrappers },
56928
+ body
56929
+ );
56930
+ }
56931
+ function enumReference(config, body, name) {
56932
+ ensureImports({
56933
+ config,
56934
+ body,
56935
+ import: ["ValueOf"],
56936
+ importKind: "type",
56937
+ sourceModule: "$houdini/runtime/lib/types"
56938
+ });
56939
+ return AST2.tsTypeReference(
56940
+ AST2.identifier("ValueOf"),
56941
+ AST2.tsTypeParameterInstantiation([AST2.tsTypeQuery(AST2.identifier(name))])
56942
+ );
56943
+ }
56944
+ function readonlyProperty(prop, enable = true) {
56945
+ if (enable) {
56946
+ prop.readonly = true;
56947
+ }
56948
+ return prop;
56949
+ }
56950
+ function nullableField(inner, input = false) {
56951
+ const members = [inner, AST2.tsNullKeyword()];
56952
+ if (input) {
56953
+ members.push(AST2.tsUndefinedKeyword());
56954
+ }
56955
+ return AST2.tsUnionType(members);
56956
+ }
56957
+ function scalarPropertyValue(config, filepath, missingScalars, target, body, field) {
56958
+ if (config.configFile.features?.componentFields && target.name === config.componentScalar) {
56959
+ if (!field) {
56960
+ return AST2.tsNeverKeyword();
56961
+ }
56962
+ const component = config.componentFields[field.parent][field.field];
56963
+ const sourcePathRelative = path_exports.relative(
56964
+ path_exports.join(config.projectRoot, "src"),
56965
+ component.filepath
56966
+ );
56967
+ let sourcePathParsed = path_exports.parse(sourcePathRelative);
56968
+ let sourcePath = path_exports.join(sourcePathParsed.dir, sourcePathParsed.name);
56969
+ const localImport = ensureImports({
56970
+ config,
56971
+ body,
56972
+ import: "__component__" + component.fragment,
56973
+ sourceModule: path_exports.join(
56974
+ path_exports.relative(path_exports.dirname(filepath), config.projectRoot),
56975
+ "src",
56976
+ sourcePath
56977
+ )
56978
+ }) ?? "__component__" + component.fragment;
56979
+ const parameters = AST2.tsTypeReference(AST2.identifier("Parameters"));
56980
+ parameters.typeParameters = AST2.tsTypeParameterInstantiation([
56981
+ AST2.tsTypeQuery(AST2.identifier(localImport))
56982
+ ]);
56983
+ const indexed = AST2.tsIndexedAccessType(
56984
+ parameters,
56985
+ AST2.tsLiteralType(AST2.numericLiteral(0))
56986
+ );
56987
+ const omit = AST2.tsTypeReference(AST2.identifier("Omit"));
56988
+ omit.typeParameters = AST2.tsTypeParameterInstantiation([
56989
+ indexed,
56990
+ AST2.tsLiteralType(AST2.stringLiteral(component.prop))
56991
+ ]);
56992
+ const arg = AST2.identifier("props");
56993
+ arg.typeAnnotation = AST2.tsTypeAnnotation(omit);
56994
+ const returnType = AST2.tsTypeReference(AST2.identifier("ReturnType"));
56995
+ returnType.typeParameters = AST2.tsTypeParameterInstantiation([
56996
+ AST2.tsTypeQuery(AST2.identifier(localImport))
56997
+ ]);
56998
+ const fnType = AST2.tsFunctionType([arg]);
56999
+ fnType.typeAnnotation = AST2.tsTypeAnnotation(returnType);
57000
+ return fnType;
57001
+ }
57002
+ switch (target.name) {
57003
+ case "String": {
57004
+ return AST2.tsStringKeyword();
57005
+ }
57006
+ case "Int": {
57007
+ return AST2.tsNumberKeyword();
57008
+ }
57009
+ case "Float": {
57010
+ return AST2.tsNumberKeyword();
57011
+ }
57012
+ case "Boolean": {
57013
+ return AST2.tsBooleanKeyword();
57014
+ }
57015
+ case "ID": {
57016
+ return AST2.tsStringKeyword();
57017
+ }
57018
+ default: {
57019
+ if (graphql4.isNonNullType(target) && "ofType" in target) {
57020
+ return scalarPropertyValue(
57021
+ config,
57022
+ filepath,
57023
+ missingScalars,
57024
+ target.ofType,
57025
+ body,
57026
+ field
57027
+ );
57028
+ }
57029
+ if (config.scalars?.[target.name]) {
57030
+ return AST2.tsTypeReference(AST2.identifier(config.scalars?.[target.name].type));
57031
+ }
57032
+ if (target.name !== config.componentScalar) {
57033
+ missingScalars.add(target.name);
57034
+ }
57035
+ return AST2.tsAnyKeyword();
57036
+ }
57037
+ }
57038
+ }
57039
+
57131
57040
  // ../../node_modules/.pnpm/estree-walker@3.0.1/node_modules/estree-walker/src/walker.js
57132
57041
  var WalkerBase = class {
57133
57042
  constructor() {
@@ -57241,7 +57150,7 @@ async function asyncWalk(ast, { enter, leave }) {
57241
57150
  }
57242
57151
 
57243
57152
  // src/lib/walk.ts
57244
- var graphql4 = __toESM(require("graphql"), 1);
57153
+ var graphql5 = __toESM(require("graphql"), 1);
57245
57154
  async function find_graphql(config, parsedScript, walker) {
57246
57155
  await asyncWalk(parsedScript, {
57247
57156
  async enter(node, parent2) {
@@ -57296,7 +57205,7 @@ async function find_graphql(config, parsedScript, walker) {
57296
57205
  } else if (!documentString) {
57297
57206
  return;
57298
57207
  }
57299
- const parsedTag = graphql4.parse(documentString);
57208
+ const parsedTag = graphql5.parse(documentString);
57300
57209
  if (walker.where && !walker.where(parsedTag, { node, parent: parent2 })) {
57301
57210
  return;
57302
57211
  }
@@ -57428,7 +57337,7 @@ function extractAnonymousQuery(config, raw, expr, propName) {
57428
57337
  };
57429
57338
  return defs.concat([
57430
57339
  {
57431
- raw: graphql4.print(parsed),
57340
+ raw: graphql5.print(parsed),
57432
57341
  parsed
57433
57342
  }
57434
57343
  ]);
@@ -57443,11 +57352,11 @@ function extractAnonymousQuery(config, raw, expr, propName) {
57443
57352
 
57444
57353
  // src/lib/router/manifest.ts
57445
57354
  var t = __toESM(require_lib6(), 1);
57446
- var graphql5 = __toESM(require("graphql"), 1);
57355
+ var graphql6 = __toESM(require("graphql"), 1);
57447
57356
 
57448
57357
  // src/codegen/generators/artifacts/index.ts
57449
- var graphql16 = __toESM(require("graphql"), 1);
57450
- var recast4 = __toESM(require_main2(), 1);
57358
+ var graphql17 = __toESM(require("graphql"), 1);
57359
+ var recast5 = __toESM(require_main2(), 1);
57451
57360
 
57452
57361
  // src/codegen/utils/commonjs.ts
57453
57362
  var cjsIndexFilePreamble = `"use strict";
@@ -57689,19 +57598,19 @@ var FieldCollection = class {
57689
57598
  };
57690
57599
 
57691
57600
  // src/codegen/utils/moduleExport.ts
57692
- var recast2 = __toESM(require_main2(), 1);
57693
- var AST2 = recast2.types.builders;
57601
+ var recast3 = __toESM(require_main2(), 1);
57602
+ var AST3 = recast3.types.builders;
57694
57603
  function moduleExport(config, key, value) {
57695
57604
  if (config.module === "commonjs") {
57696
- let target = AST2.memberExpression(AST2.identifier("module"), AST2.identifier("exports"));
57605
+ let target = AST3.memberExpression(AST3.identifier("module"), AST3.identifier("exports"));
57697
57606
  if (key !== "default") {
57698
- target = AST2.memberExpression(target, AST2.identifier(key));
57607
+ target = AST3.memberExpression(target, AST3.identifier(key));
57699
57608
  }
57700
- return AST2.expressionStatement(AST2.assignmentExpression("=", target, value));
57609
+ return AST3.expressionStatement(AST3.assignmentExpression("=", target, value));
57701
57610
  }
57702
- return key === "default" ? AST2.exportDefaultDeclaration(value) : AST2.exportNamedDeclaration(
57703
- AST2.variableDeclaration("const", [
57704
- AST2.variableDeclarator(AST2.identifier(key), value)
57611
+ return key === "default" ? AST3.exportDefaultDeclaration(value) : AST3.exportNamedDeclaration(
57612
+ AST3.variableDeclaration("const", [
57613
+ AST3.variableDeclarator(AST3.identifier(key), value)
57705
57614
  ])
57706
57615
  );
57707
57616
  }
@@ -57958,7 +57867,7 @@ var serialize = (value, { json, lossy } = {}) => {
57958
57867
  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
57868
 
57960
57869
  // src/codegen/transforms/fragmentVariables.ts
57961
- var graphql7 = __toESM(require("graphql"), 1);
57870
+ var graphql8 = __toESM(require("graphql"), 1);
57962
57871
 
57963
57872
  // src/codegen/utils/stripLoc.ts
57964
57873
  function stripLoc(value) {
@@ -57979,13 +57888,13 @@ function stripLoc(value) {
57979
57888
  }
57980
57889
 
57981
57890
  // src/codegen/transforms/collectDefinitions.ts
57982
- var graphql6 = __toESM(require("graphql"), 1);
57983
- var import_graphql = require("graphql");
57891
+ var graphql7 = __toESM(require("graphql"), 1);
57892
+ var import_graphql2 = require("graphql");
57984
57893
  async function includeFragmentDefinitions(config, documents) {
57985
57894
  const fragments = collectDefinitions(config, documents);
57986
57895
  for (const [index, { name, document, filename }] of documents.entries()) {
57987
57896
  const operation = document.definitions.find(
57988
- (def) => def.kind === import_graphql.Kind.OPERATION_DEFINITION || def.kind === "FragmentDefinition"
57897
+ (def) => def.kind === import_graphql2.Kind.OPERATION_DEFINITION || def.kind === "FragmentDefinition"
57989
57898
  );
57990
57899
  if (!operation) {
57991
57900
  continue;
@@ -58029,10 +57938,10 @@ function collectDefinitions(config, docs) {
58029
57938
  }
58030
57939
  function findRequiredFragments(config, definition) {
58031
57940
  const referencedFragments = [];
58032
- const typeInfo = new graphql6.TypeInfo(config.schema);
58033
- definition.selectionSet = graphql6.visit(
57941
+ const typeInfo = new graphql7.TypeInfo(config.schema);
57942
+ definition.selectionSet = graphql7.visit(
58034
57943
  definition,
58035
- graphql6.visitWithTypeInfo(typeInfo, {
57944
+ graphql7.visitWithTypeInfo(typeInfo, {
58036
57945
  FragmentSpread(node) {
58037
57946
  referencedFragments.push(node.name.value);
58038
57947
  }
@@ -58066,7 +57975,7 @@ function flattenFragments(filepath, operation, fragments) {
58066
57975
  }
58067
57976
 
58068
57977
  // src/codegen/transforms/fragmentVariables.ts
58069
- var GraphqlKinds2 = graphql7.Kind;
57978
+ var GraphqlKinds2 = graphql8.Kind;
58070
57979
  async function fragmentVariables(config, documents) {
58071
57980
  const fragments = collectDefinitions(config, documents);
58072
57981
  const generatedFragments = {};
@@ -58089,7 +57998,7 @@ async function fragmentVariables(config, documents) {
58089
57998
  });
58090
57999
  }
58091
58000
  const doc = {
58092
- kind: graphql7.Kind.DOCUMENT,
58001
+ kind: graphql8.Kind.DOCUMENT,
58093
58002
  definitions: Object.values(generatedFragments)
58094
58003
  };
58095
58004
  documents.push({
@@ -58160,7 +58069,7 @@ function inlineFragmentArgs({
58160
58069
  return null;
58161
58070
  };
58162
58071
  const result = esm_default(
58163
- graphql7.visit(document, {
58072
+ graphql8.visit(document, {
58164
58073
  FragmentSpread(node) {
58165
58074
  if (!fragmentDefinitions[node.name.value]) {
58166
58075
  throw new Error("Could not find definition for fragment" + node.name.value);
@@ -58246,7 +58155,7 @@ function inlineFragmentArgs({
58246
58155
  );
58247
58156
  if (newName) {
58248
58157
  result.name = {
58249
- kind: graphql7.Kind.NAME,
58158
+ kind: graphql8.Kind.NAME,
58250
58159
  value: newName
58251
58160
  };
58252
58161
  }
@@ -58413,7 +58322,7 @@ ${exportDefaultFrom(`./${doc.name}`, doc.name)}`,
58413
58322
  }
58414
58323
 
58415
58324
  // src/codegen/generators/artifacts/inputs.ts
58416
- var graphql8 = __toESM(require("graphql"), 1);
58325
+ var graphql9 = __toESM(require("graphql"), 1);
58417
58326
  function inputObject(config, inputs, runtimeScalars) {
58418
58327
  const visitedTypes = /* @__PURE__ */ new Set();
58419
58328
  const inputObj = {
@@ -58443,10 +58352,10 @@ function walkInputs(config, visitedTypes, inputObj, rootType) {
58443
58352
  if (visitedTypes.has(type.name)) {
58444
58353
  return;
58445
58354
  }
58446
- if (graphql8.isEnumType(type) || graphql8.isScalarType(type)) {
58355
+ if (graphql9.isEnumType(type) || graphql9.isScalarType(type)) {
58447
58356
  return;
58448
58357
  }
58449
- if (graphql8.isUnionType(type)) {
58358
+ if (graphql9.isUnionType(type)) {
58450
58359
  return;
58451
58360
  }
58452
58361
  visitedTypes.add(type.name);
@@ -58464,50 +58373,50 @@ function walkInputs(config, visitedTypes, inputObj, rootType) {
58464
58373
  }
58465
58374
 
58466
58375
  // src/codegen/generators/artifacts/operations.ts
58467
- var graphql10 = __toESM(require("graphql"), 1);
58376
+ var graphql11 = __toESM(require("graphql"), 1);
58468
58377
 
58469
58378
  // 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;
58379
+ var graphql10 = __toESM(require("graphql"), 1);
58380
+ var recast4 = __toESM(require_main2(), 1);
58381
+ var AST4 = recast4.types.builders;
58473
58382
  function serializeValue(value) {
58474
58383
  if (Array.isArray(value)) {
58475
- return AST3.arrayExpression(value.map(serializeValue));
58384
+ return AST4.arrayExpression(value.map(serializeValue));
58476
58385
  }
58477
58386
  if (typeof value === "object" && value !== null) {
58478
- return AST3.objectExpression(
58387
+ return AST4.objectExpression(
58479
58388
  Object.entries(value).filter(([key, value2]) => typeof value2 !== "undefined").map(([key, val]) => {
58480
- return AST3.objectProperty(AST3.stringLiteral(key), serializeValue(val));
58389
+ return AST4.objectProperty(AST4.stringLiteral(key), serializeValue(val));
58481
58390
  })
58482
58391
  );
58483
58392
  }
58484
58393
  if (typeof value === "string") {
58485
58394
  if (value.indexOf("\n") !== -1) {
58486
- return AST3.templateLiteral(
58487
- [AST3.templateElement({ raw: value, cooked: value }, true)],
58395
+ return AST4.templateLiteral(
58396
+ [AST4.templateElement({ raw: value, cooked: value }, true)],
58488
58397
  []
58489
58398
  );
58490
58399
  }
58491
- return AST3.stringLiteral(value);
58400
+ return AST4.stringLiteral(value);
58492
58401
  }
58493
- return AST3.literal(value);
58402
+ return AST4.literal(value);
58494
58403
  }
58495
58404
  function convertValue(config, val) {
58496
58405
  let value;
58497
58406
  let kind;
58498
- if (val.kind === graphql9.Kind.INT) {
58407
+ if (val.kind === graphql10.Kind.INT) {
58499
58408
  value = parseInt(val.value, 10);
58500
58409
  kind = "Int";
58501
- } else if (val.kind === graphql9.Kind.FLOAT) {
58410
+ } else if (val.kind === graphql10.Kind.FLOAT) {
58502
58411
  value = parseFloat(val.value);
58503
58412
  kind = "Float";
58504
- } else if (val.kind === graphql9.Kind.BOOLEAN) {
58413
+ } else if (val.kind === graphql10.Kind.BOOLEAN) {
58505
58414
  value = val.value;
58506
58415
  kind = "Boolean";
58507
- } else if (val.kind === graphql9.Kind.VARIABLE) {
58416
+ } else if (val.kind === graphql10.Kind.VARIABLE) {
58508
58417
  value = val.name.value;
58509
58418
  kind = "Variable";
58510
- } else if (val.kind === graphql9.Kind.STRING) {
58419
+ } else if (val.kind === graphql10.Kind.STRING) {
58511
58420
  value = val.value;
58512
58421
  kind = "String";
58513
58422
  }
@@ -58520,7 +58429,7 @@ function operationsByPath(config, filepath, definition, filterTypes) {
58520
58429
  return {};
58521
58430
  }
58522
58431
  const pathOperations = {};
58523
- graphql10.visit(definition, {
58432
+ graphql11.visit(definition, {
58524
58433
  FragmentSpread(node, _, __, ___, ancestors) {
58525
58434
  if (!config.isListFragment(node.name.value)) {
58526
58435
  return;
@@ -58679,19 +58588,19 @@ function ancestorKey(ancestors) {
58679
58588
  }
58680
58589
 
58681
58590
  // src/codegen/generators/artifacts/selection.ts
58682
- var graphql15 = __toESM(require("graphql"), 1);
58591
+ var graphql16 = __toESM(require("graphql"), 1);
58683
58592
 
58684
58593
  // src/codegen/transforms/list.ts
58685
- var graphql13 = __toESM(require("graphql"), 1);
58594
+ var graphql14 = __toESM(require("graphql"), 1);
58686
58595
 
58687
58596
  // src/codegen/utils/objectIdentificationSelection.ts
58688
- var graphql11 = __toESM(require("graphql"), 1);
58597
+ var graphql12 = __toESM(require("graphql"), 1);
58689
58598
  var objectIdentificationSelection = (config, type) => {
58690
58599
  return config.keyFieldsForType(type.name).map((key) => {
58691
58600
  return {
58692
- kind: graphql11.Kind.FIELD,
58601
+ kind: graphql12.Kind.FIELD,
58693
58602
  name: {
58694
- kind: graphql11.Kind.NAME,
58603
+ kind: graphql12.Kind.NAME,
58695
58604
  value: key
58696
58605
  }
58697
58606
  };
@@ -58699,7 +58608,7 @@ var objectIdentificationSelection = (config, type) => {
58699
58608
  };
58700
58609
 
58701
58610
  // src/codegen/transforms/paginate.ts
58702
- var graphql12 = __toESM(require("graphql"), 1);
58611
+ var graphql13 = __toESM(require("graphql"), 1);
58703
58612
  async function paginate(config, documents) {
58704
58613
  const newDocs = [];
58705
58614
  for (const doc of documents) {
@@ -58732,7 +58641,7 @@ async function paginate(config, documents) {
58732
58641
  };
58733
58642
  let cursorType = "String";
58734
58643
  let paginationPath = [];
58735
- doc.document = graphql12.visit(doc.document, {
58644
+ doc.document = graphql13.visit(doc.document, {
58736
58645
  Field(node, _, __, ___, ancestors) {
58737
58646
  const paginateDirective = node.directives?.find(
58738
58647
  (directive) => directive.name.value === config.paginateDirective
@@ -58758,7 +58667,7 @@ async function paginate(config, documents) {
58758
58667
  flags.offset.enabled = offsetPagination;
58759
58668
  flags.limit.enabled = offsetPagination;
58760
58669
  paginationPath = ancestors.filter(
58761
- (ancestor) => !Array.isArray(ancestor) && ancestor.kind === graphql12.Kind.FIELD
58670
+ (ancestor) => !Array.isArray(ancestor) && ancestor.kind === graphql13.Kind.FIELD
58762
58671
  ).concat(node).map((field) => field.alias?.value || field.name.value);
58763
58672
  return {
58764
58673
  ...node,
@@ -58777,7 +58686,7 @@ async function paginate(config, documents) {
58777
58686
  let fragment2 = "";
58778
58687
  let paginateMode = config.defaultPaginateMode;
58779
58688
  const requiredArgs = [];
58780
- doc.document = graphql12.visit(doc.document, {
58689
+ doc.document = graphql13.visit(doc.document, {
58781
58690
  OperationDefinition(node) {
58782
58691
  if (node.operation !== "query") {
58783
58692
  throw new HoudiniError({
@@ -58836,9 +58745,9 @@ async function paginate(config, documents) {
58836
58745
  directives: [
58837
58746
  ...node.directives || [],
58838
58747
  {
58839
- kind: graphql12.Kind.DIRECTIVE,
58748
+ kind: graphql13.Kind.DIRECTIVE,
58840
58749
  name: {
58841
- kind: graphql12.Kind.NAME,
58750
+ kind: graphql13.Kind.NAME,
58842
58751
  value: config.argumentsDirective
58843
58752
  }
58844
58753
  }
@@ -58908,22 +58817,22 @@ async function paginate(config, documents) {
58908
58817
  const paginationArgs = Object.entries(flags).filter(([_, { enabled }]) => enabled).map(([key, value]) => ({ name: key, ...value }));
58909
58818
  const fragmentSpreadSelection = [
58910
58819
  {
58911
- kind: graphql12.Kind.FRAGMENT_SPREAD,
58820
+ kind: graphql13.Kind.FRAGMENT_SPREAD,
58912
58821
  name: {
58913
- kind: graphql12.Kind.NAME,
58822
+ kind: graphql13.Kind.NAME,
58914
58823
  value: fragmentName
58915
58824
  },
58916
58825
  directives: [
58917
58826
  {
58918
- kind: graphql12.Kind.DIRECTIVE,
58827
+ kind: graphql13.Kind.DIRECTIVE,
58919
58828
  name: {
58920
- kind: graphql12.Kind.NAME,
58829
+ kind: graphql13.Kind.NAME,
58921
58830
  value: config.withDirective
58922
58831
  },
58923
58832
  ["arguments"]: requiredArgs.map((arg) => variableAsArgument(arg.name)).concat(paginationArgs.map(({ name }) => variableAsArgument(name)))
58924
58833
  },
58925
58834
  {
58926
- kind: graphql12.Kind.DIRECTIVE,
58835
+ kind: graphql13.Kind.DIRECTIVE,
58927
58836
  name: {
58928
58837
  kind: "Name",
58929
58838
  value: config.maskDisableDirective
@@ -58950,23 +58859,23 @@ async function paginate(config, documents) {
58950
58859
  });
58951
58860
  const typeConfig = config.typeConfig?.[fragment2];
58952
58861
  const queryDoc = {
58953
- kind: graphql12.Kind.DOCUMENT,
58862
+ kind: graphql13.Kind.DOCUMENT,
58954
58863
  definitions: [
58955
58864
  {
58956
- kind: graphql12.Kind.OPERATION_DEFINITION,
58865
+ kind: graphql13.Kind.OPERATION_DEFINITION,
58957
58866
  name: {
58958
- kind: graphql12.Kind.NAME,
58867
+ kind: graphql13.Kind.NAME,
58959
58868
  value: refetchQueryName
58960
58869
  },
58961
58870
  operation: "query",
58962
58871
  variableDefinitions: requiredArgs.map(
58963
58872
  (arg) => ({
58964
- kind: graphql12.Kind.VARIABLE_DEFINITION,
58873
+ kind: graphql13.Kind.VARIABLE_DEFINITION,
58965
58874
  type: arg.type,
58966
58875
  variable: {
58967
- kind: graphql12.Kind.VARIABLE,
58876
+ kind: graphql13.Kind.VARIABLE,
58968
58877
  name: {
58969
- kind: graphql12.Kind.NAME,
58878
+ kind: graphql13.Kind.NAME,
58970
58879
  value: arg.name
58971
58880
  }
58972
58881
  }
@@ -58974,18 +58883,18 @@ async function paginate(config, documents) {
58974
58883
  ).concat(
58975
58884
  paginationArgs.map(
58976
58885
  (arg) => ({
58977
- kind: graphql12.Kind.VARIABLE_DEFINITION,
58886
+ kind: graphql13.Kind.VARIABLE_DEFINITION,
58978
58887
  type: {
58979
- kind: graphql12.Kind.NAMED_TYPE,
58888
+ kind: graphql13.Kind.NAMED_TYPE,
58980
58889
  name: {
58981
- kind: graphql12.Kind.NAME,
58890
+ kind: graphql13.Kind.NAME,
58982
58891
  value: arg.type
58983
58892
  }
58984
58893
  },
58985
58894
  variable: {
58986
- kind: graphql12.Kind.VARIABLE,
58895
+ kind: graphql13.Kind.VARIABLE,
58987
58896
  name: {
58988
- kind: graphql12.Kind.NAME,
58897
+ kind: graphql13.Kind.NAME,
58989
58898
  value: arg.name
58990
58899
  }
58991
58900
  },
@@ -58997,12 +58906,12 @@ async function paginate(config, documents) {
58997
58906
  ).concat(
58998
58907
  !nodeQuery ? [] : keys2.map(
58999
58908
  (key) => ({
59000
- kind: graphql12.Kind.VARIABLE_DEFINITION,
58909
+ kind: graphql13.Kind.VARIABLE_DEFINITION,
59001
58910
  type: key.type,
59002
58911
  variable: {
59003
- kind: graphql12.Kind.VARIABLE,
58912
+ kind: graphql13.Kind.VARIABLE,
59004
58913
  name: {
59005
- kind: graphql12.Kind.NAME,
58914
+ kind: graphql13.Kind.NAME,
59006
58915
  value: key.name
59007
58916
  }
59008
58917
  }
@@ -59011,42 +58920,42 @@ async function paginate(config, documents) {
59011
58920
  )
59012
58921
  ),
59013
58922
  selectionSet: {
59014
- kind: graphql12.Kind.SELECTION_SET,
58923
+ kind: graphql13.Kind.SELECTION_SET,
59015
58924
  selections: !nodeQuery ? fragmentSpreadSelection : [
59016
58925
  {
59017
- kind: graphql12.Kind.FIELD,
58926
+ kind: graphql13.Kind.FIELD,
59018
58927
  name: {
59019
- kind: graphql12.Kind.NAME,
58928
+ kind: graphql13.Kind.NAME,
59020
58929
  value: typeConfig?.resolve?.queryField || "node"
59021
58930
  },
59022
58931
  ["arguments"]: keys2.map((key) => ({
59023
- kind: graphql12.Kind.ARGUMENT,
58932
+ kind: graphql13.Kind.ARGUMENT,
59024
58933
  name: {
59025
- kind: graphql12.Kind.NAME,
58934
+ kind: graphql13.Kind.NAME,
59026
58935
  value: key.name
59027
58936
  },
59028
58937
  value: {
59029
- kind: graphql12.Kind.VARIABLE,
58938
+ kind: graphql13.Kind.VARIABLE,
59030
58939
  name: {
59031
- kind: graphql12.Kind.NAME,
58940
+ kind: graphql13.Kind.NAME,
59032
58941
  value: key.name
59033
58942
  }
59034
58943
  }
59035
58944
  })),
59036
58945
  selectionSet: {
59037
- kind: graphql12.Kind.SELECTION_SET,
58946
+ kind: graphql13.Kind.SELECTION_SET,
59038
58947
  selections: [
59039
58948
  {
59040
- kind: graphql12.Kind.FIELD,
58949
+ kind: graphql13.Kind.FIELD,
59041
58950
  name: {
59042
- kind: graphql12.Kind.NAME,
58951
+ kind: graphql13.Kind.NAME,
59043
58952
  value: "__typename"
59044
58953
  }
59045
58954
  },
59046
58955
  ...(typeConfig?.keys || [config.defaultKeys[0]]).map((key) => ({
59047
- kind: graphql12.Kind.FIELD,
58956
+ kind: graphql13.Kind.FIELD,
59048
58957
  name: {
59049
- kind: graphql12.Kind.NAME,
58958
+ kind: graphql13.Kind.NAME,
59050
58959
  value: key
59051
58960
  }
59052
58961
  })),
@@ -59103,15 +59012,15 @@ function replaceArgumentsWithVariables(args, flags) {
59103
59012
  }
59104
59013
  function variableAsArgument(name, variable) {
59105
59014
  return {
59106
- kind: graphql12.Kind.ARGUMENT,
59015
+ kind: graphql13.Kind.ARGUMENT,
59107
59016
  name: {
59108
- kind: graphql12.Kind.NAME,
59017
+ kind: graphql13.Kind.NAME,
59109
59018
  value: name
59110
59019
  },
59111
59020
  value: {
59112
- kind: graphql12.Kind.VARIABLE,
59021
+ kind: graphql13.Kind.VARIABLE,
59113
59022
  name: {
59114
- kind: graphql12.Kind.NAME,
59023
+ kind: graphql13.Kind.NAME,
59115
59024
  value: variable ?? name
59116
59025
  }
59117
59026
  }
@@ -59119,18 +59028,18 @@ function variableAsArgument(name, variable) {
59119
59028
  }
59120
59029
  function staticVariableDefinition(name, type, defaultValue, variableName) {
59121
59030
  return {
59122
- kind: graphql12.Kind.VARIABLE_DEFINITION,
59031
+ kind: graphql13.Kind.VARIABLE_DEFINITION,
59123
59032
  type: {
59124
- kind: graphql12.Kind.NAMED_TYPE,
59033
+ kind: graphql13.Kind.NAMED_TYPE,
59125
59034
  name: {
59126
- kind: graphql12.Kind.NAME,
59035
+ kind: graphql13.Kind.NAME,
59127
59036
  value: type
59128
59037
  }
59129
59038
  },
59130
59039
  variable: {
59131
- kind: graphql12.Kind.VARIABLE,
59040
+ kind: graphql13.Kind.VARIABLE,
59132
59041
  name: {
59133
- kind: graphql12.Kind.NAME,
59042
+ kind: graphql13.Kind.NAME,
59134
59043
  value: variableName ?? name
59135
59044
  }
59136
59045
  },
@@ -59142,9 +59051,9 @@ function staticVariableDefinition(name, type, defaultValue, variableName) {
59142
59051
  }
59143
59052
  function argumentNode(name, value) {
59144
59053
  return {
59145
- kind: graphql12.Kind.ARGUMENT,
59054
+ kind: graphql13.Kind.ARGUMENT,
59146
59055
  name: {
59147
- kind: graphql12.Kind.NAME,
59056
+ kind: graphql13.Kind.NAME,
59148
59057
  value: name
59149
59058
  },
59150
59059
  value: objectNode(value)
@@ -59152,16 +59061,16 @@ function argumentNode(name, value) {
59152
59061
  }
59153
59062
  function objectNode([type, defaultValue]) {
59154
59063
  const node = {
59155
- kind: graphql12.Kind.OBJECT,
59064
+ kind: graphql13.Kind.OBJECT,
59156
59065
  fields: [
59157
59066
  {
59158
- kind: graphql12.Kind.OBJECT_FIELD,
59067
+ kind: graphql13.Kind.OBJECT_FIELD,
59159
59068
  name: {
59160
- kind: graphql12.Kind.NAME,
59069
+ kind: graphql13.Kind.NAME,
59161
59070
  value: "type"
59162
59071
  },
59163
59072
  value: {
59164
- kind: graphql12.Kind.STRING,
59073
+ kind: graphql13.Kind.STRING,
59165
59074
  value: type
59166
59075
  }
59167
59076
  }
@@ -59169,8 +59078,8 @@ function objectNode([type, defaultValue]) {
59169
59078
  };
59170
59079
  if (defaultValue) {
59171
59080
  node.fields.push({
59172
- kind: graphql12.Kind.OBJECT_FIELD,
59173
- name: { kind: graphql12.Kind.NAME, value: "default" },
59081
+ kind: graphql13.Kind.OBJECT_FIELD,
59082
+ name: { kind: graphql13.Kind.NAME, value: "default" },
59174
59083
  value: {
59175
59084
  kind: typeof defaultValue === "number" ? "IntValue" : "StringValue",
59176
59085
  value: defaultValue.toString()
@@ -59181,34 +59090,34 @@ function objectNode([type, defaultValue]) {
59181
59090
  }
59182
59091
  var pageInfoSelection = [
59183
59092
  {
59184
- kind: graphql12.Kind.FIELD,
59093
+ kind: graphql13.Kind.FIELD,
59185
59094
  name: {
59186
- kind: graphql12.Kind.NAME,
59095
+ kind: graphql13.Kind.NAME,
59187
59096
  value: "edges"
59188
59097
  },
59189
59098
  selectionSet: {
59190
- kind: graphql12.Kind.SELECTION_SET,
59099
+ kind: graphql13.Kind.SELECTION_SET,
59191
59100
  selections: [
59192
59101
  {
59193
- kind: graphql12.Kind.FIELD,
59102
+ kind: graphql13.Kind.FIELD,
59194
59103
  name: {
59195
- kind: graphql12.Kind.NAME,
59104
+ kind: graphql13.Kind.NAME,
59196
59105
  value: "cursor"
59197
59106
  }
59198
59107
  },
59199
59108
  {
59200
- kind: graphql12.Kind.FIELD,
59109
+ kind: graphql13.Kind.FIELD,
59201
59110
  name: {
59202
- kind: graphql12.Kind.NAME,
59111
+ kind: graphql13.Kind.NAME,
59203
59112
  value: "node"
59204
59113
  },
59205
59114
  selectionSet: {
59206
- kind: graphql12.Kind.SELECTION_SET,
59115
+ kind: graphql13.Kind.SELECTION_SET,
59207
59116
  selections: [
59208
59117
  {
59209
- kind: graphql12.Kind.FIELD,
59118
+ kind: graphql13.Kind.FIELD,
59210
59119
  name: {
59211
- kind: graphql12.Kind.NAME,
59120
+ kind: graphql13.Kind.NAME,
59212
59121
  value: "__typename"
59213
59122
  }
59214
59123
  }
@@ -59219,39 +59128,39 @@ var pageInfoSelection = [
59219
59128
  }
59220
59129
  },
59221
59130
  {
59222
- kind: graphql12.Kind.FIELD,
59131
+ kind: graphql13.Kind.FIELD,
59223
59132
  name: {
59224
- kind: graphql12.Kind.NAME,
59133
+ kind: graphql13.Kind.NAME,
59225
59134
  value: "pageInfo"
59226
59135
  },
59227
59136
  selectionSet: {
59228
- kind: graphql12.Kind.SELECTION_SET,
59137
+ kind: graphql13.Kind.SELECTION_SET,
59229
59138
  selections: [
59230
59139
  {
59231
- kind: graphql12.Kind.FIELD,
59140
+ kind: graphql13.Kind.FIELD,
59232
59141
  name: {
59233
- kind: graphql12.Kind.NAME,
59142
+ kind: graphql13.Kind.NAME,
59234
59143
  value: "hasPreviousPage"
59235
59144
  }
59236
59145
  },
59237
59146
  {
59238
- kind: graphql12.Kind.FIELD,
59147
+ kind: graphql13.Kind.FIELD,
59239
59148
  name: {
59240
- kind: graphql12.Kind.NAME,
59149
+ kind: graphql13.Kind.NAME,
59241
59150
  value: "hasNextPage"
59242
59151
  }
59243
59152
  },
59244
59153
  {
59245
- kind: graphql12.Kind.FIELD,
59154
+ kind: graphql13.Kind.FIELD,
59246
59155
  name: {
59247
- kind: graphql12.Kind.NAME,
59156
+ kind: graphql13.Kind.NAME,
59248
59157
  value: "startCursor"
59249
59158
  }
59250
59159
  },
59251
59160
  {
59252
- kind: graphql12.Kind.FIELD,
59161
+ kind: graphql13.Kind.FIELD,
59253
59162
  name: {
59254
- kind: graphql12.Kind.NAME,
59163
+ kind: graphql13.Kind.NAME,
59255
59164
  value: "endCursor"
59256
59165
  }
59257
59166
  }
@@ -59265,17 +59174,17 @@ async function addListFragments(config, documents) {
59265
59174
  const lists = {};
59266
59175
  const errors = [];
59267
59176
  for (const doc of documents) {
59268
- doc.document = graphql13.visit(doc.document, {
59177
+ doc.document = graphql14.visit(doc.document, {
59269
59178
  Directive(node, key, parent2, path2, ancestors) {
59270
59179
  if ([config.listDirective, config.paginateDirective].includes(node.name.value)) {
59271
59180
  const nameArg = node.arguments?.find(
59272
59181
  (arg) => arg.name.value === config.listOrPaginateNameArg
59273
59182
  );
59274
59183
  let error = {
59275
- ...new graphql13.GraphQLError(
59184
+ ...new graphql14.GraphQLError(
59276
59185
  "",
59277
59186
  node,
59278
- new graphql13.Source(""),
59187
+ new graphql14.Source(""),
59279
59188
  node.loc ? [node.loc.start, node.loc.end] : null,
59280
59189
  path2
59281
59190
  ),
@@ -59327,7 +59236,7 @@ async function addListFragments(config, documents) {
59327
59236
  {
59328
59237
  kind: "Argument",
59329
59238
  name: {
59330
- kind: graphql13.Kind.NAME,
59239
+ kind: graphql14.Kind.NAME,
59331
59240
  value: "connection"
59332
59241
  },
59333
59242
  value: {
@@ -59377,7 +59286,7 @@ async function addListFragments(config, documents) {
59377
59286
  const validDeletes = [
59378
59287
  ...new Set(
59379
59288
  Object.values(lists).map(({ type }) => {
59380
- if (!(type instanceof graphql13.GraphQLObjectType)) {
59289
+ if (!(type instanceof graphql14.GraphQLObjectType)) {
59381
59290
  return "";
59382
59291
  }
59383
59292
  if (config.keyFieldsForType(type.name).length !== 1) {
@@ -59391,7 +59300,7 @@ async function addListFragments(config, documents) {
59391
59300
  return;
59392
59301
  }
59393
59302
  const generatedDoc = {
59394
- kind: graphql13.Kind.DOCUMENT,
59303
+ kind: graphql14.Kind.DOCUMENT,
59395
59304
  definitions: Object.entries(lists).flatMap(
59396
59305
  ([name, { selection, type }]) => {
59397
59306
  const schemaType = config.schema.getType(type.name);
@@ -59399,7 +59308,7 @@ async function addListFragments(config, documents) {
59399
59308
  throw new HoudiniError({ message: "Lists must have a selection" });
59400
59309
  }
59401
59310
  const fragmentSelection = {
59402
- kind: graphql13.Kind.SELECTION_SET,
59311
+ kind: graphql14.Kind.SELECTION_SET,
59403
59312
  selections: [...selection.selections]
59404
59313
  };
59405
59314
  if (schemaType && fragmentSelection && !fragmentSelection?.selections.find(
@@ -59414,14 +59323,14 @@ async function addListFragments(config, documents) {
59414
59323
  {
59415
59324
  name: {
59416
59325
  value: config.listInsertFragment(name),
59417
- kind: graphql13.Kind.NAME
59326
+ kind: graphql14.Kind.NAME
59418
59327
  },
59419
- kind: graphql13.Kind.FRAGMENT_DEFINITION,
59328
+ kind: graphql14.Kind.FRAGMENT_DEFINITION,
59420
59329
  selectionSet: fragmentSelection,
59421
59330
  typeCondition: {
59422
- kind: graphql13.Kind.NAMED_TYPE,
59331
+ kind: graphql14.Kind.NAMED_TYPE,
59423
59332
  name: {
59424
- kind: graphql13.Kind.NAME,
59333
+ kind: graphql14.Kind.NAME,
59425
59334
  value: type.name
59426
59335
  }
59427
59336
  }
@@ -59429,32 +59338,32 @@ async function addListFragments(config, documents) {
59429
59338
  {
59430
59339
  name: {
59431
59340
  value: config.listToggleFragment(name),
59432
- kind: graphql13.Kind.NAME
59341
+ kind: graphql14.Kind.NAME
59433
59342
  },
59434
- kind: graphql13.Kind.FRAGMENT_DEFINITION,
59343
+ kind: graphql14.Kind.FRAGMENT_DEFINITION,
59435
59344
  selectionSet: fragmentSelection,
59436
59345
  typeCondition: {
59437
- kind: graphql13.Kind.NAMED_TYPE,
59346
+ kind: graphql14.Kind.NAMED_TYPE,
59438
59347
  name: {
59439
- kind: graphql13.Kind.NAME,
59348
+ kind: graphql14.Kind.NAME,
59440
59349
  value: type.name
59441
59350
  }
59442
59351
  }
59443
59352
  },
59444
59353
  {
59445
- kind: graphql13.Kind.FRAGMENT_DEFINITION,
59354
+ kind: graphql14.Kind.FRAGMENT_DEFINITION,
59446
59355
  name: {
59447
59356
  value: config.listRemoveFragment(name),
59448
- kind: graphql13.Kind.NAME
59357
+ kind: graphql14.Kind.NAME
59449
59358
  },
59450
59359
  selectionSet: {
59451
- kind: graphql13.Kind.SELECTION_SET,
59360
+ kind: graphql14.Kind.SELECTION_SET,
59452
59361
  selections: [...objectIdentificationSelection(config, type)]
59453
59362
  },
59454
59363
  typeCondition: {
59455
- kind: graphql13.Kind.NAMED_TYPE,
59364
+ kind: graphql14.Kind.NAMED_TYPE,
59456
59365
  name: {
59457
- kind: graphql13.Kind.NAME,
59366
+ kind: graphql14.Kind.NAME,
59458
59367
  value: type.name
59459
59368
  }
59460
59369
  }
@@ -59463,14 +59372,14 @@ async function addListFragments(config, documents) {
59463
59372
  }
59464
59373
  ).concat(
59465
59374
  ...validDeletes.map((typeName) => ({
59466
- kind: graphql13.Kind.DIRECTIVE_DEFINITION,
59375
+ kind: graphql14.Kind.DIRECTIVE_DEFINITION,
59467
59376
  name: {
59468
- kind: graphql13.Kind.NAME,
59377
+ kind: graphql14.Kind.NAME,
59469
59378
  value: config.listDeleteDirective(typeName)
59470
59379
  },
59471
59380
  locations: [
59472
59381
  {
59473
- kind: graphql13.Kind.NAME,
59382
+ kind: graphql14.Kind.NAME,
59474
59383
  value: "FIELD"
59475
59384
  }
59476
59385
  ],
@@ -59478,8 +59387,8 @@ async function addListFragments(config, documents) {
59478
59387
  }))
59479
59388
  )
59480
59389
  };
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");
59390
+ config.newSchema += "\n" + generatedDoc.definitions.filter((c) => c.kind !== "FragmentDefinition").map(graphql14.print).join("\n\n");
59391
+ config.newDocuments += "\n" + generatedDoc.definitions.filter((c) => c.kind === "FragmentDefinition").map(graphql14.print).join("\n\n");
59483
59392
  documents.push({
59484
59393
  name: "generated::lists",
59485
59394
  kind: ArtifactKind.Fragment,
@@ -59565,11 +59474,11 @@ var nodeNotDefinedMessage = (config) => `Looks like you are trying to use the ${
59565
59474
  For more information, visit this link: ${siteURL}/guides/pagination`;
59566
59475
 
59567
59476
  // src/codegen/generators/artifacts/fieldKey.ts
59568
- var graphql14 = __toESM(require("graphql"), 1);
59477
+ var graphql15 = __toESM(require("graphql"), 1);
59569
59478
  function fieldKey(config, field) {
59570
59479
  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];
59480
+ const printed = graphql15.print(field);
59481
+ const secondParse = graphql15.parse(`{${printed}}`).definitions[0].selectionSet.selections[0];
59573
59482
  let paginateMode = config.defaultPaginateMode;
59574
59483
  const paginatedDirective = field.directives?.find(
59575
59484
  (directive) => directive.name.value === config.paginateDirective
@@ -59692,13 +59601,13 @@ function prepareSelection({
59692
59601
  } else if ("getFields" in type) {
59693
59602
  let typeRef = type.getFields()[field.name.value].type;
59694
59603
  fieldType = getRootType(typeRef);
59695
- nullable = !graphql15.isNonNullType(typeRef);
59696
- } else if (graphql15.isAbstractType(type)) {
59604
+ nullable = !graphql16.isNonNullType(typeRef);
59605
+ } else if (graphql16.isAbstractType(type)) {
59697
59606
  for (const possible of config.schema.getPossibleTypes(type)) {
59698
- if (graphql15.isObjectType(possible)) {
59607
+ if (graphql16.isObjectType(possible)) {
59699
59608
  if (possible.getFields()[field.name.value]) {
59700
59609
  fieldType = possible.getFields()[field.name.value].type;
59701
- nullable = !graphql15.isNonNullType(fieldType);
59610
+ nullable = !graphql16.isNonNullType(fieldType);
59702
59611
  break;
59703
59612
  }
59704
59613
  }
@@ -59835,7 +59744,7 @@ function prepareSelection({
59835
59744
  kind: "value"
59836
59745
  } : { kind: "continue" };
59837
59746
  const parentType = config.schema.getType(rootType);
59838
- if (graphql15.isObjectType(parentType) || graphql15.isInterfaceType(parentType)) {
59747
+ if (graphql16.isObjectType(parentType) || graphql16.isInterfaceType(parentType)) {
59839
59748
  const fieldType2 = parentType.getFields()[field.name.value]?.type;
59840
59749
  if (fieldType2) {
59841
59750
  const listCount = unwrapType(config, fieldType2).wrappers.filter(
@@ -59858,7 +59767,7 @@ function prepareSelection({
59858
59767
  }
59859
59768
  fieldObj.loading = loadingValue;
59860
59769
  }
59861
- if (graphql15.isInterfaceType(fieldType) || graphql15.isUnionType(fieldType)) {
59770
+ if (graphql16.isInterfaceType(fieldType) || graphql16.isUnionType(fieldType)) {
59862
59771
  fieldObj.abstract = true;
59863
59772
  if (Object.values(fieldObj.selection?.abstractFields?.fields ?? {}).some(
59864
59773
  (fields) => Object.values(fields ?? {}).some((field2) => field2.required)
@@ -59940,7 +59849,7 @@ function mergeSelection({
59940
59849
  typeSelection,
59941
59850
  abstractSelection.fields[typeName] ?? {}
59942
59851
  );
59943
- if (graphql15.isAbstractType(gqlType)) {
59852
+ if (graphql16.isAbstractType(gqlType)) {
59944
59853
  for (const possible of config.schema.getPossibleTypes(gqlType)) {
59945
59854
  if (!possibleSelectionTypes[typeName]) {
59946
59855
  possibleSelectionTypes[typeName] = [];
@@ -59975,7 +59884,7 @@ function mergeSelection({
59975
59884
  }
59976
59885
  }
59977
59886
  const parentType = config.schema.getType(rootType);
59978
- const possibleParents = graphql15.isAbstractType(parentType) ? config.schema.getPossibleTypes(parentType)?.map((t2) => t2.name) : [parentType.name];
59887
+ const possibleParents = graphql16.isAbstractType(parentType) ? config.schema.getPossibleTypes(parentType)?.map((t2) => t2.name) : [parentType.name];
59979
59888
  for (const key of Object.keys(abstractSelection.typeMap)) {
59980
59889
  if (!possibleParents.includes(key) && rootType !== key || abstractSelection.fields[key]) {
59981
59890
  delete abstractSelection.typeMap[key];
@@ -60032,12 +59941,12 @@ function mergeSelection({
60032
59941
  }
60033
59942
 
60034
59943
  // src/codegen/generators/artifacts/index.ts
60035
- var AST4 = recast4.types.builders;
59944
+ var AST5 = recast5.types.builders;
60036
59945
  function artifactGenerator(stats) {
60037
59946
  return async function(config, docs) {
60038
59947
  const filterTypes = {};
60039
59948
  for (const doc of docs) {
60040
- graphql16.visit(doc.document, {
59949
+ graphql17.visit(doc.document, {
60041
59950
  Directive(node, _, __, ___, ancestors) {
60042
59951
  if (node.name.value !== config.listDirective) {
60043
59952
  return;
@@ -60097,7 +60006,7 @@ function artifactGenerator(stats) {
60097
60006
  return;
60098
60007
  }
60099
60008
  const usedVariableNames = /* @__PURE__ */ new Set();
60100
- let documentWithoutInternalDirectives = graphql16.visit(document, {
60009
+ let documentWithoutInternalDirectives = graphql17.visit(document, {
60101
60010
  Directive(node) {
60102
60011
  if (config.isInternalDirective(node.name.value)) {
60103
60012
  return null;
@@ -60110,7 +60019,7 @@ function artifactGenerator(stats) {
60110
60019
  }
60111
60020
  }
60112
60021
  });
60113
- let documentWithoutExtraVariables = graphql16.visit(
60022
+ let documentWithoutExtraVariables = graphql17.visit(
60114
60023
  documentWithoutInternalDirectives,
60115
60024
  {
60116
60025
  VariableDefinition(variableDefinitionNode) {
@@ -60121,13 +60030,13 @@ function artifactGenerator(stats) {
60121
60030
  }
60122
60031
  }
60123
60032
  );
60124
- let rawString = graphql16.print(documentWithoutExtraVariables);
60033
+ let rawString = graphql17.print(documentWithoutExtraVariables);
60125
60034
  let docKind = doc.kind;
60126
60035
  const operations = document.definitions.filter(
60127
- ({ kind }) => kind === graphql16.Kind.OPERATION_DEFINITION
60036
+ ({ kind }) => kind === graphql17.Kind.OPERATION_DEFINITION
60128
60037
  );
60129
60038
  const fragments = document.definitions.filter(
60130
- ({ kind }) => kind === graphql16.Kind.FRAGMENT_DEFINITION
60039
+ ({ kind }) => kind === graphql17.Kind.FRAGMENT_DEFINITION
60131
60040
  );
60132
60041
  let rootType = "";
60133
60042
  let selectionSet;
@@ -60327,9 +60236,9 @@ function artifactGenerator(stats) {
60327
60236
  plugin2.artifactEnd({ config, document: doc });
60328
60237
  }
60329
60238
  const _houdiniHash = hashOriginal({ document: doc });
60330
- const file = AST4.program([
60239
+ const file = AST5.program([
60331
60240
  moduleExport(config, "default", serializeValue(artifact)),
60332
- AST4.expressionStatement(AST4.stringLiteral(`HoudiniHash=${_houdiniHash}`))
60241
+ AST5.expressionStatement(AST5.stringLiteral(`HoudiniHash=${_houdiniHash}`))
60333
60242
  ]);
60334
60243
  const artifactPath = config.artifactPath(document);
60335
60244
  const countDocument = doc.generateStore;
@@ -60387,7 +60296,7 @@ function applyMask(config, target, mask) {
60387
60296
  if (!targetType) {
60388
60297
  continue;
60389
60298
  }
60390
- if (graphql16.isAbstractType(targetType)) {
60299
+ if (graphql17.isAbstractType(targetType)) {
60391
60300
  for (const possible of config.schema.getPossibleTypes(targetType)) {
60392
60301
  if (target.abstractFields?.fields[possible.name]) {
60393
60302
  applyMask(
@@ -60410,8 +60319,8 @@ function applyMask(config, target, mask) {
60410
60319
  }
60411
60320
 
60412
60321
  // src/codegen/generators/runtime/graphqlFunction.ts
60413
- var recast5 = __toESM(require_main2(), 1);
60414
- var AST5 = recast5.types.builders;
60322
+ var recast6 = __toESM(require_main2(), 1);
60323
+ var AST6 = recast6.types.builders;
60415
60324
  async function generateGraphqlReturnTypes(config, docs) {
60416
60325
  const indexPath = path_exports.join(config.runtimeDirectory, "index.d.ts");
60417
60326
  const fileContent = await fs_exports.readFile(indexPath) || "";
@@ -60446,18 +60355,18 @@ async function generateGraphqlReturnTypes(config, docs) {
60446
60355
  continue;
60447
60356
  }
60448
60357
  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))
60358
+ const input = AST6.identifier("str");
60359
+ input.typeAnnotation = AST6.tsTypeAnnotation(
60360
+ AST6.tsLiteralType(AST6.stringLiteral(queryString))
60452
60361
  );
60453
60362
  script.body.splice(
60454
60363
  i,
60455
60364
  0,
60456
- AST5.exportNamedDeclaration(
60457
- AST5.tsDeclareFunction(
60458
- AST5.identifier("graphql"),
60365
+ AST6.exportNamedDeclaration(
60366
+ AST6.tsDeclareFunction(
60367
+ AST6.identifier("graphql"),
60459
60368
  [input],
60460
- AST5.tsTypeAnnotation(AST5.tsTypeReference(AST5.identifier(returnValue)))
60369
+ AST6.tsTypeAnnotation(AST6.tsTypeReference(AST6.identifier(returnValue)))
60461
60370
  )
60462
60371
  )
60463
60372
  );
@@ -60632,165 +60541,22 @@ function moduleStatments(config) {
60632
60541
  var recast11 = __toESM(require_main2(), 1);
60633
60542
 
60634
60543
  // 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
60544
  var graphql18 = __toESM(require("graphql"), 1);
60640
60545
  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
60546
  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
60547
  function addReferencedInputTypes(config, filepath, body, visitedTypes, missingScalars, rootType) {
60782
60548
  const { type } = unwrapType(config, rootType);
60783
- if (graphql19.isScalarType(type)) {
60549
+ if (graphql18.isScalarType(type)) {
60784
60550
  return;
60785
60551
  }
60786
60552
  if (visitedTypes.has(type.name)) {
60787
60553
  return;
60788
60554
  }
60789
- if (graphql19.isUnionType(type)) {
60555
+ if (graphql18.isUnionType(type)) {
60790
60556
  throw new HoudiniError({ filepath, message: "Input Unions are not supported yet. Sorry!" });
60791
60557
  }
60792
60558
  visitedTypes.add(type.name);
60793
- if (graphql19.isEnumType(type)) {
60559
+ if (graphql18.isEnumType(type)) {
60794
60560
  ensureImports({
60795
60561
  config,
60796
60562
  body,
@@ -60804,21 +60570,37 @@ function addReferencedInputTypes(config, filepath, body, visitedTypes, missingSc
60804
60570
  for (const field of Object.values(type.getFields())) {
60805
60571
  addReferencedInputTypes(config, filepath, body, visitedTypes, missingScalars, field.type);
60806
60572
  members.push(
60807
- AST8.tsPropertySignature(
60808
- AST8.identifier(field.name),
60809
- AST8.tsTypeAnnotation(
60573
+ AST7.tsPropertySignature(
60574
+ AST7.identifier(field.name),
60575
+ AST7.tsTypeAnnotation(
60810
60576
  tsTypeReference(config, filepath, missingScalars, field, body)
60811
60577
  ),
60812
- graphql19.isNullableType(field.type)
60578
+ graphql18.isNullableType(field.type)
60813
60579
  )
60814
60580
  );
60815
60581
  }
60816
- body.push(AST8.tsTypeAliasDeclaration(AST8.identifier(type.name), AST8.tsTypeLiteral(members)));
60582
+ body.push(AST7.tsTypeAliasDeclaration(AST7.identifier(type.name), AST7.tsTypeLiteral(members)));
60817
60583
  }
60818
60584
 
60819
60585
  // src/codegen/generators/typescript/inlineType.ts
60820
- var graphql20 = __toESM(require("graphql"), 1);
60586
+ var graphql19 = __toESM(require("graphql"), 1);
60821
60587
  var recast9 = __toESM(require_main2(), 1);
60588
+
60589
+ // src/codegen/generators/comments/jsdoc.ts
60590
+ var recast8 = __toESM(require_main2(), 1);
60591
+ var AST8 = recast8.types.builders;
60592
+ function jsdocComment(text, deprecated) {
60593
+ let commentContent = `*
60594
+ * ${text}
60595
+ `;
60596
+ if (deprecated) {
60597
+ commentContent = `${commentContent} * @deprecated ${deprecated}
60598
+ `;
60599
+ }
60600
+ return AST8.commentBlock(commentContent, true);
60601
+ }
60602
+
60603
+ // src/codegen/generators/typescript/inlineType.ts
60822
60604
  var AST9 = recast9.types.builders;
60823
60605
  var fragmentKey2 = " $fragments";
60824
60606
  function inlineType({
@@ -60839,7 +60621,7 @@ function inlineType({
60839
60621
  const { type, wrappers } = unwrapType(config, rootType);
60840
60622
  let result;
60841
60623
  let forceNullable = false;
60842
- if (graphql20.isScalarType(type)) {
60624
+ if (graphql19.isScalarType(type)) {
60843
60625
  result = scalarPropertyValue(
60844
60626
  config,
60845
60627
  filepath,
@@ -60848,7 +60630,7 @@ function inlineType({
60848
60630
  body,
60849
60631
  field
60850
60632
  );
60851
- } else if (graphql20.isEnumType(type)) {
60633
+ } else if (graphql19.isEnumType(type)) {
60852
60634
  ensureImports({
60853
60635
  config,
60854
60636
  body,
@@ -60873,11 +60655,11 @@ function inlineType({
60873
60655
  for (const selection of selections) {
60874
60656
  if (selection.kind === "InlineFragment" && selection.typeCondition) {
60875
60657
  const fragmentType = config.schema.getType(selection.typeCondition.name.value);
60876
- if (!graphql20.isInterfaceType(type) && !graphql20.isUnionType(type)) {
60658
+ if (!graphql19.isInterfaceType(type) && !graphql19.isUnionType(type)) {
60877
60659
  selectedFields.push(...selection.selectionSet.selections);
60878
60660
  continue;
60879
60661
  }
60880
- if (!graphql20.isInterfaceType(fragmentType) && !graphql20.isUnionType(fragmentType)) {
60662
+ if (!graphql19.isInterfaceType(fragmentType) && !graphql19.isUnionType(fragmentType)) {
60881
60663
  if (!inlineFragments[fragmentType.name]) {
60882
60664
  inlineFragments[fragmentType.name] = [];
60883
60665
  }
@@ -60969,6 +60751,11 @@ function inlineType({
60969
60751
  if (allOptional) {
60970
60752
  prop.optional = true;
60971
60753
  }
60754
+ if (field2.description || field2.deprecationReason) {
60755
+ prop.comments = [
60756
+ jsdocComment(field2.description ?? "", field2.deprecationReason ?? void 0)
60757
+ ];
60758
+ }
60972
60759
  return prop;
60973
60760
  })
60974
60761
  ]);
@@ -61020,7 +60807,7 @@ function inlineType({
61020
60807
  }
61021
60808
  }
61022
60809
  }
61023
- if (objectType.type === "TSTypeLiteral" && !graphql20.isInterfaceType(fragmentRootType) && !graphql20.isUnionType(fragmentRootType)) {
60810
+ if (objectType.type === "TSTypeLiteral" && !graphql19.isInterfaceType(fragmentRootType) && !graphql19.isUnionType(fragmentRootType)) {
61024
60811
  const existingTypenameIndex = objectType.members.findIndex(
61025
60812
  (member) => member.type === "TSPropertySignature" && member.key.type === "Identifier" && member.key.name === "__typename"
61026
60813
  );
@@ -61045,11 +60832,11 @@ function inlineType({
61045
60832
  ];
61046
60833
  }
61047
60834
  let coveredTypenames;
61048
- if (graphql20.isInterfaceType(fragmentRootType)) {
60835
+ if (graphql19.isInterfaceType(fragmentRootType)) {
61049
60836
  coveredTypenames = interfaceCoveredTypenames(fragmentRootType);
61050
- } else if (graphql20.isUnionType(fragmentRootType)) {
60837
+ } else if (graphql19.isUnionType(fragmentRootType)) {
61051
60838
  coveredTypenames = fragmentRootType.getTypes().map((type2) => type2.name);
61052
- } else if (graphql20.isObjectType(fragmentRootType)) {
60839
+ } else if (graphql19.isObjectType(fragmentRootType)) {
61053
60840
  coveredTypenames = [fragmentRootType.name];
61054
60841
  } else {
61055
60842
  throw Error("unreachable code");
@@ -61085,7 +60872,7 @@ function inlineType({
61085
60872
  );
61086
60873
  }
61087
60874
  );
61088
- const parentIsUnionOrInterface = !graphql20.isInterfaceType(type) && !graphql20.isUnionType(type);
60875
+ const parentIsUnionOrInterface = !graphql19.isInterfaceType(type) && !graphql19.isUnionType(type);
61089
60876
  const possibleTypenames = parentIsUnionOrInterface ? [parent.name] : config.schema.getPossibleTypes(type).map((type2) => type2.name);
61090
60877
  const coveredTypenames = new Set(
61091
60878
  Object.values(inlineFragmentSelections).flatMap((sel) => sel.coveredTypenames)
@@ -61152,7 +60939,7 @@ function selectionTypeInfo(schema, filepath, rootType, selection) {
61152
60939
  },
61153
60940
  type: schema.getType("String")
61154
60941
  };
61155
- } else if (graphql20.isNonNullType(rootType) && "getFields" in rootType.ofType) {
60942
+ } else if (graphql19.isNonNullType(rootType) && "getFields" in rootType.ofType) {
61156
60943
  fields = rootType.ofType.getFields();
61157
60944
  } else {
61158
60945
  fields = rootType.getFields();
@@ -61164,7 +60951,7 @@ function selectionTypeInfo(schema, filepath, rootType, selection) {
61164
60951
  message: `Could not find type information for field ${rootType.toString()}.${selectionName} ${field}`
61165
60952
  });
61166
60953
  }
61167
- const fieldType = graphql20.getNamedType(field.type);
60954
+ const fieldType = graphql19.getNamedType(field.type);
61168
60955
  if (!fieldType) {
61169
60956
  throw new HoudiniError({
61170
60957
  filepath,
@@ -61672,7 +61459,7 @@ async function generateFragmentTypeDefs(config, filepath, body, selections, defi
61672
61459
  }
61673
61460
 
61674
61461
  // src/codegen/generators/typescript/imperativeTypeDef.ts
61675
- var graphql21 = __toESM(require("graphql"), 1);
61462
+ var graphql20 = __toESM(require("graphql"), 1);
61676
61463
  var recast12 = __toESM(require_main2(), 1);
61677
61464
  var AST12 = recast12.types.builders;
61678
61465
  async function imperativeCacheTypef(config, docs) {
@@ -61724,7 +61511,7 @@ function typeDefinitions(config, filepath, body, docs, returnType) {
61724
61511
  const operationTypes = [config.schema.getMutationType(), config.schema.getSubscriptionType()].filter(Boolean).map((type) => type?.name);
61725
61512
  const visitedTypes = /* @__PURE__ */ new Set();
61726
61513
  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)
61514
+ (type) => !graphql20.isAbstractType(type) && !graphql20.isScalarType(type) && !graphql20.isEnumType(type) && !graphql20.isInputObjectType(type) && !type.name.startsWith("__") && !operationTypes.includes(type.name)
61728
61515
  );
61729
61516
  const fragmentMap = fragmentListMap(
61730
61517
  config,
@@ -61741,7 +61528,7 @@ function typeDefinitions(config, filepath, body, docs, returnType) {
61741
61528
  }
61742
61529
  let idFields = AST12.tsNeverKeyword();
61743
61530
  const keys2 = keyFieldsForType(config.configFile, type.name);
61744
- if (graphql21.isObjectType(type) && keys2.length > 0 && keys2.every((key) => type.getFields()[key])) {
61531
+ if (graphql20.isObjectType(type) && keys2.length > 0 && keys2.every((key) => type.getFields()[key])) {
61745
61532
  idFields = AST12.tsTypeLiteral(
61746
61533
  keys2.map((key) => {
61747
61534
  const fieldType = type.getFields()[key];
@@ -61768,13 +61555,13 @@ function typeDefinitions(config, filepath, body, docs, returnType) {
61768
61555
  idFields = AST12.tsTypeLiteral([]);
61769
61556
  }
61770
61557
  let fields = AST12.tsTypeLiteral([]);
61771
- if (graphql21.isObjectType(type)) {
61558
+ if (graphql20.isObjectType(type)) {
61772
61559
  fields = AST12.tsTypeLiteral(
61773
61560
  Object.entries(type.getFields()).map(
61774
61561
  ([key, fieldType]) => {
61775
61562
  const unwrapped = unwrapType(config, fieldType.type);
61776
61563
  let typeOptions = AST12.tsUnionType([]);
61777
- if (graphql21.isScalarType(unwrapped.type)) {
61564
+ if (graphql20.isScalarType(unwrapped.type)) {
61778
61565
  typeOptions.types.push(
61779
61566
  scalarPropertyValue(
61780
61567
  config,
@@ -61788,11 +61575,11 @@ function typeDefinitions(config, filepath, body, docs, returnType) {
61788
61575
  }
61789
61576
  )
61790
61577
  );
61791
- } else if (graphql21.isEnumType(unwrapped.type)) {
61578
+ } else if (graphql20.isEnumType(unwrapped.type)) {
61792
61579
  typeOptions.types.push(
61793
61580
  AST12.tsTypeReference(AST12.identifier(unwrapped.type.name))
61794
61581
  );
61795
- } else if (!graphql21.isAbstractType(unwrapped.type)) {
61582
+ } else if (!graphql20.isAbstractType(unwrapped.type)) {
61796
61583
  typeOptions.types.push(record(unwrapped.type.name));
61797
61584
  } else {
61798
61585
  typeOptions.types.push(
@@ -61888,7 +61675,7 @@ function listDefinitions(config, filepath, body, docs) {
61888
61675
  const lists = [];
61889
61676
  const visitedLists = /* @__PURE__ */ new Set();
61890
61677
  for (const doc of docs) {
61891
- graphql21.visit(doc.document, {
61678
+ graphql20.visit(doc.document, {
61892
61679
  Directive(node, key, parent2, path2, ancestors) {
61893
61680
  if (![config.listDirective, config.paginateDirective].includes(node.name.value)) {
61894
61681
  return;
@@ -61910,7 +61697,7 @@ function listDefinitions(config, filepath, body, docs) {
61910
61697
  const targetFieldDefinition = parentType.getFields()[targetField.name.value];
61911
61698
  const { type: listType } = unwrapType(config, targetFieldDefinition.type);
61912
61699
  const possibleTypes = [];
61913
- if (graphql21.isAbstractType(listType)) {
61700
+ if (graphql20.isAbstractType(listType)) {
61914
61701
  possibleTypes.push(
61915
61702
  ...config.schema.getPossibleTypes(listType).map((possible) => possible.name)
61916
61703
  );
@@ -62072,7 +61859,7 @@ async function typescriptGenerator(config, docs) {
62072
61859
  }
62073
61860
 
62074
61861
  // src/codegen/generators/persistedQueries/index.ts
62075
- var graphql22 = __toESM(require("graphql"), 1);
61862
+ var graphql21 = __toESM(require("graphql"), 1);
62076
61863
  async function persistOutputGenerator(config, docs) {
62077
61864
  if (!config.persistedQueriesPath.endsWith(".json")) {
62078
61865
  throw new Error('Can write Persisted Queries only in a ".json" file.');
@@ -62082,8 +61869,8 @@ async function persistOutputGenerator(config, docs) {
62082
61869
  if (!generateArtifact) {
62083
61870
  return acc;
62084
61871
  }
62085
- let rawString = graphql22.print(
62086
- graphql22.visit(document, {
61872
+ let rawString = graphql21.print(
61873
+ graphql21.visit(document, {
62087
61874
  Directive(node) {
62088
61875
  if (config.isInternalDirective(node.name.value)) {
62089
61876
  return null;
@@ -62092,7 +61879,7 @@ async function persistOutputGenerator(config, docs) {
62092
61879
  })
62093
61880
  );
62094
61881
  const operations = document.definitions.filter(
62095
- ({ kind }) => kind === graphql22.Kind.OPERATION_DEFINITION
61882
+ ({ kind }) => kind === graphql21.Kind.OPERATION_DEFINITION
62096
61883
  );
62097
61884
  if (operations.length > 0 && operations[0].kind === "OperationDefinition") {
62098
61885
  if (artifact) {
@@ -62107,33 +61894,45 @@ async function persistOutputGenerator(config, docs) {
62107
61894
  }
62108
61895
 
62109
61896
  // src/codegen/generators/definitions/index.ts
62110
- var graphql24 = __toESM(require("graphql"), 1);
61897
+ var graphql23 = __toESM(require("graphql"), 1);
62111
61898
 
62112
61899
  // src/codegen/generators/definitions/enums.ts
62113
- var graphql23 = __toESM(require("graphql"), 1);
61900
+ var graphql22 = __toESM(require("graphql"), 1);
62114
61901
  var recast13 = __toESM(require_main2(), 1);
62115
61902
  var AST13 = recast13.types.builders;
62116
61903
  async function definitionsGenerator(config) {
62117
- const enums = graphql23.parse(graphql23.printSchema(config.schema)).definitions.filter(
61904
+ const enums = graphql22.parse(graphql22.printSchema(config.schema)).definitions.filter(
62118
61905
  (definition) => definition.kind === "EnumTypeDefinition"
62119
61906
  ).filter((def) => !config.isInternalEnum(def));
62120
61907
  const { code: runtimeDefinitions } = await printJS(
62121
61908
  AST13.program(
62122
61909
  enums.map((defn) => {
62123
61910
  const name = defn.name.value;
62124
- return moduleExport(
61911
+ const declaration = moduleExport(
62125
61912
  config,
62126
61913
  name,
62127
61914
  AST13.objectExpression(
62128
61915
  defn.values?.map((value) => {
62129
61916
  const str = value.name.value;
62130
- return AST13.objectProperty(
61917
+ const prop = AST13.objectProperty(
62131
61918
  AST13.stringLiteral(str),
62132
61919
  AST13.stringLiteral(str)
62133
61920
  );
61921
+ const deprecationReason = value.directives?.find((d) => d.name.value === "deprecated")?.arguments?.find((a) => a.name.value === "reason")?.value?.value;
61922
+ if (value.description || deprecationReason)
61923
+ prop.comments = [
61924
+ jsdocComment(value.description?.value ?? "", deprecationReason)
61925
+ ];
61926
+ return prop;
62134
61927
  }) || []
62135
61928
  )
62136
61929
  );
61930
+ if (defn.description) {
61931
+ declaration.comments = [
61932
+ AST13.commentBlock(`* ${defn.description.value} `, true, false)
61933
+ ];
61934
+ }
61935
+ return declaration;
62137
61936
  })
62138
61937
  )
62139
61938
  );
@@ -62142,11 +61941,19 @@ type ValuesOf<T> = T[keyof T]
62142
61941
  ` + enums.sort((a, b) => a.name.value.localeCompare(b.name.value)).map((definition) => {
62143
61942
  const name = definition.name.value;
62144
61943
  const values = definition.values;
62145
- return `
61944
+ let jsdoc = "";
61945
+ if (definition.description) {
61946
+ jsdoc = `
61947
+ /** ${definition.description.value} */`;
61948
+ }
61949
+ return `${jsdoc}
62146
61950
  export declare const ${name}: {
62147
- ${values?.map((value) => ` readonly ${value.name.value}: "${value.name.value}";`).join("\n")}
61951
+ ${values?.map(
61952
+ (value) => (value.description ? ` /** ${value.description.value} */
61953
+ ` : "") + ` readonly ${value.name.value}: "${value.name.value}";`
61954
+ ).join("\n")}
62148
61955
  }
62149
-
61956
+ ${jsdoc}
62150
61957
  export type ${name}$options = ValuesOf<typeof ${name}>
62151
61958
  `;
62152
61959
  }).join("");
@@ -62166,7 +61973,7 @@ async function schemaGenerator(config) {
62166
61973
  await Promise.all([
62167
61974
  fs_exports.writeFile(
62168
61975
  config.definitionsSchemaPath,
62169
- config.localSchema ? graphql24.printSchema(config.schema) : config.newSchema
61976
+ config.localSchema ? graphql23.printSchema(config.schema) : config.newSchema
62170
61977
  ),
62171
61978
  fs_exports.writeFile(config.definitionsDocumentsPath, config.newDocuments),
62172
61979
  definitionsGenerator(config)
@@ -62211,7 +62018,7 @@ async function writeIndexFile2(config, docs) {
62211
62018
  }
62212
62019
 
62213
62020
  // ../../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");
62021
+ var import_graphql3 = require("graphql");
62215
62022
  function compareStrings(a, b) {
62216
62023
  if (String(a) < String(b)) {
62217
62024
  return -1;
@@ -62247,7 +62054,7 @@ function isSome(input) {
62247
62054
  }
62248
62055
 
62249
62056
  // ../../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");
62057
+ var import_graphql4 = require("graphql");
62251
62058
  var MAX_RECURSIVE_DEPTH = 3;
62252
62059
  function inspect(value) {
62253
62060
  return formatValue(value, []);
@@ -62265,7 +62072,7 @@ function formatValue(value, seenValues) {
62265
62072
  }
62266
62073
  }
62267
62074
  function formatError(value) {
62268
- if (value instanceof import_graphql3.GraphQLError) {
62075
+ if (value instanceof import_graphql4.GraphQLError) {
62269
62076
  return value.toString();
62270
62077
  }
62271
62078
  return `${value.name}: ${value.message};
@@ -62348,43 +62155,43 @@ function getDirectivesInExtensions(node, pathToDirectivesInExtensions = ["direct
62348
62155
  }
62349
62156
 
62350
62157
  // ../../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");
62158
+ var import_graphql8 = require("graphql");
62352
62159
 
62353
62160
  // ../../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");
62161
+ var import_graphql5 = require("graphql");
62355
62162
  function astFromType(type) {
62356
- if ((0, import_graphql4.isNonNullType)(type)) {
62163
+ if ((0, import_graphql5.isNonNullType)(type)) {
62357
62164
  const innerType = astFromType(type.ofType);
62358
- if (innerType.kind === import_graphql4.Kind.NON_NULL_TYPE) {
62165
+ if (innerType.kind === import_graphql5.Kind.NON_NULL_TYPE) {
62359
62166
  throw new Error(`Invalid type node ${inspect(type)}. Inner type of non-null type cannot be a non-null type.`);
62360
62167
  }
62361
62168
  return {
62362
- kind: import_graphql4.Kind.NON_NULL_TYPE,
62169
+ kind: import_graphql5.Kind.NON_NULL_TYPE,
62363
62170
  type: innerType
62364
62171
  };
62365
- } else if ((0, import_graphql4.isListType)(type)) {
62172
+ } else if ((0, import_graphql5.isListType)(type)) {
62366
62173
  return {
62367
- kind: import_graphql4.Kind.LIST_TYPE,
62174
+ kind: import_graphql5.Kind.LIST_TYPE,
62368
62175
  type: astFromType(type.ofType)
62369
62176
  };
62370
62177
  }
62371
62178
  return {
62372
- kind: import_graphql4.Kind.NAMED_TYPE,
62179
+ kind: import_graphql5.Kind.NAMED_TYPE,
62373
62180
  name: {
62374
- kind: import_graphql4.Kind.NAME,
62181
+ kind: import_graphql5.Kind.NAME,
62375
62182
  value: type.name
62376
62183
  }
62377
62184
  };
62378
62185
  }
62379
62186
 
62380
62187
  // ../../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");
62188
+ var import_graphql7 = require("graphql");
62382
62189
 
62383
62190
  // ../../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");
62191
+ var import_graphql6 = require("graphql");
62385
62192
  function astFromValueUntyped(value) {
62386
62193
  if (value === null) {
62387
- return { kind: import_graphql5.Kind.NULL };
62194
+ return { kind: import_graphql6.Kind.NULL };
62388
62195
  }
62389
62196
  if (value === void 0) {
62390
62197
  return null;
@@ -62397,7 +62204,7 @@ function astFromValueUntyped(value) {
62397
62204
  valuesNodes.push(itemNode);
62398
62205
  }
62399
62206
  }
62400
- return { kind: import_graphql5.Kind.LIST, values: valuesNodes };
62207
+ return { kind: import_graphql6.Kind.LIST, values: valuesNodes };
62401
62208
  }
62402
62209
  if (typeof value === "object") {
62403
62210
  const fieldNodes = [];
@@ -62406,26 +62213,26 @@ function astFromValueUntyped(value) {
62406
62213
  const ast = astFromValueUntyped(fieldValue);
62407
62214
  if (ast) {
62408
62215
  fieldNodes.push({
62409
- kind: import_graphql5.Kind.OBJECT_FIELD,
62410
- name: { kind: import_graphql5.Kind.NAME, value: fieldName },
62216
+ kind: import_graphql6.Kind.OBJECT_FIELD,
62217
+ name: { kind: import_graphql6.Kind.NAME, value: fieldName },
62411
62218
  value: ast
62412
62219
  });
62413
62220
  }
62414
62221
  }
62415
- return { kind: import_graphql5.Kind.OBJECT, fields: fieldNodes };
62222
+ return { kind: import_graphql6.Kind.OBJECT, fields: fieldNodes };
62416
62223
  }
62417
62224
  if (typeof value === "boolean") {
62418
- return { kind: import_graphql5.Kind.BOOLEAN, value };
62225
+ return { kind: import_graphql6.Kind.BOOLEAN, value };
62419
62226
  }
62420
62227
  if (typeof value === "bigint") {
62421
- return { kind: import_graphql5.Kind.INT, value: String(value) };
62228
+ return { kind: import_graphql6.Kind.INT, value: String(value) };
62422
62229
  }
62423
62230
  if (typeof value === "number" && isFinite(value)) {
62424
62231
  const stringNum = String(value);
62425
- return integerStringRegExp.test(stringNum) ? { kind: import_graphql5.Kind.INT, value: stringNum } : { kind: import_graphql5.Kind.FLOAT, value: stringNum };
62232
+ return integerStringRegExp.test(stringNum) ? { kind: import_graphql6.Kind.INT, value: stringNum } : { kind: import_graphql6.Kind.FLOAT, value: stringNum };
62426
62233
  }
62427
62234
  if (typeof value === "string") {
62428
- return { kind: import_graphql5.Kind.STRING, value };
62235
+ return { kind: import_graphql6.Kind.STRING, value };
62429
62236
  }
62430
62237
  throw new TypeError(`Cannot convert value to AST: ${value}.`);
62431
62238
  }
@@ -62433,20 +62240,20 @@ var integerStringRegExp = /^-?(?:0|[1-9][0-9]*)$/;
62433
62240
 
62434
62241
  // ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/astFromValue.js
62435
62242
  function astFromValue(value, type) {
62436
- if ((0, import_graphql6.isNonNullType)(type)) {
62243
+ if ((0, import_graphql7.isNonNullType)(type)) {
62437
62244
  const astValue = astFromValue(value, type.ofType);
62438
- if (astValue?.kind === import_graphql6.Kind.NULL) {
62245
+ if (astValue?.kind === import_graphql7.Kind.NULL) {
62439
62246
  return null;
62440
62247
  }
62441
62248
  return astValue;
62442
62249
  }
62443
62250
  if (value === null) {
62444
- return { kind: import_graphql6.Kind.NULL };
62251
+ return { kind: import_graphql7.Kind.NULL };
62445
62252
  }
62446
62253
  if (value === void 0) {
62447
62254
  return null;
62448
62255
  }
62449
- if ((0, import_graphql6.isListType)(type)) {
62256
+ if ((0, import_graphql7.isListType)(type)) {
62450
62257
  const itemType = type.ofType;
62451
62258
  if (isIterableObject(value)) {
62452
62259
  const valuesNodes = [];
@@ -62456,11 +62263,11 @@ function astFromValue(value, type) {
62456
62263
  valuesNodes.push(itemNode);
62457
62264
  }
62458
62265
  }
62459
- return { kind: import_graphql6.Kind.LIST, values: valuesNodes };
62266
+ return { kind: import_graphql7.Kind.LIST, values: valuesNodes };
62460
62267
  }
62461
62268
  return astFromValue(value, itemType);
62462
62269
  }
62463
- if ((0, import_graphql6.isInputObjectType)(type)) {
62270
+ if ((0, import_graphql7.isInputObjectType)(type)) {
62464
62271
  if (!isObjectLike(value)) {
62465
62272
  return null;
62466
62273
  }
@@ -62469,24 +62276,24 @@ function astFromValue(value, type) {
62469
62276
  const fieldValue = astFromValue(value[field.name], field.type);
62470
62277
  if (fieldValue) {
62471
62278
  fieldNodes.push({
62472
- kind: import_graphql6.Kind.OBJECT_FIELD,
62473
- name: { kind: import_graphql6.Kind.NAME, value: field.name },
62279
+ kind: import_graphql7.Kind.OBJECT_FIELD,
62280
+ name: { kind: import_graphql7.Kind.NAME, value: field.name },
62474
62281
  value: fieldValue
62475
62282
  });
62476
62283
  }
62477
62284
  }
62478
- return { kind: import_graphql6.Kind.OBJECT, fields: fieldNodes };
62285
+ return { kind: import_graphql7.Kind.OBJECT, fields: fieldNodes };
62479
62286
  }
62480
- if ((0, import_graphql6.isLeafType)(type)) {
62287
+ if ((0, import_graphql7.isLeafType)(type)) {
62481
62288
  const serialized = type.serialize(value);
62482
62289
  if (serialized == null) {
62483
62290
  return null;
62484
62291
  }
62485
- if ((0, import_graphql6.isEnumType)(type)) {
62486
- return { kind: import_graphql6.Kind.ENUM, value: serialized };
62292
+ if ((0, import_graphql7.isEnumType)(type)) {
62293
+ return { kind: import_graphql7.Kind.ENUM, value: serialized };
62487
62294
  }
62488
62295
  if (type.name === "ID" && typeof serialized === "string" && integerStringRegExp2.test(serialized)) {
62489
- return { kind: import_graphql6.Kind.INT, value: serialized };
62296
+ return { kind: import_graphql7.Kind.INT, value: serialized };
62490
62297
  }
62491
62298
  return astFromValueUntyped(serialized);
62492
62299
  }
@@ -62542,36 +62349,36 @@ function getDocumentNodeFromSchema(schema, options = {}) {
62542
62349
  const definitions = schemaNode != null ? [schemaNode] : [];
62543
62350
  const directives = schema.getDirectives();
62544
62351
  for (const directive of directives) {
62545
- if ((0, import_graphql7.isSpecifiedDirective)(directive)) {
62352
+ if ((0, import_graphql8.isSpecifiedDirective)(directive)) {
62546
62353
  continue;
62547
62354
  }
62548
62355
  definitions.push(astFromDirective(directive, schema, pathToDirectivesInExtensions));
62549
62356
  }
62550
62357
  for (const typeName in typesMap) {
62551
62358
  const type = typesMap[typeName];
62552
- const isPredefinedScalar = (0, import_graphql7.isSpecifiedScalarType)(type);
62553
- const isIntrospection = (0, import_graphql7.isIntrospectionType)(type);
62359
+ const isPredefinedScalar = (0, import_graphql8.isSpecifiedScalarType)(type);
62360
+ const isIntrospection = (0, import_graphql8.isIntrospectionType)(type);
62554
62361
  if (isPredefinedScalar || isIntrospection) {
62555
62362
  continue;
62556
62363
  }
62557
- if ((0, import_graphql7.isObjectType)(type)) {
62364
+ if ((0, import_graphql8.isObjectType)(type)) {
62558
62365
  definitions.push(astFromObjectType(type, schema, pathToDirectivesInExtensions));
62559
- } else if ((0, import_graphql7.isInterfaceType)(type)) {
62366
+ } else if ((0, import_graphql8.isInterfaceType)(type)) {
62560
62367
  definitions.push(astFromInterfaceType(type, schema, pathToDirectivesInExtensions));
62561
- } else if ((0, import_graphql7.isUnionType)(type)) {
62368
+ } else if ((0, import_graphql8.isUnionType)(type)) {
62562
62369
  definitions.push(astFromUnionType(type, schema, pathToDirectivesInExtensions));
62563
- } else if ((0, import_graphql7.isInputObjectType)(type)) {
62370
+ } else if ((0, import_graphql8.isInputObjectType)(type)) {
62564
62371
  definitions.push(astFromInputObjectType(type, schema, pathToDirectivesInExtensions));
62565
- } else if ((0, import_graphql7.isEnumType)(type)) {
62372
+ } else if ((0, import_graphql8.isEnumType)(type)) {
62566
62373
  definitions.push(astFromEnumType(type, schema, pathToDirectivesInExtensions));
62567
- } else if ((0, import_graphql7.isScalarType)(type)) {
62374
+ } else if ((0, import_graphql8.isScalarType)(type)) {
62568
62375
  definitions.push(astFromScalarType(type, schema, pathToDirectivesInExtensions));
62569
62376
  } else {
62570
62377
  throw new Error(`Unknown type ${type}.`);
62571
62378
  }
62572
62379
  }
62573
62380
  return {
62574
- kind: import_graphql7.Kind.DOCUMENT,
62381
+ kind: import_graphql8.Kind.DOCUMENT,
62575
62382
  definitions
62576
62383
  };
62577
62384
  }
@@ -62606,7 +62413,7 @@ function astFromSchema(schema, pathToDirectivesInExtensions) {
62606
62413
  operationTypeDefinitionNode.type = rootTypeAST;
62607
62414
  } else {
62608
62415
  operationTypeMap.set(operationTypeNode, {
62609
- kind: import_graphql7.Kind.OPERATION_TYPE_DEFINITION,
62416
+ kind: import_graphql8.Kind.OPERATION_TYPE_DEFINITION,
62610
62417
  operation: operationTypeNode,
62611
62418
  type: rootTypeAST
62612
62419
  });
@@ -62619,12 +62426,12 @@ function astFromSchema(schema, pathToDirectivesInExtensions) {
62619
62426
  return null;
62620
62427
  }
62621
62428
  const schemaNode = {
62622
- kind: operationTypes != null ? import_graphql7.Kind.SCHEMA_DEFINITION : import_graphql7.Kind.SCHEMA_EXTENSION,
62429
+ kind: operationTypes != null ? import_graphql8.Kind.SCHEMA_DEFINITION : import_graphql8.Kind.SCHEMA_EXTENSION,
62623
62430
  operationTypes,
62624
62431
  directives
62625
62432
  };
62626
62433
  schemaNode.description = schema.astNode?.description ?? schema.description != null ? {
62627
- kind: import_graphql7.Kind.STRING,
62434
+ kind: import_graphql8.Kind.STRING,
62628
62435
  value: schema.description,
62629
62436
  block: true
62630
62437
  } : void 0;
@@ -62632,19 +62439,19 @@ function astFromSchema(schema, pathToDirectivesInExtensions) {
62632
62439
  }
62633
62440
  function astFromDirective(directive, schema, pathToDirectivesInExtensions) {
62634
62441
  return {
62635
- kind: import_graphql7.Kind.DIRECTIVE_DEFINITION,
62442
+ kind: import_graphql8.Kind.DIRECTIVE_DEFINITION,
62636
62443
  description: directive.astNode?.description ?? (directive.description ? {
62637
- kind: import_graphql7.Kind.STRING,
62444
+ kind: import_graphql8.Kind.STRING,
62638
62445
  value: directive.description
62639
62446
  } : void 0),
62640
62447
  name: {
62641
- kind: import_graphql7.Kind.NAME,
62448
+ kind: import_graphql8.Kind.NAME,
62642
62449
  value: directive.name
62643
62450
  },
62644
62451
  arguments: directive.args?.map((arg) => astFromArg(arg, schema, pathToDirectivesInExtensions)),
62645
62452
  repeatable: directive.isRepeatable,
62646
62453
  locations: directive.locations?.map((location) => ({
62647
- kind: import_graphql7.Kind.NAME,
62454
+ kind: import_graphql8.Kind.NAME,
62648
62455
  value: location
62649
62456
  })) || []
62650
62457
  };
@@ -62694,14 +62501,14 @@ function getDeprecatableDirectiveNodes(entity, schema, pathToDirectivesInExtensi
62694
62501
  }
62695
62502
  function astFromArg(arg, schema, pathToDirectivesInExtensions) {
62696
62503
  return {
62697
- kind: import_graphql7.Kind.INPUT_VALUE_DEFINITION,
62504
+ kind: import_graphql8.Kind.INPUT_VALUE_DEFINITION,
62698
62505
  description: arg.astNode?.description ?? (arg.description ? {
62699
- kind: import_graphql7.Kind.STRING,
62506
+ kind: import_graphql8.Kind.STRING,
62700
62507
  value: arg.description,
62701
62508
  block: true
62702
62509
  } : void 0),
62703
62510
  name: {
62704
- kind: import_graphql7.Kind.NAME,
62511
+ kind: import_graphql8.Kind.NAME,
62705
62512
  value: arg.name
62706
62513
  },
62707
62514
  type: astFromType(arg.type),
@@ -62711,14 +62518,14 @@ function astFromArg(arg, schema, pathToDirectivesInExtensions) {
62711
62518
  }
62712
62519
  function astFromObjectType(type, schema, pathToDirectivesInExtensions) {
62713
62520
  return {
62714
- kind: import_graphql7.Kind.OBJECT_TYPE_DEFINITION,
62521
+ kind: import_graphql8.Kind.OBJECT_TYPE_DEFINITION,
62715
62522
  description: type.astNode?.description ?? (type.description ? {
62716
- kind: import_graphql7.Kind.STRING,
62523
+ kind: import_graphql8.Kind.STRING,
62717
62524
  value: type.description,
62718
62525
  block: true
62719
62526
  } : void 0),
62720
62527
  name: {
62721
- kind: import_graphql7.Kind.NAME,
62528
+ kind: import_graphql8.Kind.NAME,
62722
62529
  value: type.name
62723
62530
  },
62724
62531
  fields: Object.values(type.getFields()).map((field) => astFromField(field, schema, pathToDirectivesInExtensions)),
@@ -62728,14 +62535,14 @@ function astFromObjectType(type, schema, pathToDirectivesInExtensions) {
62728
62535
  }
62729
62536
  function astFromInterfaceType(type, schema, pathToDirectivesInExtensions) {
62730
62537
  const node = {
62731
- kind: import_graphql7.Kind.INTERFACE_TYPE_DEFINITION,
62538
+ kind: import_graphql8.Kind.INTERFACE_TYPE_DEFINITION,
62732
62539
  description: type.astNode?.description ?? (type.description ? {
62733
- kind: import_graphql7.Kind.STRING,
62540
+ kind: import_graphql8.Kind.STRING,
62734
62541
  value: type.description,
62735
62542
  block: true
62736
62543
  } : void 0),
62737
62544
  name: {
62738
- kind: import_graphql7.Kind.NAME,
62545
+ kind: import_graphql8.Kind.NAME,
62739
62546
  value: type.name
62740
62547
  },
62741
62548
  fields: Object.values(type.getFields()).map((field) => astFromField(field, schema, pathToDirectivesInExtensions)),
@@ -62748,14 +62555,14 @@ function astFromInterfaceType(type, schema, pathToDirectivesInExtensions) {
62748
62555
  }
62749
62556
  function astFromUnionType(type, schema, pathToDirectivesInExtensions) {
62750
62557
  return {
62751
- kind: import_graphql7.Kind.UNION_TYPE_DEFINITION,
62558
+ kind: import_graphql8.Kind.UNION_TYPE_DEFINITION,
62752
62559
  description: type.astNode?.description ?? (type.description ? {
62753
- kind: import_graphql7.Kind.STRING,
62560
+ kind: import_graphql8.Kind.STRING,
62754
62561
  value: type.description,
62755
62562
  block: true
62756
62563
  } : void 0),
62757
62564
  name: {
62758
- kind: import_graphql7.Kind.NAME,
62565
+ kind: import_graphql8.Kind.NAME,
62759
62566
  value: type.name
62760
62567
  },
62761
62568
  directives: getDirectiveNodes(type, schema, pathToDirectivesInExtensions),
@@ -62764,14 +62571,14 @@ function astFromUnionType(type, schema, pathToDirectivesInExtensions) {
62764
62571
  }
62765
62572
  function astFromInputObjectType(type, schema, pathToDirectivesInExtensions) {
62766
62573
  return {
62767
- kind: import_graphql7.Kind.INPUT_OBJECT_TYPE_DEFINITION,
62574
+ kind: import_graphql8.Kind.INPUT_OBJECT_TYPE_DEFINITION,
62768
62575
  description: type.astNode?.description ?? (type.description ? {
62769
- kind: import_graphql7.Kind.STRING,
62576
+ kind: import_graphql8.Kind.STRING,
62770
62577
  value: type.description,
62771
62578
  block: true
62772
62579
  } : void 0),
62773
62580
  name: {
62774
- kind: import_graphql7.Kind.NAME,
62581
+ kind: import_graphql8.Kind.NAME,
62775
62582
  value: type.name
62776
62583
  },
62777
62584
  fields: Object.values(type.getFields()).map((field) => astFromInputField(field, schema, pathToDirectivesInExtensions)),
@@ -62780,14 +62587,14 @@ function astFromInputObjectType(type, schema, pathToDirectivesInExtensions) {
62780
62587
  }
62781
62588
  function astFromEnumType(type, schema, pathToDirectivesInExtensions) {
62782
62589
  return {
62783
- kind: import_graphql7.Kind.ENUM_TYPE_DEFINITION,
62590
+ kind: import_graphql8.Kind.ENUM_TYPE_DEFINITION,
62784
62591
  description: type.astNode?.description ?? (type.description ? {
62785
- kind: import_graphql7.Kind.STRING,
62592
+ kind: import_graphql8.Kind.STRING,
62786
62593
  value: type.description,
62787
62594
  block: true
62788
62595
  } : void 0),
62789
62596
  name: {
62790
- kind: import_graphql7.Kind.NAME,
62597
+ kind: import_graphql8.Kind.NAME,
62791
62598
  value: type.name
62792
62599
  },
62793
62600
  values: Object.values(type.getValues()).map((value) => astFromEnumValue(value, schema, pathToDirectivesInExtensions)),
@@ -62805,14 +62612,14 @@ function astFromScalarType(type, schema, pathToDirectivesInExtensions) {
62805
62612
  directives.push(makeDirectiveNode("specifiedBy", specifiedByArgs));
62806
62613
  }
62807
62614
  return {
62808
- kind: import_graphql7.Kind.SCALAR_TYPE_DEFINITION,
62615
+ kind: import_graphql8.Kind.SCALAR_TYPE_DEFINITION,
62809
62616
  description: type.astNode?.description ?? (type.description ? {
62810
- kind: import_graphql7.Kind.STRING,
62617
+ kind: import_graphql8.Kind.STRING,
62811
62618
  value: type.description,
62812
62619
  block: true
62813
62620
  } : void 0),
62814
62621
  name: {
62815
- kind: import_graphql7.Kind.NAME,
62622
+ kind: import_graphql8.Kind.NAME,
62816
62623
  value: type.name
62817
62624
  },
62818
62625
  directives
@@ -62820,14 +62627,14 @@ function astFromScalarType(type, schema, pathToDirectivesInExtensions) {
62820
62627
  }
62821
62628
  function astFromField(field, schema, pathToDirectivesInExtensions) {
62822
62629
  return {
62823
- kind: import_graphql7.Kind.FIELD_DEFINITION,
62630
+ kind: import_graphql8.Kind.FIELD_DEFINITION,
62824
62631
  description: field.astNode?.description ?? (field.description ? {
62825
- kind: import_graphql7.Kind.STRING,
62632
+ kind: import_graphql8.Kind.STRING,
62826
62633
  value: field.description,
62827
62634
  block: true
62828
62635
  } : void 0),
62829
62636
  name: {
62830
- kind: import_graphql7.Kind.NAME,
62637
+ kind: import_graphql8.Kind.NAME,
62831
62638
  value: field.name
62832
62639
  },
62833
62640
  arguments: field.args.map((arg) => astFromArg(arg, schema, pathToDirectivesInExtensions)),
@@ -62837,14 +62644,14 @@ function astFromField(field, schema, pathToDirectivesInExtensions) {
62837
62644
  }
62838
62645
  function astFromInputField(field, schema, pathToDirectivesInExtensions) {
62839
62646
  return {
62840
- kind: import_graphql7.Kind.INPUT_VALUE_DEFINITION,
62647
+ kind: import_graphql8.Kind.INPUT_VALUE_DEFINITION,
62841
62648
  description: field.astNode?.description ?? (field.description ? {
62842
- kind: import_graphql7.Kind.STRING,
62649
+ kind: import_graphql8.Kind.STRING,
62843
62650
  value: field.description,
62844
62651
  block: true
62845
62652
  } : void 0),
62846
62653
  name: {
62847
- kind: import_graphql7.Kind.NAME,
62654
+ kind: import_graphql8.Kind.NAME,
62848
62655
  value: field.name
62849
62656
  },
62850
62657
  type: astFromType(field.type),
@@ -62854,21 +62661,21 @@ function astFromInputField(field, schema, pathToDirectivesInExtensions) {
62854
62661
  }
62855
62662
  function astFromEnumValue(value, schema, pathToDirectivesInExtensions) {
62856
62663
  return {
62857
- kind: import_graphql7.Kind.ENUM_VALUE_DEFINITION,
62664
+ kind: import_graphql8.Kind.ENUM_VALUE_DEFINITION,
62858
62665
  description: value.astNode?.description ?? (value.description ? {
62859
- kind: import_graphql7.Kind.STRING,
62666
+ kind: import_graphql8.Kind.STRING,
62860
62667
  value: value.description,
62861
62668
  block: true
62862
62669
  } : void 0),
62863
62670
  name: {
62864
- kind: import_graphql7.Kind.NAME,
62671
+ kind: import_graphql8.Kind.NAME,
62865
62672
  value: value.name
62866
62673
  },
62867
62674
  directives: getDeprecatableDirectiveNodes(value, schema, pathToDirectivesInExtensions)
62868
62675
  };
62869
62676
  }
62870
62677
  function makeDeprecatedDirective(deprecationReason) {
62871
- return makeDirectiveNode("deprecated", { reason: deprecationReason }, import_graphql7.GraphQLDeprecatedDirective);
62678
+ return makeDirectiveNode("deprecated", { reason: deprecationReason }, import_graphql8.GraphQLDeprecatedDirective);
62872
62679
  }
62873
62680
  function makeDirectiveNode(name, args, directive) {
62874
62681
  const directiveArguments = [];
@@ -62880,9 +62687,9 @@ function makeDirectiveNode(name, args, directive) {
62880
62687
  const value = astFromValue(argValue, arg.type);
62881
62688
  if (value) {
62882
62689
  directiveArguments.push({
62883
- kind: import_graphql7.Kind.ARGUMENT,
62690
+ kind: import_graphql8.Kind.ARGUMENT,
62884
62691
  name: {
62885
- kind: import_graphql7.Kind.NAME,
62692
+ kind: import_graphql8.Kind.NAME,
62886
62693
  value: argName
62887
62694
  },
62888
62695
  value
@@ -62896,9 +62703,9 @@ function makeDirectiveNode(name, args, directive) {
62896
62703
  const value = astFromValueUntyped(argValue);
62897
62704
  if (value) {
62898
62705
  directiveArguments.push({
62899
- kind: import_graphql7.Kind.ARGUMENT,
62706
+ kind: import_graphql8.Kind.ARGUMENT,
62900
62707
  name: {
62901
- kind: import_graphql7.Kind.NAME,
62708
+ kind: import_graphql8.Kind.NAME,
62902
62709
  value: argName
62903
62710
  },
62904
62711
  value
@@ -62907,9 +62714,9 @@ function makeDirectiveNode(name, args, directive) {
62907
62714
  }
62908
62715
  }
62909
62716
  return {
62910
- kind: import_graphql7.Kind.DIRECTIVE,
62717
+ kind: import_graphql8.Kind.DIRECTIVE,
62911
62718
  name: {
62912
- kind: import_graphql7.Kind.NAME,
62719
+ kind: import_graphql8.Kind.NAME,
62913
62720
  value: name
62914
62721
  },
62915
62722
  arguments: directiveArguments
@@ -62932,7 +62739,7 @@ function makeDirectiveNodes(schema, directiveValues) {
62932
62739
  }
62933
62740
 
62934
62741
  // ../../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");
62742
+ var import_graphql9 = require("graphql");
62936
62743
  var MAX_LINE_LENGTH = 80;
62937
62744
  var commentsRegistry = {};
62938
62745
  function resetComments() {
@@ -63177,7 +62984,7 @@ var printDocASTReducerWithComments = Object.keys(printDocASTReducer).reduce((pre
63177
62984
  }
63178
62985
  }), {});
63179
62986
  function printWithComments(ast) {
63180
- return (0, import_graphql8.visit)(ast, printDocASTReducerWithComments);
62987
+ return (0, import_graphql9.visit)(ast, printDocASTReducerWithComments);
63181
62988
  }
63182
62989
  function isFieldDefinitionNode(node) {
63183
62990
  return node.kind === "FieldDefinition";
@@ -63196,7 +63003,7 @@ function getLeadingCommentBlock(node) {
63196
63003
  }
63197
63004
  const comments = [];
63198
63005
  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) {
63006
+ 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
63007
  const value = String(token.value);
63201
63008
  comments.push(value);
63202
63009
  token = token.prev;
@@ -63248,9 +63055,9 @@ function isBlank(str) {
63248
63055
  }
63249
63056
 
63250
63057
  // ../../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");
63058
+ var import_graphql10 = require("graphql");
63252
63059
  function isDocumentNode(object) {
63253
- return object && typeof object === "object" && "kind" in object && object.kind === import_graphql9.Kind.DOCUMENT;
63060
+ return object && typeof object === "object" && "kind" in object && object.kind === import_graphql10.Kind.DOCUMENT;
63254
63061
  }
63255
63062
 
63256
63063
  // ../../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 +63081,7 @@ function deduplicateArguments(args, config) {
63274
63081
  }
63275
63082
 
63276
63083
  // ../../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");
63084
+ var import_graphql11 = require("graphql");
63278
63085
  function directiveAlreadyExists(directivesArr, otherDirective) {
63279
63086
  return !!directivesArr.find((directive) => directive.name.value === otherDirective.name.value);
63280
63087
  }
@@ -63334,11 +63141,11 @@ function mergeDirectives(d1 = [], d2 = [], config, directives) {
63334
63141
  return result;
63335
63142
  }
63336
63143
  function validateInputs(node, existingNode) {
63337
- const printedNode = (0, import_graphql10.print)({
63144
+ const printedNode = (0, import_graphql11.print)({
63338
63145
  ...node,
63339
63146
  description: void 0
63340
63147
  });
63341
- const printedExistingNode = (0, import_graphql10.print)({
63148
+ const printedExistingNode = (0, import_graphql11.print)({
63342
63149
  ...existingNode,
63343
63150
  description: void 0
63344
63151
  });
@@ -63405,7 +63212,7 @@ function mergeEnumValues(first, second, config, directives) {
63405
63212
  }
63406
63213
 
63407
63214
  // ../../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");
63215
+ var import_graphql12 = require("graphql");
63409
63216
  function mergeEnum(e1, e2, config, directives) {
63410
63217
  if (e2) {
63411
63218
  return {
@@ -63419,33 +63226,33 @@ function mergeEnum(e1, e2, config, directives) {
63419
63226
  }
63420
63227
  return config?.convertExtensions ? {
63421
63228
  ...e1,
63422
- kind: import_graphql11.Kind.ENUM_TYPE_DEFINITION
63229
+ kind: import_graphql12.Kind.ENUM_TYPE_DEFINITION
63423
63230
  } : e1;
63424
63231
  }
63425
63232
 
63426
63233
  // ../../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");
63234
+ var import_graphql13 = require("graphql");
63428
63235
  function isStringTypes(types14) {
63429
63236
  return typeof types14 === "string";
63430
63237
  }
63431
63238
  function isSourceTypes(types14) {
63432
- return types14 instanceof import_graphql12.Source;
63239
+ return types14 instanceof import_graphql13.Source;
63433
63240
  }
63434
63241
  function extractType(type) {
63435
63242
  let visitedType = type;
63436
- while (visitedType.kind === import_graphql12.Kind.LIST_TYPE || visitedType.kind === "NonNullType") {
63243
+ while (visitedType.kind === import_graphql13.Kind.LIST_TYPE || visitedType.kind === "NonNullType") {
63437
63244
  visitedType = visitedType.type;
63438
63245
  }
63439
63246
  return visitedType;
63440
63247
  }
63441
63248
  function isWrappingTypeNode(type) {
63442
- return type.kind !== import_graphql12.Kind.NAMED_TYPE;
63249
+ return type.kind !== import_graphql13.Kind.NAMED_TYPE;
63443
63250
  }
63444
63251
  function isListTypeNode(type) {
63445
- return type.kind === import_graphql12.Kind.LIST_TYPE;
63252
+ return type.kind === import_graphql13.Kind.LIST_TYPE;
63446
63253
  }
63447
63254
  function isNonNullTypeNode(type) {
63448
- return type.kind === import_graphql12.Kind.NON_NULL_TYPE;
63255
+ return type.kind === import_graphql13.Kind.NON_NULL_TYPE;
63449
63256
  }
63450
63257
  function printTypeNode(type) {
63451
63258
  if (isListTypeNode(type)) {
@@ -63548,7 +63355,7 @@ function safeChangeForFieldType(oldType, newType, ignoreNullability = false) {
63548
63355
  }
63549
63356
 
63550
63357
  // ../../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");
63358
+ var import_graphql14 = require("graphql");
63552
63359
  function mergeInputType(node, existingNode, config, directives) {
63553
63360
  if (existingNode) {
63554
63361
  try {
@@ -63566,12 +63373,12 @@ function mergeInputType(node, existingNode, config, directives) {
63566
63373
  }
63567
63374
  return config?.convertExtensions ? {
63568
63375
  ...node,
63569
- kind: import_graphql13.Kind.INPUT_OBJECT_TYPE_DEFINITION
63376
+ kind: import_graphql14.Kind.INPUT_OBJECT_TYPE_DEFINITION
63570
63377
  } : node;
63571
63378
  }
63572
63379
 
63573
63380
  // ../../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");
63381
+ var import_graphql15 = require("graphql");
63575
63382
 
63576
63383
  // ../../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
63384
  function alreadyExists(arr, other) {
@@ -63604,15 +63411,15 @@ function mergeInterface(node, existingNode, config, directives) {
63604
63411
  }
63605
63412
  return config?.convertExtensions ? {
63606
63413
  ...node,
63607
- kind: import_graphql14.Kind.INTERFACE_TYPE_DEFINITION
63414
+ kind: import_graphql15.Kind.INTERFACE_TYPE_DEFINITION
63608
63415
  } : node;
63609
63416
  }
63610
63417
 
63611
63418
  // ../../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");
63419
+ var import_graphql20 = require("graphql");
63613
63420
 
63614
63421
  // ../../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");
63422
+ var import_graphql16 = require("graphql");
63616
63423
  function mergeType(node, existingNode, config, directives) {
63617
63424
  if (existingNode) {
63618
63425
  try {
@@ -63631,12 +63438,12 @@ function mergeType(node, existingNode, config, directives) {
63631
63438
  }
63632
63439
  return config?.convertExtensions ? {
63633
63440
  ...node,
63634
- kind: import_graphql15.Kind.OBJECT_TYPE_DEFINITION
63441
+ kind: import_graphql16.Kind.OBJECT_TYPE_DEFINITION
63635
63442
  } : node;
63636
63443
  }
63637
63444
 
63638
63445
  // ../../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");
63446
+ var import_graphql17 = require("graphql");
63640
63447
  function mergeScalar(node, existingNode, config, directives) {
63641
63448
  if (existingNode) {
63642
63449
  return {
@@ -63649,31 +63456,31 @@ function mergeScalar(node, existingNode, config, directives) {
63649
63456
  }
63650
63457
  return config?.convertExtensions ? {
63651
63458
  ...node,
63652
- kind: import_graphql16.Kind.SCALAR_TYPE_DEFINITION
63459
+ kind: import_graphql17.Kind.SCALAR_TYPE_DEFINITION
63653
63460
  } : node;
63654
63461
  }
63655
63462
 
63656
63463
  // ../../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");
63464
+ var import_graphql18 = require("graphql");
63658
63465
  function mergeUnion(first, second, config, directives) {
63659
63466
  if (second) {
63660
63467
  return {
63661
63468
  name: first.name,
63662
63469
  description: first["description"] || second["description"],
63663
63470
  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,
63471
+ kind: config?.convertExtensions || first.kind === "UnionTypeDefinition" || second.kind === "UnionTypeDefinition" ? import_graphql18.Kind.UNION_TYPE_DEFINITION : import_graphql18.Kind.UNION_TYPE_EXTENSION,
63665
63472
  loc: first.loc,
63666
63473
  types: mergeNamedTypeArray(first.types, second.types, config)
63667
63474
  };
63668
63475
  }
63669
63476
  return config?.convertExtensions ? {
63670
63477
  ...first,
63671
- kind: import_graphql17.Kind.UNION_TYPE_DEFINITION
63478
+ kind: import_graphql18.Kind.UNION_TYPE_DEFINITION
63672
63479
  } : first;
63673
63480
  }
63674
63481
 
63675
63482
  // ../../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");
63483
+ var import_graphql19 = require("graphql");
63677
63484
  var DEFAULT_OPERATION_TYPE_NAME_MAP = {
63678
63485
  query: "Query",
63679
63486
  mutation: "Mutation",
@@ -63692,7 +63499,7 @@ function mergeOperationTypes(opNodeList = [], existingOpNodeList = []) {
63692
63499
  function mergeSchemaDefs(node, existingNode, config, directives) {
63693
63500
  if (existingNode) {
63694
63501
  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,
63502
+ 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
63503
  description: node["description"] || existingNode["description"],
63697
63504
  directives: mergeDirectives(node.directives, existingNode.directives, config, directives),
63698
63505
  operationTypes: mergeOperationTypes(node.operationTypes, existingNode.operationTypes)
@@ -63700,7 +63507,7 @@ function mergeSchemaDefs(node, existingNode, config, directives) {
63700
63507
  }
63701
63508
  return config?.convertExtensions ? {
63702
63509
  ...node,
63703
- kind: import_graphql18.Kind.SCHEMA_DEFINITION
63510
+ kind: import_graphql19.Kind.SCHEMA_DEFINITION
63704
63511
  } : node;
63705
63512
  }
63706
63513
 
@@ -63724,36 +63531,36 @@ function mergeGraphQLNodes(nodes, config, directives = {}) {
63724
63531
  delete mergedResultMap[name];
63725
63532
  } else {
63726
63533
  switch (nodeDefinition.kind) {
63727
- case import_graphql19.Kind.OBJECT_TYPE_DEFINITION:
63728
- case import_graphql19.Kind.OBJECT_TYPE_EXTENSION:
63534
+ case import_graphql20.Kind.OBJECT_TYPE_DEFINITION:
63535
+ case import_graphql20.Kind.OBJECT_TYPE_EXTENSION:
63729
63536
  mergedResultMap[name] = mergeType(nodeDefinition, mergedResultMap[name], config, directives);
63730
63537
  break;
63731
- case import_graphql19.Kind.ENUM_TYPE_DEFINITION:
63732
- case import_graphql19.Kind.ENUM_TYPE_EXTENSION:
63538
+ case import_graphql20.Kind.ENUM_TYPE_DEFINITION:
63539
+ case import_graphql20.Kind.ENUM_TYPE_EXTENSION:
63733
63540
  mergedResultMap[name] = mergeEnum(nodeDefinition, mergedResultMap[name], config, directives);
63734
63541
  break;
63735
- case import_graphql19.Kind.UNION_TYPE_DEFINITION:
63736
- case import_graphql19.Kind.UNION_TYPE_EXTENSION:
63542
+ case import_graphql20.Kind.UNION_TYPE_DEFINITION:
63543
+ case import_graphql20.Kind.UNION_TYPE_EXTENSION:
63737
63544
  mergedResultMap[name] = mergeUnion(nodeDefinition, mergedResultMap[name], config, directives);
63738
63545
  break;
63739
- case import_graphql19.Kind.SCALAR_TYPE_DEFINITION:
63740
- case import_graphql19.Kind.SCALAR_TYPE_EXTENSION:
63546
+ case import_graphql20.Kind.SCALAR_TYPE_DEFINITION:
63547
+ case import_graphql20.Kind.SCALAR_TYPE_EXTENSION:
63741
63548
  mergedResultMap[name] = mergeScalar(nodeDefinition, mergedResultMap[name], config, directives);
63742
63549
  break;
63743
- case import_graphql19.Kind.INPUT_OBJECT_TYPE_DEFINITION:
63744
- case import_graphql19.Kind.INPUT_OBJECT_TYPE_EXTENSION:
63550
+ case import_graphql20.Kind.INPUT_OBJECT_TYPE_DEFINITION:
63551
+ case import_graphql20.Kind.INPUT_OBJECT_TYPE_EXTENSION:
63745
63552
  mergedResultMap[name] = mergeInputType(nodeDefinition, mergedResultMap[name], config, directives);
63746
63553
  break;
63747
- case import_graphql19.Kind.INTERFACE_TYPE_DEFINITION:
63748
- case import_graphql19.Kind.INTERFACE_TYPE_EXTENSION:
63554
+ case import_graphql20.Kind.INTERFACE_TYPE_DEFINITION:
63555
+ case import_graphql20.Kind.INTERFACE_TYPE_EXTENSION:
63749
63556
  mergedResultMap[name] = mergeInterface(nodeDefinition, mergedResultMap[name], config, directives);
63750
63557
  break;
63751
- case import_graphql19.Kind.DIRECTIVE_DEFINITION:
63558
+ case import_graphql20.Kind.DIRECTIVE_DEFINITION:
63752
63559
  mergedResultMap[name] = mergeDirective(nodeDefinition, mergedResultMap[name]);
63753
63560
  break;
63754
63561
  }
63755
63562
  }
63756
- } else if (nodeDefinition.kind === import_graphql19.Kind.SCHEMA_DEFINITION || nodeDefinition.kind === import_graphql19.Kind.SCHEMA_EXTENSION) {
63563
+ } else if (nodeDefinition.kind === import_graphql20.Kind.SCHEMA_DEFINITION || nodeDefinition.kind === import_graphql20.Kind.SCHEMA_EXTENSION) {
63757
63564
  mergedResultMap[schemaDefSymbol] = mergeSchemaDefs(nodeDefinition, mergedResultMap[schemaDefSymbol], config);
63758
63565
  }
63759
63566
  }
@@ -63761,11 +63568,11 @@ function mergeGraphQLNodes(nodes, config, directives = {}) {
63761
63568
  }
63762
63569
 
63763
63570
  // ../../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");
63571
+ var import_graphql21 = require("graphql");
63765
63572
  function mergeTypeDefs(typeSource, config) {
63766
63573
  resetComments();
63767
63574
  const doc = {
63768
- kind: import_graphql20.Kind.DOCUMENT,
63575
+ kind: import_graphql21.Kind.DOCUMENT,
63769
63576
  definitions: mergeGraphQLTypes(typeSource, {
63770
63577
  useSchemaDefinition: true,
63771
63578
  forceSchemaDefinition: false,
@@ -63792,14 +63599,14 @@ function visitTypeSources(typeSource, options, allDirectives = [], allNodes = []
63792
63599
  for (const type of typeSource) {
63793
63600
  visitTypeSources(type, options, allDirectives, allNodes, visitedTypeSources);
63794
63601
  }
63795
- } else if ((0, import_graphql20.isSchema)(typeSource)) {
63602
+ } else if ((0, import_graphql21.isSchema)(typeSource)) {
63796
63603
  const documentNode = getDocumentNodeFromSchema(typeSource, options);
63797
63604
  visitTypeSources(documentNode.definitions, options, allDirectives, allNodes, visitedTypeSources);
63798
63605
  } else if (isStringTypes(typeSource) || isSourceTypes(typeSource)) {
63799
- const documentNode = (0, import_graphql20.parse)(typeSource, options);
63606
+ const documentNode = (0, import_graphql21.parse)(typeSource, options);
63800
63607
  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) {
63608
+ } else if (typeof typeSource === "object" && (0, import_graphql21.isDefinitionNode)(typeSource)) {
63609
+ if (typeSource.kind === import_graphql21.Kind.DIRECTIVE_DEFINITION) {
63803
63610
  allDirectives.push(typeSource);
63804
63611
  } else {
63805
63612
  allNodes.push(typeSource);
@@ -63819,7 +63626,7 @@ function mergeGraphQLTypes(typeSource, config) {
63819
63626
  const mergedNodes = mergeGraphQLNodes(allNodes, config, mergedDirectives);
63820
63627
  if (config?.useSchemaDefinition) {
63821
63628
  const schemaDef = mergedNodes[schemaDefSymbol] || {
63822
- kind: import_graphql20.Kind.SCHEMA_DEFINITION,
63629
+ kind: import_graphql21.Kind.SCHEMA_DEFINITION,
63823
63630
  operationTypes: []
63824
63631
  };
63825
63632
  const operationTypes = schemaDef.operationTypes;
@@ -63830,9 +63637,9 @@ function mergeGraphQLTypes(typeSource, config) {
63830
63637
  const existingPossibleRootType = mergedNodes[possibleRootTypeName];
63831
63638
  if (existingPossibleRootType != null && existingPossibleRootType.name != null) {
63832
63639
  operationTypes.push({
63833
- kind: import_graphql20.Kind.OPERATION_TYPE_DEFINITION,
63640
+ kind: import_graphql21.Kind.OPERATION_TYPE_DEFINITION,
63834
63641
  type: {
63835
- kind: import_graphql20.Kind.NAMED_TYPE,
63642
+ kind: import_graphql21.Kind.NAMED_TYPE,
63836
63643
  name: existingPossibleRootType.name
63837
63644
  },
63838
63645
  operation: opTypeDefNodeType
@@ -63846,15 +63653,15 @@ function mergeGraphQLTypes(typeSource, config) {
63846
63653
  }
63847
63654
  if (config?.forceSchemaDefinition && !mergedNodes[schemaDefSymbol]?.operationTypes?.length) {
63848
63655
  mergedNodes[schemaDefSymbol] = {
63849
- kind: import_graphql20.Kind.SCHEMA_DEFINITION,
63656
+ kind: import_graphql21.Kind.SCHEMA_DEFINITION,
63850
63657
  operationTypes: [
63851
63658
  {
63852
- kind: import_graphql20.Kind.OPERATION_TYPE_DEFINITION,
63659
+ kind: import_graphql21.Kind.OPERATION_TYPE_DEFINITION,
63853
63660
  operation: "query",
63854
63661
  type: {
63855
- kind: import_graphql20.Kind.NAMED_TYPE,
63662
+ kind: import_graphql21.Kind.NAMED_TYPE,
63856
63663
  name: {
63857
- kind: import_graphql20.Kind.NAME,
63664
+ kind: import_graphql21.Kind.NAME,
63858
63665
  value: "Query"
63859
63666
  }
63860
63667
  }
@@ -63871,7 +63678,7 @@ function mergeGraphQLTypes(typeSource, config) {
63871
63678
  }
63872
63679
 
63873
63680
  // src/codegen/transforms/schema.ts
63874
- var graphql25 = __toESM(require("graphql"), 1);
63681
+ var graphql24 = __toESM(require("graphql"), 1);
63875
63682
  async function graphqlExtensions(config, documents) {
63876
63683
  let internalSchema = `
63877
63684
  enum CachePolicy {
@@ -63994,7 +63801,7 @@ directive @${config.componentFieldDirective}(field: String!, prop: String, expor
63994
63801
  const args = fragmentArguments(config, "", field.parent);
63995
63802
  if (args.length > 0) {
63996
63803
  argString = "(" + args.map((arg) => {
63997
- const typeName = graphql25.print(arg.type);
63804
+ const typeName = graphql24.print(arg.type);
63998
63805
  return `${arg.name}:${typeName}${arg.required ? "!" : ""}`;
63999
63806
  }).join("\n") + ")";
64000
63807
  }
@@ -64004,20 +63811,20 @@ directive @${config.componentFieldDirective}(field: String!, prop: String, expor
64004
63811
  `;
64005
63812
  }).join("\n");
64006
63813
  extensions += `${Object.keys(config.configFile.features?.runtimeScalars ?? {}).map((scalar) => `scalar ${scalar}`).join("\n")}`;
64007
- config.newSchema = graphql25.print(mergeTypeDefs([internalSchema, config.newSchema]));
63814
+ config.newSchema = graphql24.print(mergeTypeDefs([internalSchema, config.newSchema]));
64008
63815
  config.schemaString += extensions;
64009
- config.schema = graphql25.buildSchema(
64010
- graphql25.print(
64011
- mergeTypeDefs([graphql25.printSchema(config.schema), internalSchema, extensions])
63816
+ config.schema = graphql24.buildSchema(
63817
+ graphql24.print(
63818
+ mergeTypeDefs([graphql24.printSchema(config.schema), internalSchema, extensions])
64012
63819
  )
64013
63820
  );
64014
63821
  }
64015
63822
 
64016
63823
  // src/codegen/transforms/typename.ts
64017
- var graphql26 = __toESM(require("graphql"), 1);
63824
+ var graphql25 = __toESM(require("graphql"), 1);
64018
63825
  async function addTypename(config, documents) {
64019
63826
  for (const doc of documents) {
64020
- doc.document = graphql26.visit(doc.document, {
63827
+ doc.document = graphql25.visit(doc.document, {
64021
63828
  Field(node, key, parent2, path2, ancestors) {
64022
63829
  if (!node.selectionSet) {
64023
63830
  return;
@@ -64029,7 +63836,7 @@ async function addTypename(config, documents) {
64029
63836
  );
64030
63837
  const field = type.getFields()[node.name.value];
64031
63838
  const fieldType = unwrapType(config, field.type).type;
64032
- if (graphql26.isInterfaceType(fieldType) || graphql26.isUnionType(fieldType)) {
63839
+ if (graphql25.isInterfaceType(fieldType) || graphql25.isUnionType(fieldType)) {
64033
63840
  return {
64034
63841
  ...node,
64035
63842
  selectionSet: {
@@ -64037,9 +63844,9 @@ async function addTypename(config, documents) {
64037
63844
  selections: [
64038
63845
  ...node.selectionSet.selections,
64039
63846
  {
64040
- kind: graphql26.Kind.FIELD,
63847
+ kind: graphql25.Kind.FIELD,
64041
63848
  name: {
64042
- kind: graphql26.Kind.NAME,
63849
+ kind: graphql25.Kind.NAME,
64043
63850
  value: "__typename"
64044
63851
  }
64045
63852
  }
@@ -64056,9 +63863,9 @@ async function addTypename(config, documents) {
64056
63863
  selections: [
64057
63864
  ...node.selectionSet.selections,
64058
63865
  {
64059
- kind: graphql26.Kind.FIELD,
63866
+ kind: graphql25.Kind.FIELD,
64060
63867
  name: {
64061
- kind: graphql26.Kind.NAME,
63868
+ kind: graphql25.Kind.NAME,
64062
63869
  value: "__typename"
64063
63870
  }
64064
63871
  }
@@ -64071,10 +63878,10 @@ async function addTypename(config, documents) {
64071
63878
  }
64072
63879
 
64073
63880
  // src/codegen/transforms/addID.ts
64074
- var graphql27 = __toESM(require("graphql"), 1);
63881
+ var graphql26 = __toESM(require("graphql"), 1);
64075
63882
  async function addID(config, documents) {
64076
63883
  for (const doc of documents) {
64077
- doc.document = graphql27.visit(doc.document, {
63884
+ doc.document = graphql26.visit(doc.document, {
64078
63885
  Field(node, key, parent2, path2, ancestors) {
64079
63886
  if (!node.selectionSet) {
64080
63887
  return;
@@ -64112,7 +63919,7 @@ function addKeysToSelection(config, node, fieldType) {
64112
63919
  if (!node.selectionSet || node.selectionSet.selections.length == 0) {
64113
63920
  return;
64114
63921
  }
64115
- if (!graphql27.isObjectType(fieldType) && !graphql27.isInterfaceType(fieldType)) {
63922
+ if (!graphql26.isObjectType(fieldType) && !graphql26.isInterfaceType(fieldType)) {
64116
63923
  return;
64117
63924
  }
64118
63925
  const keyFields = config.keyFieldsForType(fieldType.name);
@@ -64127,9 +63934,9 @@ function addKeysToSelection(config, node, fieldType) {
64127
63934
  continue;
64128
63935
  }
64129
63936
  selections.push({
64130
- kind: graphql27.Kind.FIELD,
63937
+ kind: graphql26.Kind.FIELD,
64131
63938
  name: {
64132
- kind: graphql27.Kind.NAME,
63939
+ kind: graphql26.Kind.NAME,
64133
63940
  value: keyField
64134
63941
  }
64135
63942
  });
@@ -64144,13 +63951,13 @@ function addKeysToSelection(config, node, fieldType) {
64144
63951
  }
64145
63952
 
64146
63953
  // src/codegen/transforms/componentFields.ts
64147
- var graphql28 = __toESM(require("graphql"), 1);
63954
+ var graphql27 = __toESM(require("graphql"), 1);
64148
63955
  async function componentFields(config, documents) {
64149
63956
  for (const document of documents) {
64150
- const typeInfo = new graphql28.TypeInfo(config.schema);
64151
- document.document = graphql28.visit(
63957
+ const typeInfo = new graphql27.TypeInfo(config.schema);
63958
+ document.document = graphql27.visit(
64152
63959
  document.document,
64153
- graphql28.visitWithTypeInfo(typeInfo, {
63960
+ graphql27.visitWithTypeInfo(typeInfo, {
64154
63961
  Field(node) {
64155
63962
  const parentType = typeInfo.getParentType();
64156
63963
  if (!parentType) {
@@ -64199,10 +64006,10 @@ async function componentFields(config, documents) {
64199
64006
  }
64200
64007
 
64201
64008
  // src/codegen/transforms/runtimeScalars.ts
64202
- var graphql29 = __toESM(require("graphql"), 1);
64009
+ var graphql28 = __toESM(require("graphql"), 1);
64203
64010
  async function addTypename2(config, documents) {
64204
64011
  for (const doc of documents) {
64205
- doc.document = graphql29.visit(doc.document, {
64012
+ doc.document = graphql28.visit(doc.document, {
64206
64013
  VariableDefinition(node) {
64207
64014
  const { type, wrappers } = unwrapType(config, node.type);
64208
64015
  const runtimeScalar = config.configFile.features?.runtimeScalars?.[type.name];
@@ -64241,7 +64048,7 @@ async function addTypename2(config, documents) {
64241
64048
  }
64242
64049
 
64243
64050
  // src/codegen/validators/typeCheck.ts
64244
- var graphql30 = __toESM(require("graphql"), 1);
64051
+ var graphql29 = __toESM(require("graphql"), 1);
64245
64052
  async function typeCheck(config, docs) {
64246
64053
  const errors = [];
64247
64054
  const freeLists = [];
@@ -64249,7 +64056,7 @@ async function typeCheck(config, docs) {
64249
64056
  const listTypes = [];
64250
64057
  const fragments = {};
64251
64058
  for (const { document: parsed, originalString, filename } of docs) {
64252
- graphql30.visit(parsed, {
64059
+ graphql29.visit(parsed, {
64253
64060
  FragmentDefinition(definition) {
64254
64061
  fragments[definition.name.value] = definition;
64255
64062
  },
@@ -64294,14 +64101,14 @@ async function typeCheck(config, docs) {
64294
64101
  );
64295
64102
  return;
64296
64103
  }
64297
- if (graphql30.isListType(rootType) || graphql30.isNonNullType(rootType) && graphql30.isListType(rootType.ofType)) {
64104
+ if (graphql29.isListType(rootType) || graphql29.isNonNullType(rootType) && graphql29.isListType(rootType.ofType)) {
64298
64105
  needsParent = true;
64299
64106
  break;
64300
64107
  }
64301
- if (graphql30.isNonNullType(rootType) && "ofType" in rootType) {
64108
+ if (graphql29.isNonNullType(rootType) && "ofType" in rootType) {
64302
64109
  rootType = rootType.ofType;
64303
64110
  }
64304
- if (graphql30.isScalarType(rootType)) {
64111
+ if (graphql29.isScalarType(rootType)) {
64305
64112
  break;
64306
64113
  }
64307
64114
  rootType = rootType?.getFields()[parent3.name.value]?.type;
@@ -64377,9 +64184,9 @@ async function typeCheck(config, docs) {
64377
64184
  );
64378
64185
  }
64379
64186
  let targetTypes = [type];
64380
- if (graphql30.isUnionType(type)) {
64187
+ if (graphql29.isUnionType(type)) {
64381
64188
  targetTypes = config.schema.getPossibleTypes(type);
64382
- } else if (graphql30.isInterfaceType(type)) {
64189
+ } else if (graphql29.isInterfaceType(type)) {
64383
64190
  try {
64384
64191
  for (const key of config.keyFieldsForType(type.name)) {
64385
64192
  if (!type.getFields()[key]) {
@@ -64415,13 +64222,13 @@ async function typeCheck(config, docs) {
64415
64222
  if (errors.length > 0) {
64416
64223
  throw errors;
64417
64224
  }
64418
- const rules = (filepath) => [...graphql30.specifiedRules].filter(
64225
+ const rules = (filepath) => [...graphql29.specifiedRules].filter(
64419
64226
  (rule) => ![
64420
- graphql30.NoUnusedFragmentsRule,
64421
- graphql30.KnownFragmentNamesRule,
64422
- graphql30.ExecutableDefinitionsRule,
64423
- graphql30.KnownDirectivesRule,
64424
- graphql30.KnownArgumentNamesRule
64227
+ graphql29.NoUnusedFragmentsRule,
64228
+ graphql29.KnownFragmentNamesRule,
64229
+ graphql29.ExecutableDefinitionsRule,
64230
+ graphql29.KnownDirectivesRule,
64231
+ graphql29.KnownArgumentNamesRule
64425
64232
  ].includes(rule)
64426
64233
  ).concat(
64427
64234
  validateLists({
@@ -64442,7 +64249,7 @@ async function typeCheck(config, docs) {
64442
64249
  validateLoadingDirective(config)
64443
64250
  );
64444
64251
  for (const { filename, document: parsed, originalString } of docs) {
64445
- for (const error of graphql30.validate(config.schema, parsed, rules(filename))) {
64252
+ for (const error of graphql29.validate(config.schema, parsed, rules(filename))) {
64446
64253
  errors.push(
64447
64254
  new HoudiniError({
64448
64255
  filepath: filename,
@@ -64471,20 +64278,20 @@ function validateRequiredDirective(config, filepath) {
64471
64278
  if (!node.directives?.some(({ name }) => name.value === config.requiredDirective))
64472
64279
  return;
64473
64280
  const parentType = parentTypeFromAncestors(config.schema, filepath, ancestors);
64474
- if (!graphql30.isObjectType(parentType)) {
64281
+ if (!graphql29.isObjectType(parentType)) {
64475
64282
  ctx.reportError(
64476
- new graphql30.GraphQLError(
64283
+ new graphql29.GraphQLError(
64477
64284
  `@${config.requiredDirective} may only be used on objects, not arguments`
64478
64285
  )
64479
64286
  );
64480
64287
  return;
64481
64288
  }
64482
64289
  const type = parentType.getFields()[node.name.value].type;
64483
- const isServerNullable = !graphql30.isNonNullType(type);
64290
+ const isServerNullable = !graphql29.isNonNullType(type);
64484
64291
  const isAlreadyClientNullable = isClientNullable(node, true);
64485
64292
  if (!isServerNullable && !isAlreadyClientNullable) {
64486
64293
  ctx.reportError(
64487
- new graphql30.GraphQLError(
64294
+ new graphql29.GraphQLError(
64488
64295
  `@${config.requiredDirective} may only be used on nullable fields`
64489
64296
  )
64490
64297
  );
@@ -64506,7 +64313,7 @@ var validateLists = ({
64506
64313
  if (!config.isListFragment(node.name.value)) {
64507
64314
  if (!fragments[node.name.value]) {
64508
64315
  ctx.reportError(
64509
- new graphql30.GraphQLError(
64316
+ new graphql29.GraphQLError(
64510
64317
  "Encountered unknown fragment: " + node.name.value
64511
64318
  )
64512
64319
  );
@@ -64516,7 +64323,7 @@ var validateLists = ({
64516
64323
  const listName = config.listNameFromFragment(node.name.value);
64517
64324
  if (!lists.includes(listName)) {
64518
64325
  ctx.reportError(
64519
- new graphql30.GraphQLError(
64326
+ new graphql29.GraphQLError(
64520
64327
  "Encountered fragment referencing unknown list: " + listName
64521
64328
  )
64522
64329
  );
@@ -64541,7 +64348,7 @@ var validateLists = ({
64541
64348
  );
64542
64349
  if (parentArg) {
64543
64350
  ctx.reportError(
64544
- new graphql30.GraphQLError(
64351
+ new graphql29.GraphQLError(
64545
64352
  `@${config.deprecatedlistDirectiveParentIDArg} should be defined only in it's own directive now`
64546
64353
  )
64547
64354
  );
@@ -64557,7 +64364,7 @@ var validateLists = ({
64557
64364
  return;
64558
64365
  }
64559
64366
  ctx.reportError(
64560
- new graphql30.GraphQLError(
64367
+ new graphql29.GraphQLError(
64561
64368
  `For this list fragment, you need to add or @${config.listParentDirective} or @${config.listAllListsDirective} directive to specify the behavior`
64562
64369
  )
64563
64370
  );
@@ -64567,7 +64374,7 @@ var validateLists = ({
64567
64374
  const directiveName = node.name.value;
64568
64375
  if (directiveName === "connection") {
64569
64376
  ctx.reportError(
64570
- new graphql30.GraphQLError(
64377
+ new graphql29.GraphQLError(
64571
64378
  "@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
64379
  )
64573
64380
  );
@@ -64576,7 +64383,7 @@ var validateLists = ({
64576
64383
  if (!config.isInternalDirective(node.name.value)) {
64577
64384
  if (!config.schema.getDirective(directiveName)) {
64578
64385
  ctx.reportError(
64579
- new graphql30.GraphQLError(
64386
+ new graphql29.GraphQLError(
64580
64387
  "Encountered unknown directive: " + directiveName
64581
64388
  )
64582
64389
  );
@@ -64585,7 +64392,7 @@ var validateLists = ({
64585
64392
  }
64586
64393
  if (config.isListOperationDirective(directiveName) && !listTypes.includes(config.listNameFromDirective(directiveName))) {
64587
64394
  ctx.reportError(
64588
- new graphql30.GraphQLError(
64395
+ new graphql29.GraphQLError(
64589
64396
  "Encountered directive referencing unknown list: " + directiveName
64590
64397
  )
64591
64398
  );
@@ -64596,7 +64403,7 @@ var validateLists = ({
64596
64403
  };
64597
64404
  function knownArguments(config) {
64598
64405
  return function(ctx) {
64599
- const nativeValidator = graphql30.KnownArgumentNamesRule(ctx);
64406
+ const nativeValidator = graphql29.KnownArgumentNamesRule(ctx);
64600
64407
  return {
64601
64408
  ...nativeValidator,
64602
64409
  Directive(directiveNode) {
@@ -64631,7 +64438,7 @@ function validateFragmentArguments(config, filepath, fragments) {
64631
64438
  for (const arg of node.arguments || []) {
64632
64439
  if (arg.value.kind !== "ObjectValue") {
64633
64440
  ctx.reportError(
64634
- new graphql30.GraphQLError("values in @arguments must be an object")
64441
+ new graphql29.GraphQLError("values in @arguments must be an object")
64635
64442
  );
64636
64443
  return;
64637
64444
  }
@@ -64641,13 +64448,13 @@ function validateFragmentArguments(config, filepath, fragments) {
64641
64448
  );
64642
64449
  if (!typeArg) {
64643
64450
  ctx.reportError(
64644
- new graphql30.GraphQLError("missing type field for @arguments directive")
64451
+ new graphql29.GraphQLError("missing type field for @arguments directive")
64645
64452
  );
64646
64453
  return;
64647
64454
  }
64648
- if (typeArg.value.kind !== graphql30.Kind.STRING) {
64455
+ if (typeArg.value.kind !== graphql29.Kind.STRING) {
64649
64456
  ctx.reportError(
64650
- new graphql30.GraphQLError("type field to @arguments must be a string")
64457
+ new graphql29.GraphQLError("type field to @arguments must be a string")
64651
64458
  );
64652
64459
  return;
64653
64460
  }
@@ -64660,7 +64467,7 @@ function validateFragmentArguments(config, filepath, fragments) {
64660
64467
  );
64661
64468
  if (typeArg.value.value !== defaultValueType) {
64662
64469
  ctx.reportError(
64663
- new graphql30.GraphQLError(
64470
+ new graphql29.GraphQLError(
64664
64471
  `Invalid default value provided for ${arg.name.value}. Expected ${typeArg.value.value}, found ${defaultValueType}`
64665
64472
  )
64666
64473
  );
@@ -64678,7 +64485,7 @@ function validateFragmentArguments(config, filepath, fragments) {
64678
64485
  try {
64679
64486
  args = fragmentArguments(config, filepath, fragments[fragmentName]);
64680
64487
  } catch (e) {
64681
- ctx.reportError(new graphql30.GraphQLError(e.message));
64488
+ ctx.reportError(new graphql29.GraphQLError(e.message));
64682
64489
  return;
64683
64490
  }
64684
64491
  fragmentArguments2[fragmentName] = args;
@@ -64701,7 +64508,7 @@ function validateFragmentArguments(config, filepath, fragments) {
64701
64508
  );
64702
64509
  if (missing.length > 0) {
64703
64510
  ctx.reportError(
64704
- new graphql30.GraphQLError(
64511
+ new graphql29.GraphQLError(
64705
64512
  `The following arguments are missing from the "${fragmentName}" fragment: ` + JSON.stringify(missing)
64706
64513
  )
64707
64514
  );
@@ -64712,7 +64519,7 @@ function validateFragmentArguments(config, filepath, fragments) {
64712
64519
  );
64713
64520
  if (unknown.length > 0) {
64714
64521
  ctx.reportError(
64715
- new graphql30.GraphQLError(
64522
+ new graphql29.GraphQLError(
64716
64523
  "Encountered unknown arguments: " + JSON.stringify(unknown)
64717
64524
  )
64718
64525
  );
@@ -64724,7 +64531,7 @@ function validateFragmentArguments(config, filepath, fragments) {
64724
64531
  for (const [applied, target] of zipped) {
64725
64532
  if (!valueIsType(config, applied.value, target)) {
64726
64533
  ctx.reportError(
64727
- new graphql30.GraphQLError(
64534
+ new graphql29.GraphQLError(
64728
64535
  `Invalid argument type. Expected ${target}, found ${applied.value.kind}`
64729
64536
  )
64730
64537
  );
@@ -64766,7 +64573,7 @@ function valueIsType(config, value, targetType) {
64766
64573
  }
64767
64574
  if (value.kind === "EnumValue" && targetType.kind === "NamedType") {
64768
64575
  const enumType = config.schema.getType(targetType.name.value);
64769
- if (!graphql30.isEnumType(enumType)) {
64576
+ if (!graphql29.isEnumType(enumType)) {
64770
64577
  return false;
64771
64578
  }
64772
64579
  return enumType.getValues().some((enumValue) => enumValue.value === value.value);
@@ -64786,7 +64593,7 @@ function paginateArgs(config, filepath) {
64786
64593
  }
64787
64594
  if (alreadyPaginated) {
64788
64595
  ctx.reportError(
64789
- new graphql30.GraphQLError(
64596
+ new graphql29.GraphQLError(
64790
64597
  `@${config.paginateDirective} can only appear in a document once.`
64791
64598
  )
64792
64599
  );
@@ -64818,7 +64625,7 @@ function paginateArgs(config, filepath) {
64818
64625
  const backwards = appliedArgs.has("last");
64819
64626
  if (!forward && !backwards) {
64820
64627
  ctx.reportError(
64821
- new graphql30.GraphQLError(
64628
+ new graphql29.GraphQLError(
64822
64629
  "A field with cursor-based pagination must have a first or last argument"
64823
64630
  )
64824
64631
  );
@@ -64832,7 +64639,7 @@ function paginateArgs(config, filepath) {
64832
64639
  }
64833
64640
  if (forward && backwards && paginateMode === "Infinite") {
64834
64641
  ctx.reportError(
64835
- new graphql30.GraphQLError(
64642
+ new graphql29.GraphQLError(
64836
64643
  `A field with cursor pagination cannot go forwards an backwards simultaneously`
64837
64644
  )
64838
64645
  );
@@ -64846,7 +64653,7 @@ function paginateArgs(config, filepath) {
64846
64653
  );
64847
64654
  if (!appliedLimitArg) {
64848
64655
  ctx.reportError(
64849
- new graphql30.GraphQLError(
64656
+ new graphql29.GraphQLError(
64850
64657
  "A field with offset-based pagination must have a limit argument"
64851
64658
  )
64852
64659
  );
@@ -64862,20 +64669,20 @@ function noUnusedFragmentArguments(config) {
64862
64669
  const args = /* @__PURE__ */ new Set();
64863
64670
  return {
64864
64671
  enter(node) {
64865
- if (node.kind === graphql30.Kind.FRAGMENT_DEFINITION) {
64672
+ if (node.kind === graphql29.Kind.FRAGMENT_DEFINITION) {
64866
64673
  const definitionArguments = node.directives?.filter((directive) => directive.name.value === config.argumentsDirective).flatMap((directive) => directive.arguments);
64867
64674
  for (const arg of definitionArguments?.map((arg2) => arg2?.name.value) || []) {
64868
64675
  args.add(arg);
64869
64676
  }
64870
- } else if (node.kind === graphql30.Kind.VARIABLE) {
64677
+ } else if (node.kind === graphql29.Kind.VARIABLE) {
64871
64678
  args.delete(node.name.value);
64872
64679
  }
64873
64680
  },
64874
64681
  leave(node) {
64875
- if (node.kind === graphql30.Kind.FRAGMENT_DEFINITION) {
64682
+ if (node.kind === graphql29.Kind.FRAGMENT_DEFINITION) {
64876
64683
  if (args.size > 0) {
64877
64684
  ctx.reportError(
64878
- new graphql30.GraphQLError(
64685
+ new graphql29.GraphQLError(
64879
64686
  "Encountered unused fragment arguments: " + [...args].join(",")
64880
64687
  )
64881
64688
  );
@@ -64911,7 +64718,7 @@ function nodeDirectives(config, directives) {
64911
64718
  if (definition.kind === "OperationDefinition") {
64912
64719
  if (definition.operation !== "query") {
64913
64720
  ctx.reportError(
64914
- new graphql30.GraphQLError(
64721
+ new graphql29.GraphQLError(
64915
64722
  `@${node.name.value} must fall on a fragment or query document`
64916
64723
  )
64917
64724
  );
@@ -64923,7 +64730,7 @@ function nodeDirectives(config, directives) {
64923
64730
  }
64924
64731
  if (!possibleNodes.includes(definitionType)) {
64925
64732
  ctx.reportError(
64926
- new graphql30.GraphQLError(paginateOnNonNodeMessage(node.name.value))
64733
+ new graphql29.GraphQLError(paginateOnNonNodeMessage(node.name.value))
64927
64734
  );
64928
64735
  }
64929
64736
  }
@@ -64942,7 +64749,7 @@ function checkMutationOperation(config) {
64942
64749
  );
64943
64750
  if (append && prepend) {
64944
64751
  ctx.reportError(
64945
- new graphql30.GraphQLError(
64752
+ new graphql29.GraphQLError(
64946
64753
  `You can't apply both @${config.listPrependDirective} and @${config.listAppendDirective} at the same time`
64947
64754
  )
64948
64755
  );
@@ -64956,7 +64763,7 @@ function checkMutationOperation(config) {
64956
64763
  );
64957
64764
  if (parentId && allLists) {
64958
64765
  ctx.reportError(
64959
- new graphql30.GraphQLError(
64766
+ new graphql29.GraphQLError(
64960
64767
  `You can't apply both @${config.listParentDirective} and @${config.listAllListsDirective} at the same time`
64961
64768
  )
64962
64769
  );
@@ -64978,7 +64785,7 @@ function checkMaskDirectives(config) {
64978
64785
  );
64979
64786
  if (maskEnableDirective && maskDisableDirective) {
64980
64787
  ctx.reportError(
64981
- new graphql30.GraphQLError(
64788
+ new graphql29.GraphQLError(
64982
64789
  `You can't apply both @${config.maskEnableDirective} and @${config.maskDisableDirective} at the same time`
64983
64790
  )
64984
64791
  );
@@ -65020,7 +64827,7 @@ function validateLoadingDirective(config) {
65020
64827
  );
65021
64828
  if (!parentLoading && !global2) {
65022
64829
  ctx.reportError(
65023
- new graphql30.GraphQLError(
64830
+ new graphql29.GraphQLError(
65024
64831
  `@${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
64832
  )
65026
64833
  );
@@ -65042,7 +64849,7 @@ function validateLoadingDirective(config) {
65042
64849
  );
65043
64850
  if (!parentLoading && !global2) {
65044
64851
  ctx.reportError(
65045
- new graphql30.GraphQLError(
64852
+ new graphql29.GraphQLError(
65046
64853
  `@${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
64854
  )
65048
64855
  );
@@ -65057,7 +64864,7 @@ function getAndVerifyNodeInterface(config) {
65057
64864
  if (!nodeInterface) {
65058
64865
  return null;
65059
64866
  }
65060
- if (!graphql30.isInterfaceType(nodeInterface)) {
64867
+ if (!graphql29.isInterfaceType(nodeInterface)) {
65061
64868
  displayInvalidNodeFieldMessage(config);
65062
64869
  return null;
65063
64870
  }
@@ -65152,11 +64959,11 @@ async function uniqueDocumentNames(config, docs) {
65152
64959
  }
65153
64960
 
65154
64961
  // src/codegen/validators/noIDAlias.ts
65155
- var graphql31 = __toESM(require("graphql"), 1);
64962
+ var graphql30 = __toESM(require("graphql"), 1);
65156
64963
  async function noIDAlias(config, docs) {
65157
64964
  const errors = [];
65158
64965
  for (const { filename, document } of docs) {
65159
- graphql31.visit(document, {
64966
+ graphql30.visit(document, {
65160
64967
  Field(node, _, __, ___, ancestors) {
65161
64968
  const fieldType = parentTypeFromAncestors(config.schema, filename, ancestors).name;
65162
64969
  if (config.keyFieldsForType(fieldType).includes(node.alias?.value || "")) {
@@ -65195,11 +65002,11 @@ async function validatePlugins(config, documents) {
65195
65002
  }
65196
65003
 
65197
65004
  // src/codegen/validators/componentFields.ts
65198
- var graphql32 = __toESM(require("graphql"), 1);
65005
+ var graphql31 = __toESM(require("graphql"), 1);
65199
65006
  async function componentFields2(config, docs) {
65200
65007
  const errors = [];
65201
65008
  for (const { filename: filepath, document } of docs) {
65202
- graphql32.visit(document, {
65009
+ graphql31.visit(document, {
65203
65010
  FragmentDefinition(node, _, __, ___, ancestors) {
65204
65011
  const componentFieldDirective = node.directives?.find(
65205
65012
  (dir) => dir.name.value === config.componentFieldDirective
@@ -65247,7 +65054,7 @@ async function componentFields2(config, docs) {
65247
65054
  if (existingField && existingField.filepath !== filepath) {
65248
65055
  conflict = true;
65249
65056
  } else if (parentType && fieldValue) {
65250
- const fieldDef = graphql32.isObjectType(parentType) && parentType.getFields()[fieldValue];
65057
+ const fieldDef = graphql31.isObjectType(parentType) && parentType.getFields()[fieldValue];
65251
65058
  if (fieldDef && !fieldDef.astNode?.directives?.find(
65252
65059
  (dir) => dir.name.value === config.componentFieldDirective
65253
65060
  )) {
@@ -65260,7 +65067,7 @@ async function componentFields2(config, docs) {
65260
65067
  filepath
65261
65068
  });
65262
65069
  }
65263
- if (parentType && graphql32.isAbstractType(parentType)) {
65070
+ if (parentType && graphql31.isAbstractType(parentType)) {
65264
65071
  errors.push({
65265
65072
  message: `Cannot add component field ${parent2}.${fieldValue} because ${parent2} is an abstract type`,
65266
65073
  filepath
@@ -65481,12 +65288,12 @@ async function processJSFile(config, contents) {
65481
65288
  return documents;
65482
65289
  }
65483
65290
  async function processGraphQLDocument(config, filepath, document) {
65484
- const parsedDoc = graphql33.parse(document);
65291
+ const parsedDoc = graphql32.parse(document);
65485
65292
  const operations = parsedDoc.definitions.filter(
65486
- ({ kind: kind2 }) => kind2 === graphql33.Kind.OPERATION_DEFINITION
65293
+ ({ kind: kind2 }) => kind2 === graphql32.Kind.OPERATION_DEFINITION
65487
65294
  );
65488
65295
  const fragments = parsedDoc.definitions.filter(
65489
- ({ kind: kind2 }) => kind2 === graphql33.Kind.FRAGMENT_DEFINITION
65296
+ ({ kind: kind2 }) => kind2 === graphql32.Kind.FRAGMENT_DEFINITION
65490
65297
  );
65491
65298
  if (operations.length > 1) {
65492
65299
  throw new HoudiniError({