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
@@ -61321,7 +61321,7 @@ function watchAndRun(params) {
61321
61321
  }
61322
61322
 
61323
61323
  // src/codegen/index.ts
61324
- var graphql33 = __toESM(require("graphql"), 1);
61324
+ var graphql32 = __toESM(require("graphql"), 1);
61325
61325
 
61326
61326
  // src/lib/pipeline.ts
61327
61327
  async function runPipeline(config2, pipeline2, target) {
@@ -64582,47 +64582,6 @@ function deepMerge(...objects) {
64582
64582
  return mergedObj;
64583
64583
  }
64584
64584
 
64585
- // src/runtime/lib/scalars.ts
64586
- async function marshalSelection({
64587
- selection,
64588
- data
64589
- }) {
64590
- const config2 = getCurrentConfig();
64591
- if (data === null || typeof data === "undefined") {
64592
- return data;
64593
- }
64594
- if (Array.isArray(data)) {
64595
- return await Promise.all(data.map((val) => marshalSelection({ selection, data: val })));
64596
- }
64597
- const targetSelection = getFieldsForType(selection, data["__typename"], false);
64598
- return Object.fromEntries(
64599
- await Promise.all(
64600
- Object.entries(data).map(async ([fieldName, value]) => {
64601
- const { type, selection: selection2 } = targetSelection[fieldName];
64602
- if (!type) {
64603
- return [fieldName, value];
64604
- }
64605
- if (selection2) {
64606
- return [fieldName, await marshalSelection({ selection: selection2, data: value })];
64607
- }
64608
- if (config2.scalars?.[type]) {
64609
- const marshalFn = config2.scalars[type].marshal;
64610
- if (!marshalFn) {
64611
- throw new Error(
64612
- `scalar type ${type} is missing a \`marshal\` function. see https://github.com/AlecAivazis/houdini#%EF%B8%8Fcustom-scalars`
64613
- );
64614
- }
64615
- if (Array.isArray(value)) {
64616
- return [fieldName, value.map(marshalFn)];
64617
- }
64618
- return [fieldName, marshalFn(value)];
64619
- }
64620
- return [fieldName, value];
64621
- })
64622
- )
64623
- );
64624
- }
64625
-
64626
64585
  // src/runtime/lib/types.ts
64627
64586
  var CachePolicy = {
64628
64587
  CacheOrNetwork: "CacheOrNetwork",
@@ -64650,11 +64609,6 @@ var RefetchUpdateMode = {
64650
64609
  prepend: "prepend",
64651
64610
  replace: "replace"
64652
64611
  };
64653
- var DataSource = {
64654
- Cache: "cache",
64655
- Network: "network",
64656
- Ssr: "ssr"
64657
- };
64658
64612
  var fragmentKey = " $fragments";
64659
64613
  var PendingValue = Symbol("houdini_loading");
64660
64614
 
@@ -68425,202 +68379,6 @@ var cache_default = new Cache();
68425
68379
  // src/runtime/client/plugins/cache.ts
68426
68380
  var serverSide = typeof globalThis.window === "undefined";
68427
68381
 
68428
- // src/runtime/client/utils/documentPlugins.ts
68429
- var documentPlugin = (kind, source) => {
68430
- return () => {
68431
- const sourceHandlers = source();
68432
- const enterWrapper = (handler) => {
68433
- return !handler ? void 0 : (ctx, handlers) => {
68434
- if (ctx.artifact.kind !== kind) {
68435
- return handlers.next(ctx);
68436
- }
68437
- return handler(ctx, handlers);
68438
- };
68439
- };
68440
- const exitWrapper = (handler) => {
68441
- return !handler ? void 0 : (ctx, handlers) => {
68442
- if (ctx.artifact.kind !== kind) {
68443
- return handlers.resolve(ctx);
68444
- }
68445
- return handler(ctx, handlers);
68446
- };
68447
- };
68448
- return {
68449
- start: enterWrapper(sourceHandlers.start),
68450
- network: enterWrapper(sourceHandlers.network),
68451
- afterNetwork: exitWrapper(sourceHandlers.afterNetwork),
68452
- end: exitWrapper(sourceHandlers.end),
68453
- catch: sourceHandlers.catch ? (ctx, handlers) => sourceHandlers.catch(ctx, handlers) : void 0,
68454
- cleanup: (...args) => sourceHandlers.cleanup?.(...args)
68455
- };
68456
- };
68457
- };
68458
-
68459
- // src/runtime/client/plugins/query.ts
68460
- var query = documentPlugin(ArtifactKind.Query, function() {
68461
- let subscriptionSpec = null;
68462
- let lastVariables = null;
68463
- return {
68464
- start(ctx, { next }) {
68465
- const runtimeScalarPayload = {
68466
- session: ctx.session
68467
- };
68468
- ctx.variables = {
68469
- ...lastVariables,
68470
- ...Object.fromEntries(
68471
- Object.entries(ctx.artifact.input?.runtimeScalars ?? {}).map(
68472
- ([field, type]) => {
68473
- const runtimeScalar = ctx.config.features?.runtimeScalars?.[type];
68474
- if (!runtimeScalar) {
68475
- return [field, type];
68476
- }
68477
- return [field, runtimeScalar.resolve(runtimeScalarPayload)];
68478
- }
68479
- )
68480
- ),
68481
- ...ctx.variables
68482
- };
68483
- next(ctx);
68484
- },
68485
- end(ctx, { resolve: resolve2, marshalVariables, variablesChanged }) {
68486
- if (variablesChanged(ctx) && !ctx.cacheParams?.disableSubscriptions) {
68487
- if (subscriptionSpec) {
68488
- cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
68489
- }
68490
- lastVariables = { ...marshalVariables(ctx) };
68491
- const variables = lastVariables;
68492
- subscriptionSpec = {
68493
- rootType: ctx.artifact.rootType,
68494
- selection: ctx.artifact.selection,
68495
- variables: () => variables,
68496
- set: (newValue) => {
68497
- resolve2(ctx, {
68498
- data: newValue,
68499
- errors: null,
68500
- fetching: false,
68501
- partial: false,
68502
- stale: false,
68503
- source: DataSource.Cache,
68504
- variables: ctx.variables ?? {}
68505
- });
68506
- }
68507
- };
68508
- cache_default.subscribe(subscriptionSpec, lastVariables);
68509
- }
68510
- resolve2(ctx);
68511
- },
68512
- cleanup() {
68513
- if (subscriptionSpec) {
68514
- cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.());
68515
- lastVariables = null;
68516
- }
68517
- }
68518
- };
68519
- });
68520
-
68521
- // src/runtime/client/plugins/fragment.ts
68522
- var fragment = documentPlugin(ArtifactKind.Fragment, function() {
68523
- let subscriptionSpec = null;
68524
- let lastReference = null;
68525
- return {
68526
- start(ctx, { next, resolve: resolve2, variablesChanged, marshalVariables }) {
68527
- if (!ctx.stuff.parentID) {
68528
- return next(ctx);
68529
- }
68530
- const currentReference = {
68531
- parent: ctx.stuff.parentID,
68532
- variables: marshalVariables(ctx)
68533
- };
68534
- if (!ctx.cacheParams?.disableSubscriptions && (!deepEquals(lastReference, currentReference) || variablesChanged(ctx))) {
68535
- if (subscriptionSpec) {
68536
- cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
68537
- }
68538
- const variables = marshalVariables(ctx);
68539
- subscriptionSpec = {
68540
- rootType: ctx.artifact.rootType,
68541
- selection: ctx.artifact.selection,
68542
- variables: () => variables,
68543
- parentID: ctx.stuff.parentID,
68544
- set: (newValue) => {
68545
- resolve2(ctx, {
68546
- data: newValue,
68547
- errors: null,
68548
- fetching: false,
68549
- partial: false,
68550
- stale: false,
68551
- source: DataSource.Cache,
68552
- variables
68553
- });
68554
- }
68555
- };
68556
- cache_default.subscribe(subscriptionSpec, variables);
68557
- lastReference = currentReference;
68558
- }
68559
- next(ctx);
68560
- },
68561
- cleanup() {
68562
- if (subscriptionSpec) {
68563
- cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.());
68564
- }
68565
- }
68566
- };
68567
- });
68568
-
68569
- // src/runtime/client/plugins/mutation.ts
68570
- var mutation = documentPlugin(ArtifactKind.Mutation, () => {
68571
- return {
68572
- async start(ctx, { next, marshalVariables }) {
68573
- const layerOptimistic = cache_default._internal_unstable.storage.createLayer(true);
68574
- const optimisticResponse = ctx.stuff.optimisticResponse;
68575
- let toNotify = [];
68576
- if (optimisticResponse) {
68577
- toNotify = cache_default.write({
68578
- selection: ctx.artifact.selection,
68579
- data: await marshalSelection({
68580
- selection: ctx.artifact.selection,
68581
- data: optimisticResponse
68582
- }),
68583
- variables: marshalVariables(ctx),
68584
- layer: layerOptimistic.id
68585
- });
68586
- }
68587
- ctx.cacheParams = {
68588
- ...ctx.cacheParams,
68589
- layer: layerOptimistic,
68590
- notifySubscribers: toNotify,
68591
- forceNotify: true
68592
- };
68593
- next(ctx);
68594
- },
68595
- afterNetwork(ctx, { resolve: resolve2 }) {
68596
- if (ctx.cacheParams?.layer) {
68597
- cache_default.clearLayer(ctx.cacheParams.layer.id);
68598
- }
68599
- resolve2(ctx);
68600
- },
68601
- end(ctx, { resolve: resolve2, value }) {
68602
- const hasErrors = value.errors && value.errors.length > 0;
68603
- if (hasErrors) {
68604
- if (ctx.cacheParams?.layer) {
68605
- cache_default.clearLayer(ctx.cacheParams.layer.id);
68606
- }
68607
- }
68608
- if (ctx.cacheParams?.layer) {
68609
- cache_default._internal_unstable.storage.resolveLayer(ctx.cacheParams.layer.id);
68610
- }
68611
- resolve2(ctx);
68612
- },
68613
- catch(ctx, { error }) {
68614
- if (ctx.cacheParams?.layer) {
68615
- const { layer } = ctx.cacheParams;
68616
- cache_default.clearLayer(layer.id);
68617
- cache_default._internal_unstable.storage.resolveLayer(layer.id);
68618
- }
68619
- throw error;
68620
- }
68621
- };
68622
- });
68623
-
68624
68382
  // src/lib/types.ts
68625
68383
  var LogLevel = {
68626
68384
  Full: "full",
@@ -69634,7 +69392,7 @@ function formatErrors(e2, afterError) {
69634
69392
  afterError?.(e2);
69635
69393
  }
69636
69394
  }
69637
- function unwrapType(config2, type, wrappers = []) {
69395
+ function unwrapType(config2, type, wrappers = [], convertRuntimeScalars) {
69638
69396
  if (type.kind === "NonNullType") {
69639
69397
  return unwrapType(config2, type.type, [TypeWrapper.NonNull, ...wrappers]);
69640
69398
  }
@@ -69650,6 +69408,11 @@ function unwrapType(config2, type, wrappers = []) {
69650
69408
  if (type instanceof graphql3.GraphQLList) {
69651
69409
  return unwrapType(config2, type.ofType, [TypeWrapper.List, ...wrappers]);
69652
69410
  }
69411
+ if (convertRuntimeScalars && config2.configFile.features?.runtimeScalars?.[type.name.value]) {
69412
+ type = config2.schema.getType(
69413
+ config2.configFile.features?.runtimeScalars?.[type.name.value].type
69414
+ );
69415
+ }
69653
69416
  const namedType = config2.schema.getType(type.name.value || type.name);
69654
69417
  if (!namedType) {
69655
69418
  throw new Error("Unknown type: " + type.name.value || type.name);
@@ -69789,6 +69552,231 @@ async function cleanupFiles(pathFolder, listOfObj) {
69789
69552
  return allFilesNotInList;
69790
69553
  }
69791
69554
 
69555
+ // src/runtime/router/match.ts
69556
+ var param_pattern = /^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;
69557
+ function parse_page_pattern(id) {
69558
+ const params = [];
69559
+ const pattern = id === "/" ? /^\/$/ : new RegExp(
69560
+ `^${get_route_segments(id).map((segment) => {
69561
+ const rest_match = /^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(segment);
69562
+ if (rest_match) {
69563
+ params.push({
69564
+ name: rest_match[1],
69565
+ matcher: rest_match[2],
69566
+ optional: false,
69567
+ rest: true,
69568
+ chained: true
69569
+ });
69570
+ return "(?:/(.*))?";
69571
+ }
69572
+ const optional_match = /^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(segment);
69573
+ if (optional_match) {
69574
+ params.push({
69575
+ name: optional_match[1],
69576
+ matcher: optional_match[2],
69577
+ optional: true,
69578
+ rest: false,
69579
+ chained: true
69580
+ });
69581
+ return "(?:/([^/]+))?";
69582
+ }
69583
+ if (!segment) {
69584
+ return;
69585
+ }
69586
+ const parts = segment.split(/\[(.+?)\](?!\])/);
69587
+ const result = parts.map((content, i2) => {
69588
+ if (i2 % 2) {
69589
+ if (content.startsWith("x+")) {
69590
+ return escape2(
69591
+ String.fromCharCode(parseInt(content.slice(2), 16))
69592
+ );
69593
+ }
69594
+ if (content.startsWith("u+")) {
69595
+ return escape2(
69596
+ String.fromCharCode(
69597
+ ...content.slice(2).split("-").map((code) => parseInt(code, 16))
69598
+ )
69599
+ );
69600
+ }
69601
+ const match = param_pattern.exec(content);
69602
+ if (!match) {
69603
+ throw new Error(
69604
+ `Invalid param: ${content}. Params and matcher names can only have underscores and alphanumeric characters.`
69605
+ );
69606
+ }
69607
+ const [, is_optional, is_rest, name, matcher] = match;
69608
+ params.push({
69609
+ name,
69610
+ matcher,
69611
+ optional: !!is_optional,
69612
+ rest: !!is_rest,
69613
+ chained: is_rest ? i2 === 1 && parts[0] === "" : false
69614
+ });
69615
+ return is_rest ? "(.*?)" : is_optional ? "([^/]*)?" : "([^/]+?)";
69616
+ }
69617
+ return escape2(content);
69618
+ }).join("");
69619
+ return "/" + result;
69620
+ }).join("")}/?$`
69621
+ );
69622
+ return { pattern, params, page_id: id };
69623
+ }
69624
+ function affects_path(segment) {
69625
+ return !/^\([^)]+\)$/.test(segment);
69626
+ }
69627
+ function get_route_segments(route) {
69628
+ return route.slice(1).split("/").filter(affects_path);
69629
+ }
69630
+ function escape2(str) {
69631
+ return str.normalize().replace(/[[\]]/g, "\\$&").replace(/%/g, "%25").replace(/\//g, "%2[Ff]").replace(/\?/g, "%3[Ff]").replace(/#/g, "%23").replace(/[.*+?^${}()|\\]/g, "\\$&");
69632
+ }
69633
+
69634
+ // src/lib/typescript.ts
69635
+ var graphql4 = __toESM(require("graphql"), 1);
69636
+ var recast2 = __toESM(require_main2(), 1);
69637
+ var AST2 = recast2.types.builders;
69638
+ function unwrappedTsTypeReference(config2, filepath, missingScalars, {
69639
+ type,
69640
+ wrappers
69641
+ }, body) {
69642
+ let result;
69643
+ if (graphql4.isScalarType(type)) {
69644
+ result = scalarPropertyValue(config2, filepath, missingScalars, type, body, null);
69645
+ } else if (graphql4.isEnumType(type)) {
69646
+ result = enumReference(config2, body, type.name);
69647
+ } else {
69648
+ result = AST2.tsTypeReference(AST2.identifier(type.name));
69649
+ }
69650
+ for (const toWrap of wrappers) {
69651
+ if (toWrap === "NonNull" /* NonNull */) {
69652
+ continue;
69653
+ } else if (toWrap === "Nullable" /* Nullable */) {
69654
+ result = nullableField(result, true);
69655
+ } else if (toWrap === "List" /* List */) {
69656
+ result = AST2.tsArrayType(AST2.tsParenthesizedType(result));
69657
+ }
69658
+ }
69659
+ return result;
69660
+ }
69661
+ function tsTypeReference(config2, filepath, missingScalars, definition, body) {
69662
+ const { type, wrappers } = unwrapType(config2, definition.type);
69663
+ return unwrappedTsTypeReference(
69664
+ config2,
69665
+ filepath,
69666
+ missingScalars,
69667
+ { type, wrappers },
69668
+ body
69669
+ );
69670
+ }
69671
+ function enumReference(config2, body, name) {
69672
+ ensureImports({
69673
+ config: config2,
69674
+ body,
69675
+ import: ["ValueOf"],
69676
+ importKind: "type",
69677
+ sourceModule: "$houdini/runtime/lib/types"
69678
+ });
69679
+ return AST2.tsTypeReference(
69680
+ AST2.identifier("ValueOf"),
69681
+ AST2.tsTypeParameterInstantiation([AST2.tsTypeQuery(AST2.identifier(name))])
69682
+ );
69683
+ }
69684
+ function readonlyProperty(prop, enable = true) {
69685
+ if (enable) {
69686
+ prop.readonly = true;
69687
+ }
69688
+ return prop;
69689
+ }
69690
+ function nullableField(inner, input = false) {
69691
+ const members = [inner, AST2.tsNullKeyword()];
69692
+ if (input) {
69693
+ members.push(AST2.tsUndefinedKeyword());
69694
+ }
69695
+ return AST2.tsUnionType(members);
69696
+ }
69697
+ function scalarPropertyValue(config2, filepath, missingScalars, target, body, field) {
69698
+ if (config2.configFile.features?.componentFields && target.name === config2.componentScalar) {
69699
+ if (!field) {
69700
+ return AST2.tsNeverKeyword();
69701
+ }
69702
+ const component = config2.componentFields[field.parent][field.field];
69703
+ const sourcePathRelative = path_exports.relative(
69704
+ path_exports.join(config2.projectRoot, "src"),
69705
+ component.filepath
69706
+ );
69707
+ let sourcePathParsed = path_exports.parse(sourcePathRelative);
69708
+ let sourcePath = path_exports.join(sourcePathParsed.dir, sourcePathParsed.name);
69709
+ const localImport = ensureImports({
69710
+ config: config2,
69711
+ body,
69712
+ import: "__component__" + component.fragment,
69713
+ sourceModule: path_exports.join(
69714
+ path_exports.relative(path_exports.dirname(filepath), config2.projectRoot),
69715
+ "src",
69716
+ sourcePath
69717
+ )
69718
+ }) ?? "__component__" + component.fragment;
69719
+ const parameters = AST2.tsTypeReference(AST2.identifier("Parameters"));
69720
+ parameters.typeParameters = AST2.tsTypeParameterInstantiation([
69721
+ AST2.tsTypeQuery(AST2.identifier(localImport))
69722
+ ]);
69723
+ const indexed = AST2.tsIndexedAccessType(
69724
+ parameters,
69725
+ AST2.tsLiteralType(AST2.numericLiteral(0))
69726
+ );
69727
+ const omit = AST2.tsTypeReference(AST2.identifier("Omit"));
69728
+ omit.typeParameters = AST2.tsTypeParameterInstantiation([
69729
+ indexed,
69730
+ AST2.tsLiteralType(AST2.stringLiteral(component.prop))
69731
+ ]);
69732
+ const arg = AST2.identifier("props");
69733
+ arg.typeAnnotation = AST2.tsTypeAnnotation(omit);
69734
+ const returnType = AST2.tsTypeReference(AST2.identifier("ReturnType"));
69735
+ returnType.typeParameters = AST2.tsTypeParameterInstantiation([
69736
+ AST2.tsTypeQuery(AST2.identifier(localImport))
69737
+ ]);
69738
+ const fnType = AST2.tsFunctionType([arg]);
69739
+ fnType.typeAnnotation = AST2.tsTypeAnnotation(returnType);
69740
+ return fnType;
69741
+ }
69742
+ switch (target.name) {
69743
+ case "String": {
69744
+ return AST2.tsStringKeyword();
69745
+ }
69746
+ case "Int": {
69747
+ return AST2.tsNumberKeyword();
69748
+ }
69749
+ case "Float": {
69750
+ return AST2.tsNumberKeyword();
69751
+ }
69752
+ case "Boolean": {
69753
+ return AST2.tsBooleanKeyword();
69754
+ }
69755
+ case "ID": {
69756
+ return AST2.tsStringKeyword();
69757
+ }
69758
+ default: {
69759
+ if (graphql4.isNonNullType(target) && "ofType" in target) {
69760
+ return scalarPropertyValue(
69761
+ config2,
69762
+ filepath,
69763
+ missingScalars,
69764
+ target.ofType,
69765
+ body,
69766
+ field
69767
+ );
69768
+ }
69769
+ if (config2.scalars?.[target.name]) {
69770
+ return AST2.tsTypeReference(AST2.identifier(config2.scalars?.[target.name].type));
69771
+ }
69772
+ if (target.name !== config2.componentScalar) {
69773
+ missingScalars.add(target.name);
69774
+ }
69775
+ return AST2.tsAnyKeyword();
69776
+ }
69777
+ }
69778
+ }
69779
+
69792
69780
  // ../../node_modules/.pnpm/estree-walker@3.0.1/node_modules/estree-walker/src/walker.js
69793
69781
  var WalkerBase = class {
69794
69782
  constructor() {
@@ -69902,7 +69890,7 @@ async function asyncWalk(ast, { enter, leave }) {
69902
69890
  }
69903
69891
 
69904
69892
  // src/lib/walk.ts
69905
- var graphql4 = __toESM(require("graphql"), 1);
69893
+ var graphql5 = __toESM(require("graphql"), 1);
69906
69894
  async function find_graphql(config2, parsedScript, walker) {
69907
69895
  await asyncWalk(parsedScript, {
69908
69896
  async enter(node, parent2) {
@@ -69957,7 +69945,7 @@ async function find_graphql(config2, parsedScript, walker) {
69957
69945
  } else if (!documentString) {
69958
69946
  return;
69959
69947
  }
69960
- const parsedTag = graphql4.parse(documentString);
69948
+ const parsedTag = graphql5.parse(documentString);
69961
69949
  if (walker.where && !walker.where(parsedTag, { node, parent: parent2 })) {
69962
69950
  return;
69963
69951
  }
@@ -70089,7 +70077,7 @@ function extractAnonymousQuery(config2, raw, expr, propName) {
70089
70077
  };
70090
70078
  return defs.concat([
70091
70079
  {
70092
- raw: graphql4.print(parsed),
70080
+ raw: graphql5.print(parsed),
70093
70081
  parsed
70094
70082
  }
70095
70083
  ]);
@@ -70230,7 +70218,7 @@ function serialized_manifest_path(config2, base = base_dir(config2)) {
70230
70218
 
70231
70219
  // src/lib/router/manifest.ts
70232
70220
  var t2 = __toESM(require_lib6(), 1);
70233
- var graphql5 = __toESM(require("graphql"), 1);
70221
+ var graphql6 = __toESM(require("graphql"), 1);
70234
70222
  async function load_manifest(args) {
70235
70223
  const manifest = await walk_routes({
70236
70224
  config: args.config,
@@ -70247,7 +70235,8 @@ async function load_manifest(args) {
70247
70235
  local_yoga: false
70248
70236
  },
70249
70237
  queries: [],
70250
- layouts: []
70238
+ layouts: [],
70239
+ variables: {}
70251
70240
  });
70252
70241
  if (args.includeArtifacts) {
70253
70242
  try {
@@ -70278,6 +70267,7 @@ async function walk_routes(args) {
70278
70267
  const directory_contents = await fs_exports.readdir(args.filepath, {
70279
70268
  withFileTypes: true
70280
70269
  });
70270
+ const variables = { ...args.variables };
70281
70271
  let newLayouts = args.layouts;
70282
70272
  let newLayoutQueries = args.queries;
70283
70273
  let layout = null;
@@ -70301,7 +70291,8 @@ async function walk_routes(args) {
70301
70291
  url: args.url,
70302
70292
  project: args.project,
70303
70293
  type: "layout",
70304
- contents: layoutQueryContents
70294
+ contents: layoutQueryContents,
70295
+ variables
70305
70296
  });
70306
70297
  newLayoutQueries = [...args.queries, layoutQuery.name];
70307
70298
  }
@@ -70314,7 +70305,8 @@ async function walk_routes(args) {
70314
70305
  contents: layoutViewContents,
70315
70306
  layouts: args.layouts,
70316
70307
  queries: newLayoutQueries,
70317
- config: args.config
70308
+ config: args.config,
70309
+ variables
70318
70310
  });
70319
70311
  newLayouts = [...args.layouts, page_id(layout.url)];
70320
70312
  }
@@ -70325,7 +70317,8 @@ async function walk_routes(args) {
70325
70317
  url: args.url,
70326
70318
  project: args.project,
70327
70319
  type: "page",
70328
- contents: pageQueryContents
70320
+ contents: pageQueryContents,
70321
+ variables
70329
70322
  });
70330
70323
  }
70331
70324
  if (pageViewContents) {
@@ -70337,7 +70330,8 @@ async function walk_routes(args) {
70337
70330
  contents: pageViewContents,
70338
70331
  layouts: newLayouts,
70339
70332
  queries: pageQuery ? [...newLayoutQueries, pageQuery.name] : newLayoutQueries,
70340
- config: args.config
70333
+ config: args.config,
70334
+ variables
70341
70335
  });
70342
70336
  }
70343
70337
  await Promise.all(
@@ -70350,7 +70344,8 @@ async function walk_routes(args) {
70350
70344
  filepath: path_exports.join(args.filepath, dir.name),
70351
70345
  url: `${args.url}${dir.name}/`,
70352
70346
  queries: newLayoutQueries,
70353
- layouts: newLayouts
70347
+ layouts: newLayouts,
70348
+ variables
70354
70349
  });
70355
70350
  })
70356
70351
  );
@@ -70372,12 +70367,18 @@ async function add_view(args) {
70372
70367
  url: args.url,
70373
70368
  layouts: args.layouts,
70374
70369
  path: path_exports.relative(args.config.projectRoot, args.path),
70375
- query_options: args.queries
70370
+ query_options: args.queries,
70371
+ params: Object.fromEntries(
70372
+ parse_page_pattern(args.url).params.map((param) => [
70373
+ param.name,
70374
+ args.variables[param.name] ?? null
70375
+ ])
70376
+ )
70376
70377
  };
70377
70378
  return target[id];
70378
70379
  }
70379
70380
  async function add_query(args) {
70380
- const parsed = graphql5.parse(args.contents);
70381
+ const parsed = graphql6.parse(args.contents);
70381
70382
  const query2 = parsed.definitions.find(
70382
70383
  (def) => def.kind === "OperationDefinition" && def.operation === "query"
70383
70384
  );
@@ -70385,20 +70386,30 @@ async function add_query(args) {
70385
70386
  throw new Error("No query found");
70386
70387
  }
70387
70388
  let loading = false;
70388
- await graphql5.visit(parsed, {
70389
+ await graphql6.visit(parsed, {
70389
70390
  Directive(node) {
70390
70391
  if (node.name.value === args.config.loadingDirective) {
70391
70392
  loading = true;
70392
70393
  }
70393
70394
  }
70394
70395
  });
70396
+ const queryVariables = Object.fromEntries(
70397
+ query2.variableDefinitions?.map((variable) => {
70398
+ const { type, wrappers } = unwrapType(args.config, variable.type, [], true);
70399
+ return [
70400
+ variable.variable.name.value,
70401
+ { wrappers, type: type.name }
70402
+ ];
70403
+ }) ?? []
70404
+ );
70405
+ Object.assign(args.variables, queryVariables);
70395
70406
  const target = args.type === "page" ? args.project.page_queries : args.project.layout_queries;
70396
70407
  target[page_id(args.url)] = {
70397
70408
  path: path_exports.relative(args.config.routesDir, args.path),
70398
70409
  name: query2.name.value,
70399
70410
  url: args.url,
70400
70411
  loading,
70401
- variables: query2.variableDefinitions?.map((variable) => variable.variable.name.value) ?? []
70412
+ variables: queryVariables
70402
70413
  };
70403
70414
  return target[page_id(args.url)];
70404
70415
  }
@@ -70494,8 +70505,8 @@ async function loadLocalSchema(config2) {
70494
70505
  }
70495
70506
 
70496
70507
  // src/codegen/generators/artifacts/index.ts
70497
- var graphql16 = __toESM(require("graphql"), 1);
70498
- var recast4 = __toESM(require_main2(), 1);
70508
+ var graphql17 = __toESM(require("graphql"), 1);
70509
+ var recast5 = __toESM(require_main2(), 1);
70499
70510
 
70500
70511
  // src/codegen/utils/commonjs.ts
70501
70512
  var cjsIndexFilePreamble = `"use strict";
@@ -70737,19 +70748,19 @@ var FieldCollection = class {
70737
70748
  };
70738
70749
 
70739
70750
  // src/codegen/utils/moduleExport.ts
70740
- var recast2 = __toESM(require_main2(), 1);
70741
- var AST2 = recast2.types.builders;
70751
+ var recast3 = __toESM(require_main2(), 1);
70752
+ var AST3 = recast3.types.builders;
70742
70753
  function moduleExport(config2, key, value) {
70743
70754
  if (config2.module === "commonjs") {
70744
- let target = AST2.memberExpression(AST2.identifier("module"), AST2.identifier("exports"));
70755
+ let target = AST3.memberExpression(AST3.identifier("module"), AST3.identifier("exports"));
70745
70756
  if (key !== "default") {
70746
- target = AST2.memberExpression(target, AST2.identifier(key));
70757
+ target = AST3.memberExpression(target, AST3.identifier(key));
70747
70758
  }
70748
- return AST2.expressionStatement(AST2.assignmentExpression("=", target, value));
70759
+ return AST3.expressionStatement(AST3.assignmentExpression("=", target, value));
70749
70760
  }
70750
- return key === "default" ? AST2.exportDefaultDeclaration(value) : AST2.exportNamedDeclaration(
70751
- AST2.variableDeclaration("const", [
70752
- AST2.variableDeclarator(AST2.identifier(key), value)
70761
+ return key === "default" ? AST3.exportDefaultDeclaration(value) : AST3.exportNamedDeclaration(
70762
+ AST3.variableDeclaration("const", [
70763
+ AST3.variableDeclarator(AST3.identifier(key), value)
70753
70764
  ])
70754
70765
  );
70755
70766
  }
@@ -71006,7 +71017,7 @@ var serialize = (value, { json, lossy } = {}) => {
71006
71017
  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));
71007
71018
 
71008
71019
  // src/codegen/transforms/fragmentVariables.ts
71009
- var graphql7 = __toESM(require("graphql"), 1);
71020
+ var graphql8 = __toESM(require("graphql"), 1);
71010
71021
 
71011
71022
  // src/codegen/utils/stripLoc.ts
71012
71023
  function stripLoc(value) {
@@ -71027,13 +71038,13 @@ function stripLoc(value) {
71027
71038
  }
71028
71039
 
71029
71040
  // src/codegen/transforms/collectDefinitions.ts
71030
- var graphql6 = __toESM(require("graphql"), 1);
71031
- var import_graphql31 = require("graphql");
71041
+ var graphql7 = __toESM(require("graphql"), 1);
71042
+ var import_graphql32 = require("graphql");
71032
71043
  async function includeFragmentDefinitions(config2, documents) {
71033
71044
  const fragments = collectDefinitions(config2, documents);
71034
71045
  for (const [index, { name, document, filename }] of documents.entries()) {
71035
71046
  const operation = document.definitions.find(
71036
- (def) => def.kind === import_graphql31.Kind.OPERATION_DEFINITION || def.kind === "FragmentDefinition"
71047
+ (def) => def.kind === import_graphql32.Kind.OPERATION_DEFINITION || def.kind === "FragmentDefinition"
71037
71048
  );
71038
71049
  if (!operation) {
71039
71050
  continue;
@@ -71077,10 +71088,10 @@ function collectDefinitions(config2, docs) {
71077
71088
  }
71078
71089
  function findRequiredFragments(config2, definition) {
71079
71090
  const referencedFragments = [];
71080
- const typeInfo = new graphql6.TypeInfo(config2.schema);
71081
- definition.selectionSet = graphql6.visit(
71091
+ const typeInfo = new graphql7.TypeInfo(config2.schema);
71092
+ definition.selectionSet = graphql7.visit(
71082
71093
  definition,
71083
- graphql6.visitWithTypeInfo(typeInfo, {
71094
+ graphql7.visitWithTypeInfo(typeInfo, {
71084
71095
  FragmentSpread(node) {
71085
71096
  referencedFragments.push(node.name.value);
71086
71097
  }
@@ -71114,7 +71125,7 @@ function flattenFragments(filepath, operation, fragments) {
71114
71125
  }
71115
71126
 
71116
71127
  // src/codegen/transforms/fragmentVariables.ts
71117
- var GraphqlKinds2 = graphql7.Kind;
71128
+ var GraphqlKinds2 = graphql8.Kind;
71118
71129
  async function fragmentVariables(config2, documents) {
71119
71130
  const fragments = collectDefinitions(config2, documents);
71120
71131
  const generatedFragments = {};
@@ -71137,7 +71148,7 @@ async function fragmentVariables(config2, documents) {
71137
71148
  });
71138
71149
  }
71139
71150
  const doc = {
71140
- kind: graphql7.Kind.DOCUMENT,
71151
+ kind: graphql8.Kind.DOCUMENT,
71141
71152
  definitions: Object.values(generatedFragments)
71142
71153
  };
71143
71154
  documents.push({
@@ -71208,7 +71219,7 @@ function inlineFragmentArgs({
71208
71219
  return null;
71209
71220
  };
71210
71221
  const result = esm_default(
71211
- graphql7.visit(document, {
71222
+ graphql8.visit(document, {
71212
71223
  FragmentSpread(node) {
71213
71224
  if (!fragmentDefinitions[node.name.value]) {
71214
71225
  throw new Error("Could not find definition for fragment" + node.name.value);
@@ -71294,7 +71305,7 @@ function inlineFragmentArgs({
71294
71305
  );
71295
71306
  if (newName) {
71296
71307
  result.name = {
71297
- kind: graphql7.Kind.NAME,
71308
+ kind: graphql8.Kind.NAME,
71298
71309
  value: newName
71299
71310
  };
71300
71311
  }
@@ -71461,7 +71472,7 @@ ${exportDefaultFrom(`./${doc.name}`, doc.name)}`,
71461
71472
  }
71462
71473
 
71463
71474
  // src/codegen/generators/artifacts/inputs.ts
71464
- var graphql8 = __toESM(require("graphql"), 1);
71475
+ var graphql9 = __toESM(require("graphql"), 1);
71465
71476
  function inputObject(config2, inputs, runtimeScalars) {
71466
71477
  const visitedTypes = /* @__PURE__ */ new Set();
71467
71478
  const inputObj = {
@@ -71491,10 +71502,10 @@ function walkInputs(config2, visitedTypes, inputObj, rootType) {
71491
71502
  if (visitedTypes.has(type.name)) {
71492
71503
  return;
71493
71504
  }
71494
- if (graphql8.isEnumType(type) || graphql8.isScalarType(type)) {
71505
+ if (graphql9.isEnumType(type) || graphql9.isScalarType(type)) {
71495
71506
  return;
71496
71507
  }
71497
- if (graphql8.isUnionType(type)) {
71508
+ if (graphql9.isUnionType(type)) {
71498
71509
  return;
71499
71510
  }
71500
71511
  visitedTypes.add(type.name);
@@ -71512,50 +71523,50 @@ function walkInputs(config2, visitedTypes, inputObj, rootType) {
71512
71523
  }
71513
71524
 
71514
71525
  // src/codegen/generators/artifacts/operations.ts
71515
- var graphql10 = __toESM(require("graphql"), 1);
71526
+ var graphql11 = __toESM(require("graphql"), 1);
71516
71527
 
71517
71528
  // src/codegen/generators/artifacts/utils.ts
71518
- var graphql9 = __toESM(require("graphql"), 1);
71519
- var recast3 = __toESM(require_main2(), 1);
71520
- var AST3 = recast3.types.builders;
71529
+ var graphql10 = __toESM(require("graphql"), 1);
71530
+ var recast4 = __toESM(require_main2(), 1);
71531
+ var AST4 = recast4.types.builders;
71521
71532
  function serializeValue(value) {
71522
71533
  if (Array.isArray(value)) {
71523
- return AST3.arrayExpression(value.map(serializeValue));
71534
+ return AST4.arrayExpression(value.map(serializeValue));
71524
71535
  }
71525
71536
  if (typeof value === "object" && value !== null) {
71526
- return AST3.objectExpression(
71537
+ return AST4.objectExpression(
71527
71538
  Object.entries(value).filter(([key, value2]) => typeof value2 !== "undefined").map(([key, val]) => {
71528
- return AST3.objectProperty(AST3.stringLiteral(key), serializeValue(val));
71539
+ return AST4.objectProperty(AST4.stringLiteral(key), serializeValue(val));
71529
71540
  })
71530
71541
  );
71531
71542
  }
71532
71543
  if (typeof value === "string") {
71533
71544
  if (value.indexOf("\n") !== -1) {
71534
- return AST3.templateLiteral(
71535
- [AST3.templateElement({ raw: value, cooked: value }, true)],
71545
+ return AST4.templateLiteral(
71546
+ [AST4.templateElement({ raw: value, cooked: value }, true)],
71536
71547
  []
71537
71548
  );
71538
71549
  }
71539
- return AST3.stringLiteral(value);
71550
+ return AST4.stringLiteral(value);
71540
71551
  }
71541
- return AST3.literal(value);
71552
+ return AST4.literal(value);
71542
71553
  }
71543
71554
  function convertValue(config2, val) {
71544
71555
  let value;
71545
71556
  let kind;
71546
- if (val.kind === graphql9.Kind.INT) {
71557
+ if (val.kind === graphql10.Kind.INT) {
71547
71558
  value = parseInt(val.value, 10);
71548
71559
  kind = "Int";
71549
- } else if (val.kind === graphql9.Kind.FLOAT) {
71560
+ } else if (val.kind === graphql10.Kind.FLOAT) {
71550
71561
  value = parseFloat(val.value);
71551
71562
  kind = "Float";
71552
- } else if (val.kind === graphql9.Kind.BOOLEAN) {
71563
+ } else if (val.kind === graphql10.Kind.BOOLEAN) {
71553
71564
  value = val.value;
71554
71565
  kind = "Boolean";
71555
- } else if (val.kind === graphql9.Kind.VARIABLE) {
71566
+ } else if (val.kind === graphql10.Kind.VARIABLE) {
71556
71567
  value = val.name.value;
71557
71568
  kind = "Variable";
71558
- } else if (val.kind === graphql9.Kind.STRING) {
71569
+ } else if (val.kind === graphql10.Kind.STRING) {
71559
71570
  value = val.value;
71560
71571
  kind = "String";
71561
71572
  }
@@ -71568,7 +71579,7 @@ function operationsByPath(config2, filepath, definition, filterTypes) {
71568
71579
  return {};
71569
71580
  }
71570
71581
  const pathOperations = {};
71571
- graphql10.visit(definition, {
71582
+ graphql11.visit(definition, {
71572
71583
  FragmentSpread(node, _, __, ___, ancestors) {
71573
71584
  if (!config2.isListFragment(node.name.value)) {
71574
71585
  return;
@@ -71727,19 +71738,19 @@ function ancestorKey(ancestors) {
71727
71738
  }
71728
71739
 
71729
71740
  // src/codegen/generators/artifacts/selection.ts
71730
- var graphql15 = __toESM(require("graphql"), 1);
71741
+ var graphql16 = __toESM(require("graphql"), 1);
71731
71742
 
71732
71743
  // src/codegen/transforms/list.ts
71733
- var graphql13 = __toESM(require("graphql"), 1);
71744
+ var graphql14 = __toESM(require("graphql"), 1);
71734
71745
 
71735
71746
  // src/codegen/utils/objectIdentificationSelection.ts
71736
- var graphql11 = __toESM(require("graphql"), 1);
71747
+ var graphql12 = __toESM(require("graphql"), 1);
71737
71748
  var objectIdentificationSelection = (config2, type) => {
71738
71749
  return config2.keyFieldsForType(type.name).map((key) => {
71739
71750
  return {
71740
- kind: graphql11.Kind.FIELD,
71751
+ kind: graphql12.Kind.FIELD,
71741
71752
  name: {
71742
- kind: graphql11.Kind.NAME,
71753
+ kind: graphql12.Kind.NAME,
71743
71754
  value: key
71744
71755
  }
71745
71756
  };
@@ -71747,7 +71758,7 @@ var objectIdentificationSelection = (config2, type) => {
71747
71758
  };
71748
71759
 
71749
71760
  // src/codegen/transforms/paginate.ts
71750
- var graphql12 = __toESM(require("graphql"), 1);
71761
+ var graphql13 = __toESM(require("graphql"), 1);
71751
71762
  async function paginate(config2, documents) {
71752
71763
  const newDocs = [];
71753
71764
  for (const doc of documents) {
@@ -71780,7 +71791,7 @@ async function paginate(config2, documents) {
71780
71791
  };
71781
71792
  let cursorType = "String";
71782
71793
  let paginationPath = [];
71783
- doc.document = graphql12.visit(doc.document, {
71794
+ doc.document = graphql13.visit(doc.document, {
71784
71795
  Field(node, _, __, ___, ancestors) {
71785
71796
  const paginateDirective = node.directives?.find(
71786
71797
  (directive) => directive.name.value === config2.paginateDirective
@@ -71806,7 +71817,7 @@ async function paginate(config2, documents) {
71806
71817
  flags.offset.enabled = offsetPagination;
71807
71818
  flags.limit.enabled = offsetPagination;
71808
71819
  paginationPath = ancestors.filter(
71809
- (ancestor) => !Array.isArray(ancestor) && ancestor.kind === graphql12.Kind.FIELD
71820
+ (ancestor) => !Array.isArray(ancestor) && ancestor.kind === graphql13.Kind.FIELD
71810
71821
  ).concat(node).map((field) => field.alias?.value || field.name.value);
71811
71822
  return {
71812
71823
  ...node,
@@ -71825,7 +71836,7 @@ async function paginate(config2, documents) {
71825
71836
  let fragment2 = "";
71826
71837
  let paginateMode = config2.defaultPaginateMode;
71827
71838
  const requiredArgs = [];
71828
- doc.document = graphql12.visit(doc.document, {
71839
+ doc.document = graphql13.visit(doc.document, {
71829
71840
  OperationDefinition(node) {
71830
71841
  if (node.operation !== "query") {
71831
71842
  throw new HoudiniError({
@@ -71884,9 +71895,9 @@ async function paginate(config2, documents) {
71884
71895
  directives: [
71885
71896
  ...node.directives || [],
71886
71897
  {
71887
- kind: graphql12.Kind.DIRECTIVE,
71898
+ kind: graphql13.Kind.DIRECTIVE,
71888
71899
  name: {
71889
- kind: graphql12.Kind.NAME,
71900
+ kind: graphql13.Kind.NAME,
71890
71901
  value: config2.argumentsDirective
71891
71902
  }
71892
71903
  }
@@ -71956,22 +71967,22 @@ async function paginate(config2, documents) {
71956
71967
  const paginationArgs = Object.entries(flags).filter(([_, { enabled }]) => enabled).map(([key, value]) => ({ name: key, ...value }));
71957
71968
  const fragmentSpreadSelection = [
71958
71969
  {
71959
- kind: graphql12.Kind.FRAGMENT_SPREAD,
71970
+ kind: graphql13.Kind.FRAGMENT_SPREAD,
71960
71971
  name: {
71961
- kind: graphql12.Kind.NAME,
71972
+ kind: graphql13.Kind.NAME,
71962
71973
  value: fragmentName
71963
71974
  },
71964
71975
  directives: [
71965
71976
  {
71966
- kind: graphql12.Kind.DIRECTIVE,
71977
+ kind: graphql13.Kind.DIRECTIVE,
71967
71978
  name: {
71968
- kind: graphql12.Kind.NAME,
71979
+ kind: graphql13.Kind.NAME,
71969
71980
  value: config2.withDirective
71970
71981
  },
71971
71982
  ["arguments"]: requiredArgs.map((arg) => variableAsArgument(arg.name)).concat(paginationArgs.map(({ name }) => variableAsArgument(name)))
71972
71983
  },
71973
71984
  {
71974
- kind: graphql12.Kind.DIRECTIVE,
71985
+ kind: graphql13.Kind.DIRECTIVE,
71975
71986
  name: {
71976
71987
  kind: "Name",
71977
71988
  value: config2.maskDisableDirective
@@ -71998,23 +72009,23 @@ async function paginate(config2, documents) {
71998
72009
  });
71999
72010
  const typeConfig = config2.typeConfig?.[fragment2];
72000
72011
  const queryDoc = {
72001
- kind: graphql12.Kind.DOCUMENT,
72012
+ kind: graphql13.Kind.DOCUMENT,
72002
72013
  definitions: [
72003
72014
  {
72004
- kind: graphql12.Kind.OPERATION_DEFINITION,
72015
+ kind: graphql13.Kind.OPERATION_DEFINITION,
72005
72016
  name: {
72006
- kind: graphql12.Kind.NAME,
72017
+ kind: graphql13.Kind.NAME,
72007
72018
  value: refetchQueryName
72008
72019
  },
72009
72020
  operation: "query",
72010
72021
  variableDefinitions: requiredArgs.map(
72011
72022
  (arg) => ({
72012
- kind: graphql12.Kind.VARIABLE_DEFINITION,
72023
+ kind: graphql13.Kind.VARIABLE_DEFINITION,
72013
72024
  type: arg.type,
72014
72025
  variable: {
72015
- kind: graphql12.Kind.VARIABLE,
72026
+ kind: graphql13.Kind.VARIABLE,
72016
72027
  name: {
72017
- kind: graphql12.Kind.NAME,
72028
+ kind: graphql13.Kind.NAME,
72018
72029
  value: arg.name
72019
72030
  }
72020
72031
  }
@@ -72022,18 +72033,18 @@ async function paginate(config2, documents) {
72022
72033
  ).concat(
72023
72034
  paginationArgs.map(
72024
72035
  (arg) => ({
72025
- kind: graphql12.Kind.VARIABLE_DEFINITION,
72036
+ kind: graphql13.Kind.VARIABLE_DEFINITION,
72026
72037
  type: {
72027
- kind: graphql12.Kind.NAMED_TYPE,
72038
+ kind: graphql13.Kind.NAMED_TYPE,
72028
72039
  name: {
72029
- kind: graphql12.Kind.NAME,
72040
+ kind: graphql13.Kind.NAME,
72030
72041
  value: arg.type
72031
72042
  }
72032
72043
  },
72033
72044
  variable: {
72034
- kind: graphql12.Kind.VARIABLE,
72045
+ kind: graphql13.Kind.VARIABLE,
72035
72046
  name: {
72036
- kind: graphql12.Kind.NAME,
72047
+ kind: graphql13.Kind.NAME,
72037
72048
  value: arg.name
72038
72049
  }
72039
72050
  },
@@ -72045,12 +72056,12 @@ async function paginate(config2, documents) {
72045
72056
  ).concat(
72046
72057
  !nodeQuery ? [] : keys2.map(
72047
72058
  (key) => ({
72048
- kind: graphql12.Kind.VARIABLE_DEFINITION,
72059
+ kind: graphql13.Kind.VARIABLE_DEFINITION,
72049
72060
  type: key.type,
72050
72061
  variable: {
72051
- kind: graphql12.Kind.VARIABLE,
72062
+ kind: graphql13.Kind.VARIABLE,
72052
72063
  name: {
72053
- kind: graphql12.Kind.NAME,
72064
+ kind: graphql13.Kind.NAME,
72054
72065
  value: key.name
72055
72066
  }
72056
72067
  }
@@ -72059,42 +72070,42 @@ async function paginate(config2, documents) {
72059
72070
  )
72060
72071
  ),
72061
72072
  selectionSet: {
72062
- kind: graphql12.Kind.SELECTION_SET,
72073
+ kind: graphql13.Kind.SELECTION_SET,
72063
72074
  selections: !nodeQuery ? fragmentSpreadSelection : [
72064
72075
  {
72065
- kind: graphql12.Kind.FIELD,
72076
+ kind: graphql13.Kind.FIELD,
72066
72077
  name: {
72067
- kind: graphql12.Kind.NAME,
72078
+ kind: graphql13.Kind.NAME,
72068
72079
  value: typeConfig?.resolve?.queryField || "node"
72069
72080
  },
72070
72081
  ["arguments"]: keys2.map((key) => ({
72071
- kind: graphql12.Kind.ARGUMENT,
72082
+ kind: graphql13.Kind.ARGUMENT,
72072
72083
  name: {
72073
- kind: graphql12.Kind.NAME,
72084
+ kind: graphql13.Kind.NAME,
72074
72085
  value: key.name
72075
72086
  },
72076
72087
  value: {
72077
- kind: graphql12.Kind.VARIABLE,
72088
+ kind: graphql13.Kind.VARIABLE,
72078
72089
  name: {
72079
- kind: graphql12.Kind.NAME,
72090
+ kind: graphql13.Kind.NAME,
72080
72091
  value: key.name
72081
72092
  }
72082
72093
  }
72083
72094
  })),
72084
72095
  selectionSet: {
72085
- kind: graphql12.Kind.SELECTION_SET,
72096
+ kind: graphql13.Kind.SELECTION_SET,
72086
72097
  selections: [
72087
72098
  {
72088
- kind: graphql12.Kind.FIELD,
72099
+ kind: graphql13.Kind.FIELD,
72089
72100
  name: {
72090
- kind: graphql12.Kind.NAME,
72101
+ kind: graphql13.Kind.NAME,
72091
72102
  value: "__typename"
72092
72103
  }
72093
72104
  },
72094
72105
  ...(typeConfig?.keys || [config2.defaultKeys[0]]).map((key) => ({
72095
- kind: graphql12.Kind.FIELD,
72106
+ kind: graphql13.Kind.FIELD,
72096
72107
  name: {
72097
- kind: graphql12.Kind.NAME,
72108
+ kind: graphql13.Kind.NAME,
72098
72109
  value: key
72099
72110
  }
72100
72111
  })),
@@ -72151,15 +72162,15 @@ function replaceArgumentsWithVariables(args, flags) {
72151
72162
  }
72152
72163
  function variableAsArgument(name, variable) {
72153
72164
  return {
72154
- kind: graphql12.Kind.ARGUMENT,
72165
+ kind: graphql13.Kind.ARGUMENT,
72155
72166
  name: {
72156
- kind: graphql12.Kind.NAME,
72167
+ kind: graphql13.Kind.NAME,
72157
72168
  value: name
72158
72169
  },
72159
72170
  value: {
72160
- kind: graphql12.Kind.VARIABLE,
72171
+ kind: graphql13.Kind.VARIABLE,
72161
72172
  name: {
72162
- kind: graphql12.Kind.NAME,
72173
+ kind: graphql13.Kind.NAME,
72163
72174
  value: variable ?? name
72164
72175
  }
72165
72176
  }
@@ -72167,18 +72178,18 @@ function variableAsArgument(name, variable) {
72167
72178
  }
72168
72179
  function staticVariableDefinition(name, type, defaultValue, variableName) {
72169
72180
  return {
72170
- kind: graphql12.Kind.VARIABLE_DEFINITION,
72181
+ kind: graphql13.Kind.VARIABLE_DEFINITION,
72171
72182
  type: {
72172
- kind: graphql12.Kind.NAMED_TYPE,
72183
+ kind: graphql13.Kind.NAMED_TYPE,
72173
72184
  name: {
72174
- kind: graphql12.Kind.NAME,
72185
+ kind: graphql13.Kind.NAME,
72175
72186
  value: type
72176
72187
  }
72177
72188
  },
72178
72189
  variable: {
72179
- kind: graphql12.Kind.VARIABLE,
72190
+ kind: graphql13.Kind.VARIABLE,
72180
72191
  name: {
72181
- kind: graphql12.Kind.NAME,
72192
+ kind: graphql13.Kind.NAME,
72182
72193
  value: variableName ?? name
72183
72194
  }
72184
72195
  },
@@ -72190,9 +72201,9 @@ function staticVariableDefinition(name, type, defaultValue, variableName) {
72190
72201
  }
72191
72202
  function argumentNode(name, value) {
72192
72203
  return {
72193
- kind: graphql12.Kind.ARGUMENT,
72204
+ kind: graphql13.Kind.ARGUMENT,
72194
72205
  name: {
72195
- kind: graphql12.Kind.NAME,
72206
+ kind: graphql13.Kind.NAME,
72196
72207
  value: name
72197
72208
  },
72198
72209
  value: objectNode(value)
@@ -72200,16 +72211,16 @@ function argumentNode(name, value) {
72200
72211
  }
72201
72212
  function objectNode([type, defaultValue]) {
72202
72213
  const node = {
72203
- kind: graphql12.Kind.OBJECT,
72214
+ kind: graphql13.Kind.OBJECT,
72204
72215
  fields: [
72205
72216
  {
72206
- kind: graphql12.Kind.OBJECT_FIELD,
72217
+ kind: graphql13.Kind.OBJECT_FIELD,
72207
72218
  name: {
72208
- kind: graphql12.Kind.NAME,
72219
+ kind: graphql13.Kind.NAME,
72209
72220
  value: "type"
72210
72221
  },
72211
72222
  value: {
72212
- kind: graphql12.Kind.STRING,
72223
+ kind: graphql13.Kind.STRING,
72213
72224
  value: type
72214
72225
  }
72215
72226
  }
@@ -72217,8 +72228,8 @@ function objectNode([type, defaultValue]) {
72217
72228
  };
72218
72229
  if (defaultValue) {
72219
72230
  node.fields.push({
72220
- kind: graphql12.Kind.OBJECT_FIELD,
72221
- name: { kind: graphql12.Kind.NAME, value: "default" },
72231
+ kind: graphql13.Kind.OBJECT_FIELD,
72232
+ name: { kind: graphql13.Kind.NAME, value: "default" },
72222
72233
  value: {
72223
72234
  kind: typeof defaultValue === "number" ? "IntValue" : "StringValue",
72224
72235
  value: defaultValue.toString()
@@ -72229,34 +72240,34 @@ function objectNode([type, defaultValue]) {
72229
72240
  }
72230
72241
  var pageInfoSelection = [
72231
72242
  {
72232
- kind: graphql12.Kind.FIELD,
72243
+ kind: graphql13.Kind.FIELD,
72233
72244
  name: {
72234
- kind: graphql12.Kind.NAME,
72245
+ kind: graphql13.Kind.NAME,
72235
72246
  value: "edges"
72236
72247
  },
72237
72248
  selectionSet: {
72238
- kind: graphql12.Kind.SELECTION_SET,
72249
+ kind: graphql13.Kind.SELECTION_SET,
72239
72250
  selections: [
72240
72251
  {
72241
- kind: graphql12.Kind.FIELD,
72252
+ kind: graphql13.Kind.FIELD,
72242
72253
  name: {
72243
- kind: graphql12.Kind.NAME,
72254
+ kind: graphql13.Kind.NAME,
72244
72255
  value: "cursor"
72245
72256
  }
72246
72257
  },
72247
72258
  {
72248
- kind: graphql12.Kind.FIELD,
72259
+ kind: graphql13.Kind.FIELD,
72249
72260
  name: {
72250
- kind: graphql12.Kind.NAME,
72261
+ kind: graphql13.Kind.NAME,
72251
72262
  value: "node"
72252
72263
  },
72253
72264
  selectionSet: {
72254
- kind: graphql12.Kind.SELECTION_SET,
72265
+ kind: graphql13.Kind.SELECTION_SET,
72255
72266
  selections: [
72256
72267
  {
72257
- kind: graphql12.Kind.FIELD,
72268
+ kind: graphql13.Kind.FIELD,
72258
72269
  name: {
72259
- kind: graphql12.Kind.NAME,
72270
+ kind: graphql13.Kind.NAME,
72260
72271
  value: "__typename"
72261
72272
  }
72262
72273
  }
@@ -72267,39 +72278,39 @@ var pageInfoSelection = [
72267
72278
  }
72268
72279
  },
72269
72280
  {
72270
- kind: graphql12.Kind.FIELD,
72281
+ kind: graphql13.Kind.FIELD,
72271
72282
  name: {
72272
- kind: graphql12.Kind.NAME,
72283
+ kind: graphql13.Kind.NAME,
72273
72284
  value: "pageInfo"
72274
72285
  },
72275
72286
  selectionSet: {
72276
- kind: graphql12.Kind.SELECTION_SET,
72287
+ kind: graphql13.Kind.SELECTION_SET,
72277
72288
  selections: [
72278
72289
  {
72279
- kind: graphql12.Kind.FIELD,
72290
+ kind: graphql13.Kind.FIELD,
72280
72291
  name: {
72281
- kind: graphql12.Kind.NAME,
72292
+ kind: graphql13.Kind.NAME,
72282
72293
  value: "hasPreviousPage"
72283
72294
  }
72284
72295
  },
72285
72296
  {
72286
- kind: graphql12.Kind.FIELD,
72297
+ kind: graphql13.Kind.FIELD,
72287
72298
  name: {
72288
- kind: graphql12.Kind.NAME,
72299
+ kind: graphql13.Kind.NAME,
72289
72300
  value: "hasNextPage"
72290
72301
  }
72291
72302
  },
72292
72303
  {
72293
- kind: graphql12.Kind.FIELD,
72304
+ kind: graphql13.Kind.FIELD,
72294
72305
  name: {
72295
- kind: graphql12.Kind.NAME,
72306
+ kind: graphql13.Kind.NAME,
72296
72307
  value: "startCursor"
72297
72308
  }
72298
72309
  },
72299
72310
  {
72300
- kind: graphql12.Kind.FIELD,
72311
+ kind: graphql13.Kind.FIELD,
72301
72312
  name: {
72302
- kind: graphql12.Kind.NAME,
72313
+ kind: graphql13.Kind.NAME,
72303
72314
  value: "endCursor"
72304
72315
  }
72305
72316
  }
@@ -72313,17 +72324,17 @@ async function addListFragments(config2, documents) {
72313
72324
  const lists = {};
72314
72325
  const errors = [];
72315
72326
  for (const doc of documents) {
72316
- doc.document = graphql13.visit(doc.document, {
72327
+ doc.document = graphql14.visit(doc.document, {
72317
72328
  Directive(node, key, parent2, path3, ancestors) {
72318
72329
  if ([config2.listDirective, config2.paginateDirective].includes(node.name.value)) {
72319
72330
  const nameArg = node.arguments?.find(
72320
72331
  (arg) => arg.name.value === config2.listOrPaginateNameArg
72321
72332
  );
72322
72333
  let error = {
72323
- ...new graphql13.GraphQLError(
72334
+ ...new graphql14.GraphQLError(
72324
72335
  "",
72325
72336
  node,
72326
- new graphql13.Source(""),
72337
+ new graphql14.Source(""),
72327
72338
  node.loc ? [node.loc.start, node.loc.end] : null,
72328
72339
  path3
72329
72340
  ),
@@ -72375,7 +72386,7 @@ async function addListFragments(config2, documents) {
72375
72386
  {
72376
72387
  kind: "Argument",
72377
72388
  name: {
72378
- kind: graphql13.Kind.NAME,
72389
+ kind: graphql14.Kind.NAME,
72379
72390
  value: "connection"
72380
72391
  },
72381
72392
  value: {
@@ -72425,7 +72436,7 @@ async function addListFragments(config2, documents) {
72425
72436
  const validDeletes = [
72426
72437
  ...new Set(
72427
72438
  Object.values(lists).map(({ type }) => {
72428
- if (!(type instanceof graphql13.GraphQLObjectType)) {
72439
+ if (!(type instanceof graphql14.GraphQLObjectType)) {
72429
72440
  return "";
72430
72441
  }
72431
72442
  if (config2.keyFieldsForType(type.name).length !== 1) {
@@ -72439,7 +72450,7 @@ async function addListFragments(config2, documents) {
72439
72450
  return;
72440
72451
  }
72441
72452
  const generatedDoc = {
72442
- kind: graphql13.Kind.DOCUMENT,
72453
+ kind: graphql14.Kind.DOCUMENT,
72443
72454
  definitions: Object.entries(lists).flatMap(
72444
72455
  ([name, { selection, type }]) => {
72445
72456
  const schemaType = config2.schema.getType(type.name);
@@ -72447,7 +72458,7 @@ async function addListFragments(config2, documents) {
72447
72458
  throw new HoudiniError({ message: "Lists must have a selection" });
72448
72459
  }
72449
72460
  const fragmentSelection = {
72450
- kind: graphql13.Kind.SELECTION_SET,
72461
+ kind: graphql14.Kind.SELECTION_SET,
72451
72462
  selections: [...selection.selections]
72452
72463
  };
72453
72464
  if (schemaType && fragmentSelection && !fragmentSelection?.selections.find(
@@ -72462,14 +72473,14 @@ async function addListFragments(config2, documents) {
72462
72473
  {
72463
72474
  name: {
72464
72475
  value: config2.listInsertFragment(name),
72465
- kind: graphql13.Kind.NAME
72476
+ kind: graphql14.Kind.NAME
72466
72477
  },
72467
- kind: graphql13.Kind.FRAGMENT_DEFINITION,
72478
+ kind: graphql14.Kind.FRAGMENT_DEFINITION,
72468
72479
  selectionSet: fragmentSelection,
72469
72480
  typeCondition: {
72470
- kind: graphql13.Kind.NAMED_TYPE,
72481
+ kind: graphql14.Kind.NAMED_TYPE,
72471
72482
  name: {
72472
- kind: graphql13.Kind.NAME,
72483
+ kind: graphql14.Kind.NAME,
72473
72484
  value: type.name
72474
72485
  }
72475
72486
  }
@@ -72477,32 +72488,32 @@ async function addListFragments(config2, documents) {
72477
72488
  {
72478
72489
  name: {
72479
72490
  value: config2.listToggleFragment(name),
72480
- kind: graphql13.Kind.NAME
72491
+ kind: graphql14.Kind.NAME
72481
72492
  },
72482
- kind: graphql13.Kind.FRAGMENT_DEFINITION,
72493
+ kind: graphql14.Kind.FRAGMENT_DEFINITION,
72483
72494
  selectionSet: fragmentSelection,
72484
72495
  typeCondition: {
72485
- kind: graphql13.Kind.NAMED_TYPE,
72496
+ kind: graphql14.Kind.NAMED_TYPE,
72486
72497
  name: {
72487
- kind: graphql13.Kind.NAME,
72498
+ kind: graphql14.Kind.NAME,
72488
72499
  value: type.name
72489
72500
  }
72490
72501
  }
72491
72502
  },
72492
72503
  {
72493
- kind: graphql13.Kind.FRAGMENT_DEFINITION,
72504
+ kind: graphql14.Kind.FRAGMENT_DEFINITION,
72494
72505
  name: {
72495
72506
  value: config2.listRemoveFragment(name),
72496
- kind: graphql13.Kind.NAME
72507
+ kind: graphql14.Kind.NAME
72497
72508
  },
72498
72509
  selectionSet: {
72499
- kind: graphql13.Kind.SELECTION_SET,
72510
+ kind: graphql14.Kind.SELECTION_SET,
72500
72511
  selections: [...objectIdentificationSelection(config2, type)]
72501
72512
  },
72502
72513
  typeCondition: {
72503
- kind: graphql13.Kind.NAMED_TYPE,
72514
+ kind: graphql14.Kind.NAMED_TYPE,
72504
72515
  name: {
72505
- kind: graphql13.Kind.NAME,
72516
+ kind: graphql14.Kind.NAME,
72506
72517
  value: type.name
72507
72518
  }
72508
72519
  }
@@ -72511,14 +72522,14 @@ async function addListFragments(config2, documents) {
72511
72522
  }
72512
72523
  ).concat(
72513
72524
  ...validDeletes.map((typeName) => ({
72514
- kind: graphql13.Kind.DIRECTIVE_DEFINITION,
72525
+ kind: graphql14.Kind.DIRECTIVE_DEFINITION,
72515
72526
  name: {
72516
- kind: graphql13.Kind.NAME,
72527
+ kind: graphql14.Kind.NAME,
72517
72528
  value: config2.listDeleteDirective(typeName)
72518
72529
  },
72519
72530
  locations: [
72520
72531
  {
72521
- kind: graphql13.Kind.NAME,
72532
+ kind: graphql14.Kind.NAME,
72522
72533
  value: "FIELD"
72523
72534
  }
72524
72535
  ],
@@ -72526,8 +72537,8 @@ async function addListFragments(config2, documents) {
72526
72537
  }))
72527
72538
  )
72528
72539
  };
72529
- config2.newSchema += "\n" + generatedDoc.definitions.filter((c) => c.kind !== "FragmentDefinition").map(graphql13.print).join("\n\n");
72530
- config2.newDocuments += "\n" + generatedDoc.definitions.filter((c) => c.kind === "FragmentDefinition").map(graphql13.print).join("\n\n");
72540
+ config2.newSchema += "\n" + generatedDoc.definitions.filter((c) => c.kind !== "FragmentDefinition").map(graphql14.print).join("\n\n");
72541
+ config2.newDocuments += "\n" + generatedDoc.definitions.filter((c) => c.kind === "FragmentDefinition").map(graphql14.print).join("\n\n");
72531
72542
  documents.push({
72532
72543
  name: "generated::lists",
72533
72544
  kind: ArtifactKind.Fragment,
@@ -72613,11 +72624,11 @@ var nodeNotDefinedMessage = (config2) => `Looks like you are trying to use the $
72613
72624
  For more information, visit this link: ${siteURL}/guides/pagination`;
72614
72625
 
72615
72626
  // src/codegen/generators/artifacts/fieldKey.ts
72616
- var graphql14 = __toESM(require("graphql"), 1);
72627
+ var graphql15 = __toESM(require("graphql"), 1);
72617
72628
  function fieldKey(config2, field) {
72618
72629
  const attributeName = field.alias?.value || field.name.value;
72619
- const printed = graphql14.print(field);
72620
- const secondParse = graphql14.parse(`{${printed}}`).definitions[0].selectionSet.selections[0];
72630
+ const printed = graphql15.print(field);
72631
+ const secondParse = graphql15.parse(`{${printed}}`).definitions[0].selectionSet.selections[0];
72621
72632
  let paginateMode = config2.defaultPaginateMode;
72622
72633
  const paginatedDirective = field.directives?.find(
72623
72634
  (directive) => directive.name.value === config2.paginateDirective
@@ -72740,13 +72751,13 @@ function prepareSelection({
72740
72751
  } else if ("getFields" in type) {
72741
72752
  let typeRef = type.getFields()[field.name.value].type;
72742
72753
  fieldType = getRootType(typeRef);
72743
- nullable = !graphql15.isNonNullType(typeRef);
72744
- } else if (graphql15.isAbstractType(type)) {
72754
+ nullable = !graphql16.isNonNullType(typeRef);
72755
+ } else if (graphql16.isAbstractType(type)) {
72745
72756
  for (const possible of config2.schema.getPossibleTypes(type)) {
72746
- if (graphql15.isObjectType(possible)) {
72757
+ if (graphql16.isObjectType(possible)) {
72747
72758
  if (possible.getFields()[field.name.value]) {
72748
72759
  fieldType = possible.getFields()[field.name.value].type;
72749
- nullable = !graphql15.isNonNullType(fieldType);
72760
+ nullable = !graphql16.isNonNullType(fieldType);
72750
72761
  break;
72751
72762
  }
72752
72763
  }
@@ -72883,7 +72894,7 @@ function prepareSelection({
72883
72894
  kind: "value"
72884
72895
  } : { kind: "continue" };
72885
72896
  const parentType = config2.schema.getType(rootType);
72886
- if (graphql15.isObjectType(parentType) || graphql15.isInterfaceType(parentType)) {
72897
+ if (graphql16.isObjectType(parentType) || graphql16.isInterfaceType(parentType)) {
72887
72898
  const fieldType2 = parentType.getFields()[field.name.value]?.type;
72888
72899
  if (fieldType2) {
72889
72900
  const listCount = unwrapType(config2, fieldType2).wrappers.filter(
@@ -72906,7 +72917,7 @@ function prepareSelection({
72906
72917
  }
72907
72918
  fieldObj.loading = loadingValue;
72908
72919
  }
72909
- if (graphql15.isInterfaceType(fieldType) || graphql15.isUnionType(fieldType)) {
72920
+ if (graphql16.isInterfaceType(fieldType) || graphql16.isUnionType(fieldType)) {
72910
72921
  fieldObj.abstract = true;
72911
72922
  if (Object.values(fieldObj.selection?.abstractFields?.fields ?? {}).some(
72912
72923
  (fields) => Object.values(fields ?? {}).some((field2) => field2.required)
@@ -72988,7 +72999,7 @@ function mergeSelection({
72988
72999
  typeSelection,
72989
73000
  abstractSelection.fields[typeName] ?? {}
72990
73001
  );
72991
- if (graphql15.isAbstractType(gqlType)) {
73002
+ if (graphql16.isAbstractType(gqlType)) {
72992
73003
  for (const possible of config2.schema.getPossibleTypes(gqlType)) {
72993
73004
  if (!possibleSelectionTypes[typeName]) {
72994
73005
  possibleSelectionTypes[typeName] = [];
@@ -73023,7 +73034,7 @@ function mergeSelection({
73023
73034
  }
73024
73035
  }
73025
73036
  const parentType = config2.schema.getType(rootType);
73026
- const possibleParents = graphql15.isAbstractType(parentType) ? config2.schema.getPossibleTypes(parentType)?.map((t3) => t3.name) : [parentType.name];
73037
+ const possibleParents = graphql16.isAbstractType(parentType) ? config2.schema.getPossibleTypes(parentType)?.map((t3) => t3.name) : [parentType.name];
73027
73038
  for (const key of Object.keys(abstractSelection.typeMap)) {
73028
73039
  if (!possibleParents.includes(key) && rootType !== key || abstractSelection.fields[key]) {
73029
73040
  delete abstractSelection.typeMap[key];
@@ -73080,12 +73091,12 @@ function mergeSelection({
73080
73091
  }
73081
73092
 
73082
73093
  // src/codegen/generators/artifacts/index.ts
73083
- var AST4 = recast4.types.builders;
73094
+ var AST5 = recast5.types.builders;
73084
73095
  function artifactGenerator(stats) {
73085
73096
  return async function(config2, docs) {
73086
73097
  const filterTypes = {};
73087
73098
  for (const doc of docs) {
73088
- graphql16.visit(doc.document, {
73099
+ graphql17.visit(doc.document, {
73089
73100
  Directive(node, _, __, ___, ancestors) {
73090
73101
  if (node.name.value !== config2.listDirective) {
73091
73102
  return;
@@ -73145,7 +73156,7 @@ function artifactGenerator(stats) {
73145
73156
  return;
73146
73157
  }
73147
73158
  const usedVariableNames = /* @__PURE__ */ new Set();
73148
- let documentWithoutInternalDirectives = graphql16.visit(document, {
73159
+ let documentWithoutInternalDirectives = graphql17.visit(document, {
73149
73160
  Directive(node) {
73150
73161
  if (config2.isInternalDirective(node.name.value)) {
73151
73162
  return null;
@@ -73158,7 +73169,7 @@ function artifactGenerator(stats) {
73158
73169
  }
73159
73170
  }
73160
73171
  });
73161
- let documentWithoutExtraVariables = graphql16.visit(
73172
+ let documentWithoutExtraVariables = graphql17.visit(
73162
73173
  documentWithoutInternalDirectives,
73163
73174
  {
73164
73175
  VariableDefinition(variableDefinitionNode) {
@@ -73169,13 +73180,13 @@ function artifactGenerator(stats) {
73169
73180
  }
73170
73181
  }
73171
73182
  );
73172
- let rawString = graphql16.print(documentWithoutExtraVariables);
73183
+ let rawString = graphql17.print(documentWithoutExtraVariables);
73173
73184
  let docKind = doc.kind;
73174
73185
  const operations = document.definitions.filter(
73175
- ({ kind }) => kind === graphql16.Kind.OPERATION_DEFINITION
73186
+ ({ kind }) => kind === graphql17.Kind.OPERATION_DEFINITION
73176
73187
  );
73177
73188
  const fragments = document.definitions.filter(
73178
- ({ kind }) => kind === graphql16.Kind.FRAGMENT_DEFINITION
73189
+ ({ kind }) => kind === graphql17.Kind.FRAGMENT_DEFINITION
73179
73190
  );
73180
73191
  let rootType = "";
73181
73192
  let selectionSet;
@@ -73375,9 +73386,9 @@ function artifactGenerator(stats) {
73375
73386
  plugin2.artifactEnd({ config: config2, document: doc });
73376
73387
  }
73377
73388
  const _houdiniHash = hashOriginal({ document: doc });
73378
- const file = AST4.program([
73389
+ const file = AST5.program([
73379
73390
  moduleExport(config2, "default", serializeValue(artifact)),
73380
- AST4.expressionStatement(AST4.stringLiteral(`HoudiniHash=${_houdiniHash}`))
73391
+ AST5.expressionStatement(AST5.stringLiteral(`HoudiniHash=${_houdiniHash}`))
73381
73392
  ]);
73382
73393
  const artifactPath = config2.artifactPath(document);
73383
73394
  const countDocument = doc.generateStore;
@@ -73435,7 +73446,7 @@ function applyMask(config2, target, mask) {
73435
73446
  if (!targetType) {
73436
73447
  continue;
73437
73448
  }
73438
- if (graphql16.isAbstractType(targetType)) {
73449
+ if (graphql17.isAbstractType(targetType)) {
73439
73450
  for (const possible of config2.schema.getPossibleTypes(targetType)) {
73440
73451
  if (target.abstractFields?.fields[possible.name]) {
73441
73452
  applyMask(
@@ -73458,8 +73469,8 @@ function applyMask(config2, target, mask) {
73458
73469
  }
73459
73470
 
73460
73471
  // src/codegen/generators/runtime/graphqlFunction.ts
73461
- var recast5 = __toESM(require_main2(), 1);
73462
- var AST5 = recast5.types.builders;
73472
+ var recast6 = __toESM(require_main2(), 1);
73473
+ var AST6 = recast6.types.builders;
73463
73474
  async function generateGraphqlReturnTypes(config2, docs) {
73464
73475
  const indexPath = path_exports.join(config2.runtimeDirectory, "index.d.ts");
73465
73476
  const fileContent = await fs_exports.readFile(indexPath) || "";
@@ -73494,18 +73505,18 @@ async function generateGraphqlReturnTypes(config2, docs) {
73494
73505
  continue;
73495
73506
  }
73496
73507
  for (const [queryString, returnValue] of Object.entries(overloaded_returns)) {
73497
- const input = AST5.identifier("str");
73498
- input.typeAnnotation = AST5.tsTypeAnnotation(
73499
- AST5.tsLiteralType(AST5.stringLiteral(queryString))
73508
+ const input = AST6.identifier("str");
73509
+ input.typeAnnotation = AST6.tsTypeAnnotation(
73510
+ AST6.tsLiteralType(AST6.stringLiteral(queryString))
73500
73511
  );
73501
73512
  script.body.splice(
73502
73513
  i2,
73503
73514
  0,
73504
- AST5.exportNamedDeclaration(
73505
- AST5.tsDeclareFunction(
73506
- AST5.identifier("graphql"),
73515
+ AST6.exportNamedDeclaration(
73516
+ AST6.tsDeclareFunction(
73517
+ AST6.identifier("graphql"),
73507
73518
  [input],
73508
- AST5.tsTypeAnnotation(AST5.tsTypeReference(AST5.identifier(returnValue)))
73519
+ AST6.tsTypeAnnotation(AST6.tsTypeReference(AST6.identifier(returnValue)))
73509
73520
  )
73510
73521
  )
73511
73522
  );
@@ -73680,165 +73691,22 @@ function moduleStatments(config2) {
73680
73691
  var recast11 = __toESM(require_main2(), 1);
73681
73692
 
73682
73693
  // src/codegen/generators/typescript/addReferencedInputTypes.ts
73683
- var graphql19 = __toESM(require("graphql"), 1);
73684
- var recast8 = __toESM(require_main2(), 1);
73685
-
73686
- // src/codegen/generators/typescript/typeReference.ts
73687
73694
  var graphql18 = __toESM(require("graphql"), 1);
73688
73695
  var recast7 = __toESM(require_main2(), 1);
73689
-
73690
- // src/codegen/generators/typescript/types.ts
73691
- var graphql17 = __toESM(require("graphql"), 1);
73692
- var recast6 = __toESM(require_main2(), 1);
73693
- var AST6 = recast6.types.builders;
73694
- function readonlyProperty(prop, enable = true) {
73695
- if (enable) {
73696
- prop.readonly = true;
73697
- }
73698
- return prop;
73699
- }
73700
- function nullableField(inner, input = false) {
73701
- const members = [inner, AST6.tsNullKeyword()];
73702
- if (input) {
73703
- members.push(AST6.tsUndefinedKeyword());
73704
- }
73705
- return AST6.tsUnionType(members);
73706
- }
73707
- function scalarPropertyValue(config2, filepath, missingScalars, target, body, field) {
73708
- if (config2.configFile.features?.componentFields && target.name === config2.componentScalar) {
73709
- if (!field) {
73710
- return AST6.tsNeverKeyword();
73711
- }
73712
- const component = config2.componentFields[field.parent][field.field];
73713
- const sourcePathRelative = path_exports.relative(
73714
- path_exports.join(config2.projectRoot, "src"),
73715
- component.filepath
73716
- );
73717
- let sourcePathParsed = path_exports.parse(sourcePathRelative);
73718
- let sourcePath = path_exports.join(sourcePathParsed.dir, sourcePathParsed.name);
73719
- const localImport = ensureImports({
73720
- config: config2,
73721
- body,
73722
- import: "__component__" + component.fragment,
73723
- sourceModule: path_exports.join(
73724
- path_exports.relative(path_exports.dirname(filepath), config2.projectRoot),
73725
- "src",
73726
- sourcePath
73727
- )
73728
- });
73729
- const parameters = AST6.tsTypeReference(AST6.identifier("Parameters"));
73730
- parameters.typeParameters = AST6.tsTypeParameterInstantiation([
73731
- AST6.tsTypeQuery(AST6.identifier(localImport))
73732
- ]);
73733
- const indexed = AST6.tsIndexedAccessType(
73734
- parameters,
73735
- AST6.tsLiteralType(AST6.numericLiteral(0))
73736
- );
73737
- const omit = AST6.tsTypeReference(AST6.identifier("Omit"));
73738
- omit.typeParameters = AST6.tsTypeParameterInstantiation([
73739
- indexed,
73740
- AST6.tsLiteralType(AST6.stringLiteral(component.prop))
73741
- ]);
73742
- const arg = AST6.identifier("props");
73743
- arg.typeAnnotation = AST6.tsTypeAnnotation(omit);
73744
- const returnType = AST6.tsTypeReference(AST6.identifier("ReturnType"));
73745
- returnType.typeParameters = AST6.tsTypeParameterInstantiation([
73746
- AST6.tsTypeQuery(AST6.identifier(localImport))
73747
- ]);
73748
- const fnType = AST6.tsFunctionType([arg]);
73749
- fnType.typeAnnotation = AST6.tsTypeAnnotation(returnType);
73750
- return fnType;
73751
- }
73752
- switch (target.name) {
73753
- case "String": {
73754
- return AST6.tsStringKeyword();
73755
- }
73756
- case "Int": {
73757
- return AST6.tsNumberKeyword();
73758
- }
73759
- case "Float": {
73760
- return AST6.tsNumberKeyword();
73761
- }
73762
- case "Boolean": {
73763
- return AST6.tsBooleanKeyword();
73764
- }
73765
- case "ID": {
73766
- return AST6.tsStringKeyword();
73767
- }
73768
- default: {
73769
- if (graphql17.isNonNullType(target) && "ofType" in target) {
73770
- return scalarPropertyValue(
73771
- config2,
73772
- filepath,
73773
- missingScalars,
73774
- target.ofType,
73775
- body,
73776
- field
73777
- );
73778
- }
73779
- if (config2.scalars?.[target.name]) {
73780
- return AST6.tsTypeReference(AST6.identifier(config2.scalars?.[target.name].type));
73781
- }
73782
- if (target.name !== config2.componentScalar) {
73783
- missingScalars.add(target.name);
73784
- }
73785
- return AST6.tsAnyKeyword();
73786
- }
73787
- }
73788
- }
73789
-
73790
- // src/codegen/generators/typescript/typeReference.ts
73791
73696
  var AST7 = recast7.types.builders;
73792
- function tsTypeReference(config2, filepath, missingScalars, definition, body) {
73793
- const { type, wrappers } = unwrapType(config2, definition.type);
73794
- let result;
73795
- if (graphql18.isScalarType(type)) {
73796
- result = scalarPropertyValue(config2, filepath, missingScalars, type, body, null);
73797
- } else if (graphql18.isEnumType(type)) {
73798
- result = enumReference(config2, body, type.name);
73799
- } else {
73800
- result = AST7.tsTypeReference(AST7.identifier(type.name));
73801
- }
73802
- for (const toWrap of wrappers) {
73803
- if (toWrap === "NonNull" /* NonNull */) {
73804
- continue;
73805
- } else if (toWrap === "Nullable" /* Nullable */) {
73806
- result = nullableField(result, true);
73807
- } else if (toWrap === "List" /* List */) {
73808
- result = AST7.tsArrayType(AST7.tsParenthesizedType(result));
73809
- }
73810
- }
73811
- return result;
73812
- }
73813
- function enumReference(config2, body, name) {
73814
- ensureImports({
73815
- config: config2,
73816
- body,
73817
- import: ["ValueOf"],
73818
- importKind: "type",
73819
- sourceModule: "$houdini/runtime/lib/types"
73820
- });
73821
- return AST7.tsTypeReference(
73822
- AST7.identifier("ValueOf"),
73823
- AST7.tsTypeParameterInstantiation([AST7.tsTypeQuery(AST7.identifier(name))])
73824
- );
73825
- }
73826
-
73827
- // src/codegen/generators/typescript/addReferencedInputTypes.ts
73828
- var AST8 = recast8.types.builders;
73829
73697
  function addReferencedInputTypes(config2, filepath, body, visitedTypes, missingScalars, rootType) {
73830
73698
  const { type } = unwrapType(config2, rootType);
73831
- if (graphql19.isScalarType(type)) {
73699
+ if (graphql18.isScalarType(type)) {
73832
73700
  return;
73833
73701
  }
73834
73702
  if (visitedTypes.has(type.name)) {
73835
73703
  return;
73836
73704
  }
73837
- if (graphql19.isUnionType(type)) {
73705
+ if (graphql18.isUnionType(type)) {
73838
73706
  throw new HoudiniError({ filepath, message: "Input Unions are not supported yet. Sorry!" });
73839
73707
  }
73840
73708
  visitedTypes.add(type.name);
73841
- if (graphql19.isEnumType(type)) {
73709
+ if (graphql18.isEnumType(type)) {
73842
73710
  ensureImports({
73843
73711
  config: config2,
73844
73712
  body,
@@ -73852,21 +73720,37 @@ function addReferencedInputTypes(config2, filepath, body, visitedTypes, missingS
73852
73720
  for (const field of Object.values(type.getFields())) {
73853
73721
  addReferencedInputTypes(config2, filepath, body, visitedTypes, missingScalars, field.type);
73854
73722
  members.push(
73855
- AST8.tsPropertySignature(
73856
- AST8.identifier(field.name),
73857
- AST8.tsTypeAnnotation(
73723
+ AST7.tsPropertySignature(
73724
+ AST7.identifier(field.name),
73725
+ AST7.tsTypeAnnotation(
73858
73726
  tsTypeReference(config2, filepath, missingScalars, field, body)
73859
73727
  ),
73860
- graphql19.isNullableType(field.type)
73728
+ graphql18.isNullableType(field.type)
73861
73729
  )
73862
73730
  );
73863
73731
  }
73864
- body.push(AST8.tsTypeAliasDeclaration(AST8.identifier(type.name), AST8.tsTypeLiteral(members)));
73732
+ body.push(AST7.tsTypeAliasDeclaration(AST7.identifier(type.name), AST7.tsTypeLiteral(members)));
73865
73733
  }
73866
73734
 
73867
73735
  // src/codegen/generators/typescript/inlineType.ts
73868
- var graphql20 = __toESM(require("graphql"), 1);
73736
+ var graphql19 = __toESM(require("graphql"), 1);
73869
73737
  var recast9 = __toESM(require_main2(), 1);
73738
+
73739
+ // src/codegen/generators/comments/jsdoc.ts
73740
+ var recast8 = __toESM(require_main2(), 1);
73741
+ var AST8 = recast8.types.builders;
73742
+ function jsdocComment(text, deprecated) {
73743
+ let commentContent = `*
73744
+ * ${text}
73745
+ `;
73746
+ if (deprecated) {
73747
+ commentContent = `${commentContent} * @deprecated ${deprecated}
73748
+ `;
73749
+ }
73750
+ return AST8.commentBlock(commentContent, true);
73751
+ }
73752
+
73753
+ // src/codegen/generators/typescript/inlineType.ts
73870
73754
  var AST9 = recast9.types.builders;
73871
73755
  var fragmentKey2 = " $fragments";
73872
73756
  function inlineType({
@@ -73887,7 +73771,7 @@ function inlineType({
73887
73771
  const { type, wrappers } = unwrapType(config2, rootType);
73888
73772
  let result;
73889
73773
  let forceNullable = false;
73890
- if (graphql20.isScalarType(type)) {
73774
+ if (graphql19.isScalarType(type)) {
73891
73775
  result = scalarPropertyValue(
73892
73776
  config2,
73893
73777
  filepath,
@@ -73896,7 +73780,7 @@ function inlineType({
73896
73780
  body,
73897
73781
  field
73898
73782
  );
73899
- } else if (graphql20.isEnumType(type)) {
73783
+ } else if (graphql19.isEnumType(type)) {
73900
73784
  ensureImports({
73901
73785
  config: config2,
73902
73786
  body,
@@ -73921,11 +73805,11 @@ function inlineType({
73921
73805
  for (const selection of selections) {
73922
73806
  if (selection.kind === "InlineFragment" && selection.typeCondition) {
73923
73807
  const fragmentType = config2.schema.getType(selection.typeCondition.name.value);
73924
- if (!graphql20.isInterfaceType(type) && !graphql20.isUnionType(type)) {
73808
+ if (!graphql19.isInterfaceType(type) && !graphql19.isUnionType(type)) {
73925
73809
  selectedFields.push(...selection.selectionSet.selections);
73926
73810
  continue;
73927
73811
  }
73928
- if (!graphql20.isInterfaceType(fragmentType) && !graphql20.isUnionType(fragmentType)) {
73812
+ if (!graphql19.isInterfaceType(fragmentType) && !graphql19.isUnionType(fragmentType)) {
73929
73813
  if (!inlineFragments[fragmentType.name]) {
73930
73814
  inlineFragments[fragmentType.name] = [];
73931
73815
  }
@@ -74017,6 +73901,11 @@ function inlineType({
74017
73901
  if (allOptional) {
74018
73902
  prop.optional = true;
74019
73903
  }
73904
+ if (field2.description || field2.deprecationReason) {
73905
+ prop.comments = [
73906
+ jsdocComment(field2.description ?? "", field2.deprecationReason ?? void 0)
73907
+ ];
73908
+ }
74020
73909
  return prop;
74021
73910
  })
74022
73911
  ]);
@@ -74068,7 +73957,7 @@ function inlineType({
74068
73957
  }
74069
73958
  }
74070
73959
  }
74071
- if (objectType.type === "TSTypeLiteral" && !graphql20.isInterfaceType(fragmentRootType) && !graphql20.isUnionType(fragmentRootType)) {
73960
+ if (objectType.type === "TSTypeLiteral" && !graphql19.isInterfaceType(fragmentRootType) && !graphql19.isUnionType(fragmentRootType)) {
74072
73961
  const existingTypenameIndex = objectType.members.findIndex(
74073
73962
  (member) => member.type === "TSPropertySignature" && member.key.type === "Identifier" && member.key.name === "__typename"
74074
73963
  );
@@ -74093,11 +73982,11 @@ function inlineType({
74093
73982
  ];
74094
73983
  }
74095
73984
  let coveredTypenames;
74096
- if (graphql20.isInterfaceType(fragmentRootType)) {
73985
+ if (graphql19.isInterfaceType(fragmentRootType)) {
74097
73986
  coveredTypenames = interfaceCoveredTypenames(fragmentRootType);
74098
- } else if (graphql20.isUnionType(fragmentRootType)) {
73987
+ } else if (graphql19.isUnionType(fragmentRootType)) {
74099
73988
  coveredTypenames = fragmentRootType.getTypes().map((type2) => type2.name);
74100
- } else if (graphql20.isObjectType(fragmentRootType)) {
73989
+ } else if (graphql19.isObjectType(fragmentRootType)) {
74101
73990
  coveredTypenames = [fragmentRootType.name];
74102
73991
  } else {
74103
73992
  throw Error("unreachable code");
@@ -74133,7 +74022,7 @@ function inlineType({
74133
74022
  );
74134
74023
  }
74135
74024
  );
74136
- const parentIsUnionOrInterface = !graphql20.isInterfaceType(type) && !graphql20.isUnionType(type);
74025
+ const parentIsUnionOrInterface = !graphql19.isInterfaceType(type) && !graphql19.isUnionType(type);
74137
74026
  const possibleTypenames = parentIsUnionOrInterface ? [parent.name] : config2.schema.getPossibleTypes(type).map((type2) => type2.name);
74138
74027
  const coveredTypenames = new Set(
74139
74028
  Object.values(inlineFragmentSelections).flatMap((sel) => sel.coveredTypenames)
@@ -74200,7 +74089,7 @@ function selectionTypeInfo(schema, filepath, rootType, selection) {
74200
74089
  },
74201
74090
  type: schema.getType("String")
74202
74091
  };
74203
- } else if (graphql20.isNonNullType(rootType) && "getFields" in rootType.ofType) {
74092
+ } else if (graphql19.isNonNullType(rootType) && "getFields" in rootType.ofType) {
74204
74093
  fields = rootType.ofType.getFields();
74205
74094
  } else {
74206
74095
  fields = rootType.getFields();
@@ -74212,7 +74101,7 @@ function selectionTypeInfo(schema, filepath, rootType, selection) {
74212
74101
  message: `Could not find type information for field ${rootType.toString()}.${selectionName} ${field}`
74213
74102
  });
74214
74103
  }
74215
- const fieldType = graphql20.getNamedType(field.type);
74104
+ const fieldType = graphql19.getNamedType(field.type);
74216
74105
  if (!fieldType) {
74217
74106
  throw new HoudiniError({
74218
74107
  filepath,
@@ -74720,7 +74609,7 @@ async function generateFragmentTypeDefs(config2, filepath, body, selections, def
74720
74609
  }
74721
74610
 
74722
74611
  // src/codegen/generators/typescript/imperativeTypeDef.ts
74723
- var graphql21 = __toESM(require("graphql"), 1);
74612
+ var graphql20 = __toESM(require("graphql"), 1);
74724
74613
  var recast12 = __toESM(require_main2(), 1);
74725
74614
  var AST12 = recast12.types.builders;
74726
74615
  async function imperativeCacheTypef(config2, docs) {
@@ -74772,7 +74661,7 @@ function typeDefinitions(config2, filepath, body, docs, returnType) {
74772
74661
  const operationTypes = [config2.schema.getMutationType(), config2.schema.getSubscriptionType()].filter(Boolean).map((type) => type?.name);
74773
74662
  const visitedTypes = /* @__PURE__ */ new Set();
74774
74663
  const types17 = Object.values(config2.schema.getTypeMap()).filter(
74775
- (type) => !graphql21.isAbstractType(type) && !graphql21.isScalarType(type) && !graphql21.isEnumType(type) && !graphql21.isInputObjectType(type) && !type.name.startsWith("__") && !operationTypes.includes(type.name)
74664
+ (type) => !graphql20.isAbstractType(type) && !graphql20.isScalarType(type) && !graphql20.isEnumType(type) && !graphql20.isInputObjectType(type) && !type.name.startsWith("__") && !operationTypes.includes(type.name)
74776
74665
  );
74777
74666
  const fragmentMap = fragmentListMap(
74778
74667
  config2,
@@ -74789,7 +74678,7 @@ function typeDefinitions(config2, filepath, body, docs, returnType) {
74789
74678
  }
74790
74679
  let idFields = AST12.tsNeverKeyword();
74791
74680
  const keys2 = keyFieldsForType(config2.configFile, type.name);
74792
- if (graphql21.isObjectType(type) && keys2.length > 0 && keys2.every((key) => type.getFields()[key])) {
74681
+ if (graphql20.isObjectType(type) && keys2.length > 0 && keys2.every((key) => type.getFields()[key])) {
74793
74682
  idFields = AST12.tsTypeLiteral(
74794
74683
  keys2.map((key) => {
74795
74684
  const fieldType = type.getFields()[key];
@@ -74816,13 +74705,13 @@ function typeDefinitions(config2, filepath, body, docs, returnType) {
74816
74705
  idFields = AST12.tsTypeLiteral([]);
74817
74706
  }
74818
74707
  let fields = AST12.tsTypeLiteral([]);
74819
- if (graphql21.isObjectType(type)) {
74708
+ if (graphql20.isObjectType(type)) {
74820
74709
  fields = AST12.tsTypeLiteral(
74821
74710
  Object.entries(type.getFields()).map(
74822
74711
  ([key, fieldType]) => {
74823
74712
  const unwrapped = unwrapType(config2, fieldType.type);
74824
74713
  let typeOptions = AST12.tsUnionType([]);
74825
- if (graphql21.isScalarType(unwrapped.type)) {
74714
+ if (graphql20.isScalarType(unwrapped.type)) {
74826
74715
  typeOptions.types.push(
74827
74716
  scalarPropertyValue(
74828
74717
  config2,
@@ -74836,11 +74725,11 @@ function typeDefinitions(config2, filepath, body, docs, returnType) {
74836
74725
  }
74837
74726
  )
74838
74727
  );
74839
- } else if (graphql21.isEnumType(unwrapped.type)) {
74728
+ } else if (graphql20.isEnumType(unwrapped.type)) {
74840
74729
  typeOptions.types.push(
74841
74730
  AST12.tsTypeReference(AST12.identifier(unwrapped.type.name))
74842
74731
  );
74843
- } else if (!graphql21.isAbstractType(unwrapped.type)) {
74732
+ } else if (!graphql20.isAbstractType(unwrapped.type)) {
74844
74733
  typeOptions.types.push(record(unwrapped.type.name));
74845
74734
  } else {
74846
74735
  typeOptions.types.push(
@@ -74936,7 +74825,7 @@ function listDefinitions(config2, filepath, body, docs) {
74936
74825
  const lists = [];
74937
74826
  const visitedLists = /* @__PURE__ */ new Set();
74938
74827
  for (const doc of docs) {
74939
- graphql21.visit(doc.document, {
74828
+ graphql20.visit(doc.document, {
74940
74829
  Directive(node, key, parent2, path3, ancestors) {
74941
74830
  if (![config2.listDirective, config2.paginateDirective].includes(node.name.value)) {
74942
74831
  return;
@@ -74958,7 +74847,7 @@ function listDefinitions(config2, filepath, body, docs) {
74958
74847
  const targetFieldDefinition = parentType.getFields()[targetField.name.value];
74959
74848
  const { type: listType } = unwrapType(config2, targetFieldDefinition.type);
74960
74849
  const possibleTypes = [];
74961
- if (graphql21.isAbstractType(listType)) {
74850
+ if (graphql20.isAbstractType(listType)) {
74962
74851
  possibleTypes.push(
74963
74852
  ...config2.schema.getPossibleTypes(listType).map((possible) => possible.name)
74964
74853
  );
@@ -75120,7 +75009,7 @@ async function typescriptGenerator(config2, docs) {
75120
75009
  }
75121
75010
 
75122
75011
  // src/codegen/generators/persistedQueries/index.ts
75123
- var graphql22 = __toESM(require("graphql"), 1);
75012
+ var graphql21 = __toESM(require("graphql"), 1);
75124
75013
  async function persistOutputGenerator(config2, docs) {
75125
75014
  if (!config2.persistedQueriesPath.endsWith(".json")) {
75126
75015
  throw new Error('Can write Persisted Queries only in a ".json" file.');
@@ -75130,8 +75019,8 @@ async function persistOutputGenerator(config2, docs) {
75130
75019
  if (!generateArtifact) {
75131
75020
  return acc;
75132
75021
  }
75133
- let rawString = graphql22.print(
75134
- graphql22.visit(document, {
75022
+ let rawString = graphql21.print(
75023
+ graphql21.visit(document, {
75135
75024
  Directive(node) {
75136
75025
  if (config2.isInternalDirective(node.name.value)) {
75137
75026
  return null;
@@ -75140,7 +75029,7 @@ async function persistOutputGenerator(config2, docs) {
75140
75029
  })
75141
75030
  );
75142
75031
  const operations = document.definitions.filter(
75143
- ({ kind }) => kind === graphql22.Kind.OPERATION_DEFINITION
75032
+ ({ kind }) => kind === graphql21.Kind.OPERATION_DEFINITION
75144
75033
  );
75145
75034
  if (operations.length > 0 && operations[0].kind === "OperationDefinition") {
75146
75035
  if (artifact) {
@@ -75155,33 +75044,45 @@ async function persistOutputGenerator(config2, docs) {
75155
75044
  }
75156
75045
 
75157
75046
  // src/codegen/generators/definitions/index.ts
75158
- var graphql24 = __toESM(require("graphql"), 1);
75047
+ var graphql23 = __toESM(require("graphql"), 1);
75159
75048
 
75160
75049
  // src/codegen/generators/definitions/enums.ts
75161
- var graphql23 = __toESM(require("graphql"), 1);
75050
+ var graphql22 = __toESM(require("graphql"), 1);
75162
75051
  var recast13 = __toESM(require_main2(), 1);
75163
75052
  var AST13 = recast13.types.builders;
75164
75053
  async function definitionsGenerator(config2) {
75165
- const enums = graphql23.parse(graphql23.printSchema(config2.schema)).definitions.filter(
75054
+ const enums = graphql22.parse(graphql22.printSchema(config2.schema)).definitions.filter(
75166
75055
  (definition) => definition.kind === "EnumTypeDefinition"
75167
75056
  ).filter((def) => !config2.isInternalEnum(def));
75168
75057
  const { code: runtimeDefinitions } = await printJS(
75169
75058
  AST13.program(
75170
75059
  enums.map((defn) => {
75171
75060
  const name = defn.name.value;
75172
- return moduleExport(
75061
+ const declaration = moduleExport(
75173
75062
  config2,
75174
75063
  name,
75175
75064
  AST13.objectExpression(
75176
75065
  defn.values?.map((value) => {
75177
75066
  const str = value.name.value;
75178
- return AST13.objectProperty(
75067
+ const prop = AST13.objectProperty(
75179
75068
  AST13.stringLiteral(str),
75180
75069
  AST13.stringLiteral(str)
75181
75070
  );
75071
+ const deprecationReason = value.directives?.find((d) => d.name.value === "deprecated")?.arguments?.find((a) => a.name.value === "reason")?.value?.value;
75072
+ if (value.description || deprecationReason)
75073
+ prop.comments = [
75074
+ jsdocComment(value.description?.value ?? "", deprecationReason)
75075
+ ];
75076
+ return prop;
75182
75077
  }) || []
75183
75078
  )
75184
75079
  );
75080
+ if (defn.description) {
75081
+ declaration.comments = [
75082
+ AST13.commentBlock(`* ${defn.description.value} `, true, false)
75083
+ ];
75084
+ }
75085
+ return declaration;
75185
75086
  })
75186
75087
  )
75187
75088
  );
@@ -75190,11 +75091,19 @@ type ValuesOf<T> = T[keyof T]
75190
75091
  ` + enums.sort((a, b) => a.name.value.localeCompare(b.name.value)).map((definition) => {
75191
75092
  const name = definition.name.value;
75192
75093
  const values = definition.values;
75193
- return `
75094
+ let jsdoc = "";
75095
+ if (definition.description) {
75096
+ jsdoc = `
75097
+ /** ${definition.description.value} */`;
75098
+ }
75099
+ return `${jsdoc}
75194
75100
  export declare const ${name}: {
75195
- ${values?.map((value) => ` readonly ${value.name.value}: "${value.name.value}";`).join("\n")}
75101
+ ${values?.map(
75102
+ (value) => (value.description ? ` /** ${value.description.value} */
75103
+ ` : "") + ` readonly ${value.name.value}: "${value.name.value}";`
75104
+ ).join("\n")}
75196
75105
  }
75197
-
75106
+ ${jsdoc}
75198
75107
  export type ${name}$options = ValuesOf<typeof ${name}>
75199
75108
  `;
75200
75109
  }).join("");
@@ -75214,7 +75123,7 @@ async function schemaGenerator(config2) {
75214
75123
  await Promise.all([
75215
75124
  fs_exports.writeFile(
75216
75125
  config2.definitionsSchemaPath,
75217
- config2.localSchema ? graphql24.printSchema(config2.schema) : config2.newSchema
75126
+ config2.localSchema ? graphql23.printSchema(config2.schema) : config2.newSchema
75218
75127
  ),
75219
75128
  fs_exports.writeFile(config2.definitionsDocumentsPath, config2.newDocuments),
75220
75129
  definitionsGenerator(config2)
@@ -75259,7 +75168,7 @@ async function writeIndexFile2(config2, docs) {
75259
75168
  }
75260
75169
 
75261
75170
  // ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/helpers.js
75262
- var import_graphql32 = require("graphql");
75171
+ var import_graphql33 = require("graphql");
75263
75172
  function compareStrings2(a, b) {
75264
75173
  if (String(a) < String(b)) {
75265
75174
  return -1;
@@ -75295,7 +75204,7 @@ function isSome2(input) {
75295
75204
  }
75296
75205
 
75297
75206
  // ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/inspect.js
75298
- var import_graphql33 = require("graphql");
75207
+ var import_graphql34 = require("graphql");
75299
75208
  var MAX_RECURSIVE_DEPTH2 = 3;
75300
75209
  function inspect2(value) {
75301
75210
  return formatValue2(value, []);
@@ -75313,7 +75222,7 @@ function formatValue2(value, seenValues) {
75313
75222
  }
75314
75223
  }
75315
75224
  function formatError2(value) {
75316
- if (value instanceof import_graphql33.GraphQLError) {
75225
+ if (value instanceof import_graphql34.GraphQLError) {
75317
75226
  return value.toString();
75318
75227
  }
75319
75228
  return `${value.name}: ${value.message};
@@ -75396,43 +75305,43 @@ function getDirectivesInExtensions2(node, pathToDirectivesInExtensions = ["direc
75396
75305
  }
75397
75306
 
75398
75307
  // ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/print-schema-with-directives.js
75399
- var import_graphql37 = require("graphql");
75308
+ var import_graphql38 = require("graphql");
75400
75309
 
75401
75310
  // ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/astFromType.js
75402
- var import_graphql34 = require("graphql");
75311
+ var import_graphql35 = require("graphql");
75403
75312
  function astFromType2(type) {
75404
- if ((0, import_graphql34.isNonNullType)(type)) {
75313
+ if ((0, import_graphql35.isNonNullType)(type)) {
75405
75314
  const innerType = astFromType2(type.ofType);
75406
- if (innerType.kind === import_graphql34.Kind.NON_NULL_TYPE) {
75315
+ if (innerType.kind === import_graphql35.Kind.NON_NULL_TYPE) {
75407
75316
  throw new Error(`Invalid type node ${inspect2(type)}. Inner type of non-null type cannot be a non-null type.`);
75408
75317
  }
75409
75318
  return {
75410
- kind: import_graphql34.Kind.NON_NULL_TYPE,
75319
+ kind: import_graphql35.Kind.NON_NULL_TYPE,
75411
75320
  type: innerType
75412
75321
  };
75413
- } else if ((0, import_graphql34.isListType)(type)) {
75322
+ } else if ((0, import_graphql35.isListType)(type)) {
75414
75323
  return {
75415
- kind: import_graphql34.Kind.LIST_TYPE,
75324
+ kind: import_graphql35.Kind.LIST_TYPE,
75416
75325
  type: astFromType2(type.ofType)
75417
75326
  };
75418
75327
  }
75419
75328
  return {
75420
- kind: import_graphql34.Kind.NAMED_TYPE,
75329
+ kind: import_graphql35.Kind.NAMED_TYPE,
75421
75330
  name: {
75422
- kind: import_graphql34.Kind.NAME,
75331
+ kind: import_graphql35.Kind.NAME,
75423
75332
  value: type.name
75424
75333
  }
75425
75334
  };
75426
75335
  }
75427
75336
 
75428
75337
  // ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/astFromValue.js
75429
- var import_graphql36 = require("graphql");
75338
+ var import_graphql37 = require("graphql");
75430
75339
 
75431
75340
  // ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/astFromValueUntyped.js
75432
- var import_graphql35 = require("graphql");
75341
+ var import_graphql36 = require("graphql");
75433
75342
  function astFromValueUntyped2(value) {
75434
75343
  if (value === null) {
75435
- return { kind: import_graphql35.Kind.NULL };
75344
+ return { kind: import_graphql36.Kind.NULL };
75436
75345
  }
75437
75346
  if (value === void 0) {
75438
75347
  return null;
@@ -75445,7 +75354,7 @@ function astFromValueUntyped2(value) {
75445
75354
  valuesNodes.push(itemNode);
75446
75355
  }
75447
75356
  }
75448
- return { kind: import_graphql35.Kind.LIST, values: valuesNodes };
75357
+ return { kind: import_graphql36.Kind.LIST, values: valuesNodes };
75449
75358
  }
75450
75359
  if (typeof value === "object") {
75451
75360
  const fieldNodes = [];
@@ -75454,26 +75363,26 @@ function astFromValueUntyped2(value) {
75454
75363
  const ast = astFromValueUntyped2(fieldValue);
75455
75364
  if (ast) {
75456
75365
  fieldNodes.push({
75457
- kind: import_graphql35.Kind.OBJECT_FIELD,
75458
- name: { kind: import_graphql35.Kind.NAME, value: fieldName },
75366
+ kind: import_graphql36.Kind.OBJECT_FIELD,
75367
+ name: { kind: import_graphql36.Kind.NAME, value: fieldName },
75459
75368
  value: ast
75460
75369
  });
75461
75370
  }
75462
75371
  }
75463
- return { kind: import_graphql35.Kind.OBJECT, fields: fieldNodes };
75372
+ return { kind: import_graphql36.Kind.OBJECT, fields: fieldNodes };
75464
75373
  }
75465
75374
  if (typeof value === "boolean") {
75466
- return { kind: import_graphql35.Kind.BOOLEAN, value };
75375
+ return { kind: import_graphql36.Kind.BOOLEAN, value };
75467
75376
  }
75468
75377
  if (typeof value === "bigint") {
75469
- return { kind: import_graphql35.Kind.INT, value: String(value) };
75378
+ return { kind: import_graphql36.Kind.INT, value: String(value) };
75470
75379
  }
75471
75380
  if (typeof value === "number" && isFinite(value)) {
75472
75381
  const stringNum = String(value);
75473
- return integerStringRegExp2.test(stringNum) ? { kind: import_graphql35.Kind.INT, value: stringNum } : { kind: import_graphql35.Kind.FLOAT, value: stringNum };
75382
+ return integerStringRegExp2.test(stringNum) ? { kind: import_graphql36.Kind.INT, value: stringNum } : { kind: import_graphql36.Kind.FLOAT, value: stringNum };
75474
75383
  }
75475
75384
  if (typeof value === "string") {
75476
- return { kind: import_graphql35.Kind.STRING, value };
75385
+ return { kind: import_graphql36.Kind.STRING, value };
75477
75386
  }
75478
75387
  throw new TypeError(`Cannot convert value to AST: ${value}.`);
75479
75388
  }
@@ -75481,20 +75390,20 @@ var integerStringRegExp2 = /^-?(?:0|[1-9][0-9]*)$/;
75481
75390
 
75482
75391
  // ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/astFromValue.js
75483
75392
  function astFromValue2(value, type) {
75484
- if ((0, import_graphql36.isNonNullType)(type)) {
75393
+ if ((0, import_graphql37.isNonNullType)(type)) {
75485
75394
  const astValue = astFromValue2(value, type.ofType);
75486
- if (astValue?.kind === import_graphql36.Kind.NULL) {
75395
+ if (astValue?.kind === import_graphql37.Kind.NULL) {
75487
75396
  return null;
75488
75397
  }
75489
75398
  return astValue;
75490
75399
  }
75491
75400
  if (value === null) {
75492
- return { kind: import_graphql36.Kind.NULL };
75401
+ return { kind: import_graphql37.Kind.NULL };
75493
75402
  }
75494
75403
  if (value === void 0) {
75495
75404
  return null;
75496
75405
  }
75497
- if ((0, import_graphql36.isListType)(type)) {
75406
+ if ((0, import_graphql37.isListType)(type)) {
75498
75407
  const itemType = type.ofType;
75499
75408
  if (isIterableObject(value)) {
75500
75409
  const valuesNodes = [];
@@ -75504,11 +75413,11 @@ function astFromValue2(value, type) {
75504
75413
  valuesNodes.push(itemNode);
75505
75414
  }
75506
75415
  }
75507
- return { kind: import_graphql36.Kind.LIST, values: valuesNodes };
75416
+ return { kind: import_graphql37.Kind.LIST, values: valuesNodes };
75508
75417
  }
75509
75418
  return astFromValue2(value, itemType);
75510
75419
  }
75511
- if ((0, import_graphql36.isInputObjectType)(type)) {
75420
+ if ((0, import_graphql37.isInputObjectType)(type)) {
75512
75421
  if (!isObjectLike(value)) {
75513
75422
  return null;
75514
75423
  }
@@ -75517,24 +75426,24 @@ function astFromValue2(value, type) {
75517
75426
  const fieldValue = astFromValue2(value[field.name], field.type);
75518
75427
  if (fieldValue) {
75519
75428
  fieldNodes.push({
75520
- kind: import_graphql36.Kind.OBJECT_FIELD,
75521
- name: { kind: import_graphql36.Kind.NAME, value: field.name },
75429
+ kind: import_graphql37.Kind.OBJECT_FIELD,
75430
+ name: { kind: import_graphql37.Kind.NAME, value: field.name },
75522
75431
  value: fieldValue
75523
75432
  });
75524
75433
  }
75525
75434
  }
75526
- return { kind: import_graphql36.Kind.OBJECT, fields: fieldNodes };
75435
+ return { kind: import_graphql37.Kind.OBJECT, fields: fieldNodes };
75527
75436
  }
75528
- if ((0, import_graphql36.isLeafType)(type)) {
75437
+ if ((0, import_graphql37.isLeafType)(type)) {
75529
75438
  const serialized = type.serialize(value);
75530
75439
  if (serialized == null) {
75531
75440
  return null;
75532
75441
  }
75533
- if ((0, import_graphql36.isEnumType)(type)) {
75534
- return { kind: import_graphql36.Kind.ENUM, value: serialized };
75442
+ if ((0, import_graphql37.isEnumType)(type)) {
75443
+ return { kind: import_graphql37.Kind.ENUM, value: serialized };
75535
75444
  }
75536
75445
  if (type.name === "ID" && typeof serialized === "string" && integerStringRegExp3.test(serialized)) {
75537
- return { kind: import_graphql36.Kind.INT, value: serialized };
75446
+ return { kind: import_graphql37.Kind.INT, value: serialized };
75538
75447
  }
75539
75448
  return astFromValueUntyped2(serialized);
75540
75449
  }
@@ -75590,36 +75499,36 @@ function getDocumentNodeFromSchema2(schema, options = {}) {
75590
75499
  const definitions = schemaNode != null ? [schemaNode] : [];
75591
75500
  const directives = schema.getDirectives();
75592
75501
  for (const directive of directives) {
75593
- if ((0, import_graphql37.isSpecifiedDirective)(directive)) {
75502
+ if ((0, import_graphql38.isSpecifiedDirective)(directive)) {
75594
75503
  continue;
75595
75504
  }
75596
75505
  definitions.push(astFromDirective2(directive, schema, pathToDirectivesInExtensions));
75597
75506
  }
75598
75507
  for (const typeName in typesMap) {
75599
75508
  const type = typesMap[typeName];
75600
- const isPredefinedScalar = (0, import_graphql37.isSpecifiedScalarType)(type);
75601
- const isIntrospection = (0, import_graphql37.isIntrospectionType)(type);
75509
+ const isPredefinedScalar = (0, import_graphql38.isSpecifiedScalarType)(type);
75510
+ const isIntrospection = (0, import_graphql38.isIntrospectionType)(type);
75602
75511
  if (isPredefinedScalar || isIntrospection) {
75603
75512
  continue;
75604
75513
  }
75605
- if ((0, import_graphql37.isObjectType)(type)) {
75514
+ if ((0, import_graphql38.isObjectType)(type)) {
75606
75515
  definitions.push(astFromObjectType2(type, schema, pathToDirectivesInExtensions));
75607
- } else if ((0, import_graphql37.isInterfaceType)(type)) {
75516
+ } else if ((0, import_graphql38.isInterfaceType)(type)) {
75608
75517
  definitions.push(astFromInterfaceType2(type, schema, pathToDirectivesInExtensions));
75609
- } else if ((0, import_graphql37.isUnionType)(type)) {
75518
+ } else if ((0, import_graphql38.isUnionType)(type)) {
75610
75519
  definitions.push(astFromUnionType2(type, schema, pathToDirectivesInExtensions));
75611
- } else if ((0, import_graphql37.isInputObjectType)(type)) {
75520
+ } else if ((0, import_graphql38.isInputObjectType)(type)) {
75612
75521
  definitions.push(astFromInputObjectType2(type, schema, pathToDirectivesInExtensions));
75613
- } else if ((0, import_graphql37.isEnumType)(type)) {
75522
+ } else if ((0, import_graphql38.isEnumType)(type)) {
75614
75523
  definitions.push(astFromEnumType2(type, schema, pathToDirectivesInExtensions));
75615
- } else if ((0, import_graphql37.isScalarType)(type)) {
75524
+ } else if ((0, import_graphql38.isScalarType)(type)) {
75616
75525
  definitions.push(astFromScalarType2(type, schema, pathToDirectivesInExtensions));
75617
75526
  } else {
75618
75527
  throw new Error(`Unknown type ${type}.`);
75619
75528
  }
75620
75529
  }
75621
75530
  return {
75622
- kind: import_graphql37.Kind.DOCUMENT,
75531
+ kind: import_graphql38.Kind.DOCUMENT,
75623
75532
  definitions
75624
75533
  };
75625
75534
  }
@@ -75654,7 +75563,7 @@ function astFromSchema2(schema, pathToDirectivesInExtensions) {
75654
75563
  operationTypeDefinitionNode.type = rootTypeAST;
75655
75564
  } else {
75656
75565
  operationTypeMap.set(operationTypeNode, {
75657
- kind: import_graphql37.Kind.OPERATION_TYPE_DEFINITION,
75566
+ kind: import_graphql38.Kind.OPERATION_TYPE_DEFINITION,
75658
75567
  operation: operationTypeNode,
75659
75568
  type: rootTypeAST
75660
75569
  });
@@ -75667,12 +75576,12 @@ function astFromSchema2(schema, pathToDirectivesInExtensions) {
75667
75576
  return null;
75668
75577
  }
75669
75578
  const schemaNode = {
75670
- kind: operationTypes != null ? import_graphql37.Kind.SCHEMA_DEFINITION : import_graphql37.Kind.SCHEMA_EXTENSION,
75579
+ kind: operationTypes != null ? import_graphql38.Kind.SCHEMA_DEFINITION : import_graphql38.Kind.SCHEMA_EXTENSION,
75671
75580
  operationTypes,
75672
75581
  directives
75673
75582
  };
75674
75583
  schemaNode.description = schema.astNode?.description ?? schema.description != null ? {
75675
- kind: import_graphql37.Kind.STRING,
75584
+ kind: import_graphql38.Kind.STRING,
75676
75585
  value: schema.description,
75677
75586
  block: true
75678
75587
  } : void 0;
@@ -75680,19 +75589,19 @@ function astFromSchema2(schema, pathToDirectivesInExtensions) {
75680
75589
  }
75681
75590
  function astFromDirective2(directive, schema, pathToDirectivesInExtensions) {
75682
75591
  return {
75683
- kind: import_graphql37.Kind.DIRECTIVE_DEFINITION,
75592
+ kind: import_graphql38.Kind.DIRECTIVE_DEFINITION,
75684
75593
  description: directive.astNode?.description ?? (directive.description ? {
75685
- kind: import_graphql37.Kind.STRING,
75594
+ kind: import_graphql38.Kind.STRING,
75686
75595
  value: directive.description
75687
75596
  } : void 0),
75688
75597
  name: {
75689
- kind: import_graphql37.Kind.NAME,
75598
+ kind: import_graphql38.Kind.NAME,
75690
75599
  value: directive.name
75691
75600
  },
75692
75601
  arguments: directive.args?.map((arg) => astFromArg2(arg, schema, pathToDirectivesInExtensions)),
75693
75602
  repeatable: directive.isRepeatable,
75694
75603
  locations: directive.locations?.map((location) => ({
75695
- kind: import_graphql37.Kind.NAME,
75604
+ kind: import_graphql38.Kind.NAME,
75696
75605
  value: location
75697
75606
  })) || []
75698
75607
  };
@@ -75742,14 +75651,14 @@ function getDeprecatableDirectiveNodes2(entity, schema, pathToDirectivesInExtens
75742
75651
  }
75743
75652
  function astFromArg2(arg, schema, pathToDirectivesInExtensions) {
75744
75653
  return {
75745
- kind: import_graphql37.Kind.INPUT_VALUE_DEFINITION,
75654
+ kind: import_graphql38.Kind.INPUT_VALUE_DEFINITION,
75746
75655
  description: arg.astNode?.description ?? (arg.description ? {
75747
- kind: import_graphql37.Kind.STRING,
75656
+ kind: import_graphql38.Kind.STRING,
75748
75657
  value: arg.description,
75749
75658
  block: true
75750
75659
  } : void 0),
75751
75660
  name: {
75752
- kind: import_graphql37.Kind.NAME,
75661
+ kind: import_graphql38.Kind.NAME,
75753
75662
  value: arg.name
75754
75663
  },
75755
75664
  type: astFromType2(arg.type),
@@ -75759,14 +75668,14 @@ function astFromArg2(arg, schema, pathToDirectivesInExtensions) {
75759
75668
  }
75760
75669
  function astFromObjectType2(type, schema, pathToDirectivesInExtensions) {
75761
75670
  return {
75762
- kind: import_graphql37.Kind.OBJECT_TYPE_DEFINITION,
75671
+ kind: import_graphql38.Kind.OBJECT_TYPE_DEFINITION,
75763
75672
  description: type.astNode?.description ?? (type.description ? {
75764
- kind: import_graphql37.Kind.STRING,
75673
+ kind: import_graphql38.Kind.STRING,
75765
75674
  value: type.description,
75766
75675
  block: true
75767
75676
  } : void 0),
75768
75677
  name: {
75769
- kind: import_graphql37.Kind.NAME,
75678
+ kind: import_graphql38.Kind.NAME,
75770
75679
  value: type.name
75771
75680
  },
75772
75681
  fields: Object.values(type.getFields()).map((field) => astFromField2(field, schema, pathToDirectivesInExtensions)),
@@ -75776,14 +75685,14 @@ function astFromObjectType2(type, schema, pathToDirectivesInExtensions) {
75776
75685
  }
75777
75686
  function astFromInterfaceType2(type, schema, pathToDirectivesInExtensions) {
75778
75687
  const node = {
75779
- kind: import_graphql37.Kind.INTERFACE_TYPE_DEFINITION,
75688
+ kind: import_graphql38.Kind.INTERFACE_TYPE_DEFINITION,
75780
75689
  description: type.astNode?.description ?? (type.description ? {
75781
- kind: import_graphql37.Kind.STRING,
75690
+ kind: import_graphql38.Kind.STRING,
75782
75691
  value: type.description,
75783
75692
  block: true
75784
75693
  } : void 0),
75785
75694
  name: {
75786
- kind: import_graphql37.Kind.NAME,
75695
+ kind: import_graphql38.Kind.NAME,
75787
75696
  value: type.name
75788
75697
  },
75789
75698
  fields: Object.values(type.getFields()).map((field) => astFromField2(field, schema, pathToDirectivesInExtensions)),
@@ -75796,14 +75705,14 @@ function astFromInterfaceType2(type, schema, pathToDirectivesInExtensions) {
75796
75705
  }
75797
75706
  function astFromUnionType2(type, schema, pathToDirectivesInExtensions) {
75798
75707
  return {
75799
- kind: import_graphql37.Kind.UNION_TYPE_DEFINITION,
75708
+ kind: import_graphql38.Kind.UNION_TYPE_DEFINITION,
75800
75709
  description: type.astNode?.description ?? (type.description ? {
75801
- kind: import_graphql37.Kind.STRING,
75710
+ kind: import_graphql38.Kind.STRING,
75802
75711
  value: type.description,
75803
75712
  block: true
75804
75713
  } : void 0),
75805
75714
  name: {
75806
- kind: import_graphql37.Kind.NAME,
75715
+ kind: import_graphql38.Kind.NAME,
75807
75716
  value: type.name
75808
75717
  },
75809
75718
  directives: getDirectiveNodes2(type, schema, pathToDirectivesInExtensions),
@@ -75812,14 +75721,14 @@ function astFromUnionType2(type, schema, pathToDirectivesInExtensions) {
75812
75721
  }
75813
75722
  function astFromInputObjectType2(type, schema, pathToDirectivesInExtensions) {
75814
75723
  return {
75815
- kind: import_graphql37.Kind.INPUT_OBJECT_TYPE_DEFINITION,
75724
+ kind: import_graphql38.Kind.INPUT_OBJECT_TYPE_DEFINITION,
75816
75725
  description: type.astNode?.description ?? (type.description ? {
75817
- kind: import_graphql37.Kind.STRING,
75726
+ kind: import_graphql38.Kind.STRING,
75818
75727
  value: type.description,
75819
75728
  block: true
75820
75729
  } : void 0),
75821
75730
  name: {
75822
- kind: import_graphql37.Kind.NAME,
75731
+ kind: import_graphql38.Kind.NAME,
75823
75732
  value: type.name
75824
75733
  },
75825
75734
  fields: Object.values(type.getFields()).map((field) => astFromInputField2(field, schema, pathToDirectivesInExtensions)),
@@ -75828,14 +75737,14 @@ function astFromInputObjectType2(type, schema, pathToDirectivesInExtensions) {
75828
75737
  }
75829
75738
  function astFromEnumType2(type, schema, pathToDirectivesInExtensions) {
75830
75739
  return {
75831
- kind: import_graphql37.Kind.ENUM_TYPE_DEFINITION,
75740
+ kind: import_graphql38.Kind.ENUM_TYPE_DEFINITION,
75832
75741
  description: type.astNode?.description ?? (type.description ? {
75833
- kind: import_graphql37.Kind.STRING,
75742
+ kind: import_graphql38.Kind.STRING,
75834
75743
  value: type.description,
75835
75744
  block: true
75836
75745
  } : void 0),
75837
75746
  name: {
75838
- kind: import_graphql37.Kind.NAME,
75747
+ kind: import_graphql38.Kind.NAME,
75839
75748
  value: type.name
75840
75749
  },
75841
75750
  values: Object.values(type.getValues()).map((value) => astFromEnumValue2(value, schema, pathToDirectivesInExtensions)),
@@ -75853,14 +75762,14 @@ function astFromScalarType2(type, schema, pathToDirectivesInExtensions) {
75853
75762
  directives.push(makeDirectiveNode2("specifiedBy", specifiedByArgs));
75854
75763
  }
75855
75764
  return {
75856
- kind: import_graphql37.Kind.SCALAR_TYPE_DEFINITION,
75765
+ kind: import_graphql38.Kind.SCALAR_TYPE_DEFINITION,
75857
75766
  description: type.astNode?.description ?? (type.description ? {
75858
- kind: import_graphql37.Kind.STRING,
75767
+ kind: import_graphql38.Kind.STRING,
75859
75768
  value: type.description,
75860
75769
  block: true
75861
75770
  } : void 0),
75862
75771
  name: {
75863
- kind: import_graphql37.Kind.NAME,
75772
+ kind: import_graphql38.Kind.NAME,
75864
75773
  value: type.name
75865
75774
  },
75866
75775
  directives
@@ -75868,14 +75777,14 @@ function astFromScalarType2(type, schema, pathToDirectivesInExtensions) {
75868
75777
  }
75869
75778
  function astFromField2(field, schema, pathToDirectivesInExtensions) {
75870
75779
  return {
75871
- kind: import_graphql37.Kind.FIELD_DEFINITION,
75780
+ kind: import_graphql38.Kind.FIELD_DEFINITION,
75872
75781
  description: field.astNode?.description ?? (field.description ? {
75873
- kind: import_graphql37.Kind.STRING,
75782
+ kind: import_graphql38.Kind.STRING,
75874
75783
  value: field.description,
75875
75784
  block: true
75876
75785
  } : void 0),
75877
75786
  name: {
75878
- kind: import_graphql37.Kind.NAME,
75787
+ kind: import_graphql38.Kind.NAME,
75879
75788
  value: field.name
75880
75789
  },
75881
75790
  arguments: field.args.map((arg) => astFromArg2(arg, schema, pathToDirectivesInExtensions)),
@@ -75885,14 +75794,14 @@ function astFromField2(field, schema, pathToDirectivesInExtensions) {
75885
75794
  }
75886
75795
  function astFromInputField2(field, schema, pathToDirectivesInExtensions) {
75887
75796
  return {
75888
- kind: import_graphql37.Kind.INPUT_VALUE_DEFINITION,
75797
+ kind: import_graphql38.Kind.INPUT_VALUE_DEFINITION,
75889
75798
  description: field.astNode?.description ?? (field.description ? {
75890
- kind: import_graphql37.Kind.STRING,
75799
+ kind: import_graphql38.Kind.STRING,
75891
75800
  value: field.description,
75892
75801
  block: true
75893
75802
  } : void 0),
75894
75803
  name: {
75895
- kind: import_graphql37.Kind.NAME,
75804
+ kind: import_graphql38.Kind.NAME,
75896
75805
  value: field.name
75897
75806
  },
75898
75807
  type: astFromType2(field.type),
@@ -75902,21 +75811,21 @@ function astFromInputField2(field, schema, pathToDirectivesInExtensions) {
75902
75811
  }
75903
75812
  function astFromEnumValue2(value, schema, pathToDirectivesInExtensions) {
75904
75813
  return {
75905
- kind: import_graphql37.Kind.ENUM_VALUE_DEFINITION,
75814
+ kind: import_graphql38.Kind.ENUM_VALUE_DEFINITION,
75906
75815
  description: value.astNode?.description ?? (value.description ? {
75907
- kind: import_graphql37.Kind.STRING,
75816
+ kind: import_graphql38.Kind.STRING,
75908
75817
  value: value.description,
75909
75818
  block: true
75910
75819
  } : void 0),
75911
75820
  name: {
75912
- kind: import_graphql37.Kind.NAME,
75821
+ kind: import_graphql38.Kind.NAME,
75913
75822
  value: value.name
75914
75823
  },
75915
75824
  directives: getDeprecatableDirectiveNodes2(value, schema, pathToDirectivesInExtensions)
75916
75825
  };
75917
75826
  }
75918
75827
  function makeDeprecatedDirective2(deprecationReason) {
75919
- return makeDirectiveNode2("deprecated", { reason: deprecationReason }, import_graphql37.GraphQLDeprecatedDirective);
75828
+ return makeDirectiveNode2("deprecated", { reason: deprecationReason }, import_graphql38.GraphQLDeprecatedDirective);
75920
75829
  }
75921
75830
  function makeDirectiveNode2(name, args, directive) {
75922
75831
  const directiveArguments = [];
@@ -75928,9 +75837,9 @@ function makeDirectiveNode2(name, args, directive) {
75928
75837
  const value = astFromValue2(argValue, arg.type);
75929
75838
  if (value) {
75930
75839
  directiveArguments.push({
75931
- kind: import_graphql37.Kind.ARGUMENT,
75840
+ kind: import_graphql38.Kind.ARGUMENT,
75932
75841
  name: {
75933
- kind: import_graphql37.Kind.NAME,
75842
+ kind: import_graphql38.Kind.NAME,
75934
75843
  value: argName
75935
75844
  },
75936
75845
  value
@@ -75944,9 +75853,9 @@ function makeDirectiveNode2(name, args, directive) {
75944
75853
  const value = astFromValueUntyped2(argValue);
75945
75854
  if (value) {
75946
75855
  directiveArguments.push({
75947
- kind: import_graphql37.Kind.ARGUMENT,
75856
+ kind: import_graphql38.Kind.ARGUMENT,
75948
75857
  name: {
75949
- kind: import_graphql37.Kind.NAME,
75858
+ kind: import_graphql38.Kind.NAME,
75950
75859
  value: argName
75951
75860
  },
75952
75861
  value
@@ -75955,9 +75864,9 @@ function makeDirectiveNode2(name, args, directive) {
75955
75864
  }
75956
75865
  }
75957
75866
  return {
75958
- kind: import_graphql37.Kind.DIRECTIVE,
75867
+ kind: import_graphql38.Kind.DIRECTIVE,
75959
75868
  name: {
75960
- kind: import_graphql37.Kind.NAME,
75869
+ kind: import_graphql38.Kind.NAME,
75961
75870
  value: name
75962
75871
  },
75963
75872
  arguments: directiveArguments
@@ -75980,7 +75889,7 @@ function makeDirectiveNodes2(schema, directiveValues) {
75980
75889
  }
75981
75890
 
75982
75891
  // ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/comments.js
75983
- var import_graphql38 = require("graphql");
75892
+ var import_graphql39 = require("graphql");
75984
75893
  var MAX_LINE_LENGTH2 = 80;
75985
75894
  var commentsRegistry2 = {};
75986
75895
  function resetComments2() {
@@ -76225,7 +76134,7 @@ var printDocASTReducerWithComments2 = Object.keys(printDocASTReducer2).reduce((p
76225
76134
  }
76226
76135
  }), {});
76227
76136
  function printWithComments2(ast) {
76228
- return (0, import_graphql38.visit)(ast, printDocASTReducerWithComments2);
76137
+ return (0, import_graphql39.visit)(ast, printDocASTReducerWithComments2);
76229
76138
  }
76230
76139
  function isFieldDefinitionNode2(node) {
76231
76140
  return node.kind === "FieldDefinition";
@@ -76244,7 +76153,7 @@ function getLeadingCommentBlock2(node) {
76244
76153
  }
76245
76154
  const comments = [];
76246
76155
  let token = loc.startToken.prev;
76247
- while (token != null && token.kind === import_graphql38.TokenKind.COMMENT && token.next != null && token.prev != null && token.line + 1 === token.next.line && token.line !== token.prev.line) {
76156
+ while (token != null && token.kind === import_graphql39.TokenKind.COMMENT && token.next != null && token.prev != null && token.line + 1 === token.next.line && token.line !== token.prev.line) {
76248
76157
  const value = String(token.value);
76249
76158
  comments.push(value);
76250
76159
  token = token.prev;
@@ -76296,9 +76205,9 @@ function isBlank2(str) {
76296
76205
  }
76297
76206
 
76298
76207
  // ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/isDocumentNode.js
76299
- var import_graphql39 = require("graphql");
76208
+ var import_graphql40 = require("graphql");
76300
76209
  function isDocumentNode2(object) {
76301
- return object && typeof object === "object" && "kind" in object && object.kind === import_graphql39.Kind.DOCUMENT;
76210
+ return object && typeof object === "object" && "kind" in object && object.kind === import_graphql40.Kind.DOCUMENT;
76302
76211
  }
76303
76212
 
76304
76213
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/arguments.js
@@ -76322,7 +76231,7 @@ function deduplicateArguments2(args, config2) {
76322
76231
  }
76323
76232
 
76324
76233
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/directives.js
76325
- var import_graphql40 = require("graphql");
76234
+ var import_graphql41 = require("graphql");
76326
76235
  function directiveAlreadyExists2(directivesArr, otherDirective) {
76327
76236
  return !!directivesArr.find((directive) => directive.name.value === otherDirective.name.value);
76328
76237
  }
@@ -76382,11 +76291,11 @@ function mergeDirectives2(d1 = [], d2 = [], config2, directives) {
76382
76291
  return result;
76383
76292
  }
76384
76293
  function validateInputs2(node, existingNode) {
76385
- const printedNode = (0, import_graphql40.print)({
76294
+ const printedNode = (0, import_graphql41.print)({
76386
76295
  ...node,
76387
76296
  description: void 0
76388
76297
  });
76389
- const printedExistingNode = (0, import_graphql40.print)({
76298
+ const printedExistingNode = (0, import_graphql41.print)({
76390
76299
  ...existingNode,
76391
76300
  description: void 0
76392
76301
  });
@@ -76453,7 +76362,7 @@ function mergeEnumValues2(first, second, config2, directives) {
76453
76362
  }
76454
76363
 
76455
76364
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/enum.js
76456
- var import_graphql41 = require("graphql");
76365
+ var import_graphql42 = require("graphql");
76457
76366
  function mergeEnum2(e1, e2, config2, directives) {
76458
76367
  if (e2) {
76459
76368
  return {
@@ -76467,33 +76376,33 @@ function mergeEnum2(e1, e2, config2, directives) {
76467
76376
  }
76468
76377
  return config2?.convertExtensions ? {
76469
76378
  ...e1,
76470
- kind: import_graphql41.Kind.ENUM_TYPE_DEFINITION
76379
+ kind: import_graphql42.Kind.ENUM_TYPE_DEFINITION
76471
76380
  } : e1;
76472
76381
  }
76473
76382
 
76474
76383
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/utils.js
76475
- var import_graphql42 = require("graphql");
76384
+ var import_graphql43 = require("graphql");
76476
76385
  function isStringTypes2(types17) {
76477
76386
  return typeof types17 === "string";
76478
76387
  }
76479
76388
  function isSourceTypes2(types17) {
76480
- return types17 instanceof import_graphql42.Source;
76389
+ return types17 instanceof import_graphql43.Source;
76481
76390
  }
76482
76391
  function extractType2(type) {
76483
76392
  let visitedType = type;
76484
- while (visitedType.kind === import_graphql42.Kind.LIST_TYPE || visitedType.kind === "NonNullType") {
76393
+ while (visitedType.kind === import_graphql43.Kind.LIST_TYPE || visitedType.kind === "NonNullType") {
76485
76394
  visitedType = visitedType.type;
76486
76395
  }
76487
76396
  return visitedType;
76488
76397
  }
76489
76398
  function isWrappingTypeNode2(type) {
76490
- return type.kind !== import_graphql42.Kind.NAMED_TYPE;
76399
+ return type.kind !== import_graphql43.Kind.NAMED_TYPE;
76491
76400
  }
76492
76401
  function isListTypeNode2(type) {
76493
- return type.kind === import_graphql42.Kind.LIST_TYPE;
76402
+ return type.kind === import_graphql43.Kind.LIST_TYPE;
76494
76403
  }
76495
76404
  function isNonNullTypeNode2(type) {
76496
- return type.kind === import_graphql42.Kind.NON_NULL_TYPE;
76405
+ return type.kind === import_graphql43.Kind.NON_NULL_TYPE;
76497
76406
  }
76498
76407
  function printTypeNode2(type) {
76499
76408
  if (isListTypeNode2(type)) {
@@ -76596,7 +76505,7 @@ function safeChangeForFieldType2(oldType, newType, ignoreNullability = false) {
76596
76505
  }
76597
76506
 
76598
76507
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/input-type.js
76599
- var import_graphql43 = require("graphql");
76508
+ var import_graphql44 = require("graphql");
76600
76509
  function mergeInputType2(node, existingNode, config2, directives) {
76601
76510
  if (existingNode) {
76602
76511
  try {
@@ -76614,12 +76523,12 @@ function mergeInputType2(node, existingNode, config2, directives) {
76614
76523
  }
76615
76524
  return config2?.convertExtensions ? {
76616
76525
  ...node,
76617
- kind: import_graphql43.Kind.INPUT_OBJECT_TYPE_DEFINITION
76526
+ kind: import_graphql44.Kind.INPUT_OBJECT_TYPE_DEFINITION
76618
76527
  } : node;
76619
76528
  }
76620
76529
 
76621
76530
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/interface.js
76622
- var import_graphql44 = require("graphql");
76531
+ var import_graphql45 = require("graphql");
76623
76532
 
76624
76533
  // ../../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
76625
76534
  function alreadyExists2(arr, other) {
@@ -76652,15 +76561,15 @@ function mergeInterface2(node, existingNode, config2, directives) {
76652
76561
  }
76653
76562
  return config2?.convertExtensions ? {
76654
76563
  ...node,
76655
- kind: import_graphql44.Kind.INTERFACE_TYPE_DEFINITION
76564
+ kind: import_graphql45.Kind.INTERFACE_TYPE_DEFINITION
76656
76565
  } : node;
76657
76566
  }
76658
76567
 
76659
76568
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/merge-nodes.js
76660
- var import_graphql49 = require("graphql");
76569
+ var import_graphql50 = require("graphql");
76661
76570
 
76662
76571
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/type.js
76663
- var import_graphql45 = require("graphql");
76572
+ var import_graphql46 = require("graphql");
76664
76573
  function mergeType2(node, existingNode, config2, directives) {
76665
76574
  if (existingNode) {
76666
76575
  try {
@@ -76679,12 +76588,12 @@ function mergeType2(node, existingNode, config2, directives) {
76679
76588
  }
76680
76589
  return config2?.convertExtensions ? {
76681
76590
  ...node,
76682
- kind: import_graphql45.Kind.OBJECT_TYPE_DEFINITION
76591
+ kind: import_graphql46.Kind.OBJECT_TYPE_DEFINITION
76683
76592
  } : node;
76684
76593
  }
76685
76594
 
76686
76595
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/scalar.js
76687
- var import_graphql46 = require("graphql");
76596
+ var import_graphql47 = require("graphql");
76688
76597
  function mergeScalar2(node, existingNode, config2, directives) {
76689
76598
  if (existingNode) {
76690
76599
  return {
@@ -76697,31 +76606,31 @@ function mergeScalar2(node, existingNode, config2, directives) {
76697
76606
  }
76698
76607
  return config2?.convertExtensions ? {
76699
76608
  ...node,
76700
- kind: import_graphql46.Kind.SCALAR_TYPE_DEFINITION
76609
+ kind: import_graphql47.Kind.SCALAR_TYPE_DEFINITION
76701
76610
  } : node;
76702
76611
  }
76703
76612
 
76704
76613
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/union.js
76705
- var import_graphql47 = require("graphql");
76614
+ var import_graphql48 = require("graphql");
76706
76615
  function mergeUnion2(first, second, config2, directives) {
76707
76616
  if (second) {
76708
76617
  return {
76709
76618
  name: first.name,
76710
76619
  description: first["description"] || second["description"],
76711
76620
  directives: mergeDirectives2(first.directives, second.directives, config2, directives),
76712
- kind: config2?.convertExtensions || first.kind === "UnionTypeDefinition" || second.kind === "UnionTypeDefinition" ? import_graphql47.Kind.UNION_TYPE_DEFINITION : import_graphql47.Kind.UNION_TYPE_EXTENSION,
76621
+ kind: config2?.convertExtensions || first.kind === "UnionTypeDefinition" || second.kind === "UnionTypeDefinition" ? import_graphql48.Kind.UNION_TYPE_DEFINITION : import_graphql48.Kind.UNION_TYPE_EXTENSION,
76713
76622
  loc: first.loc,
76714
76623
  types: mergeNamedTypeArray2(first.types, second.types, config2)
76715
76624
  };
76716
76625
  }
76717
76626
  return config2?.convertExtensions ? {
76718
76627
  ...first,
76719
- kind: import_graphql47.Kind.UNION_TYPE_DEFINITION
76628
+ kind: import_graphql48.Kind.UNION_TYPE_DEFINITION
76720
76629
  } : first;
76721
76630
  }
76722
76631
 
76723
76632
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/schema-def.js
76724
- var import_graphql48 = require("graphql");
76633
+ var import_graphql49 = require("graphql");
76725
76634
  var DEFAULT_OPERATION_TYPE_NAME_MAP2 = {
76726
76635
  query: "Query",
76727
76636
  mutation: "Mutation",
@@ -76740,7 +76649,7 @@ function mergeOperationTypes2(opNodeList = [], existingOpNodeList = []) {
76740
76649
  function mergeSchemaDefs2(node, existingNode, config2, directives) {
76741
76650
  if (existingNode) {
76742
76651
  return {
76743
- kind: node.kind === import_graphql48.Kind.SCHEMA_DEFINITION || existingNode.kind === import_graphql48.Kind.SCHEMA_DEFINITION ? import_graphql48.Kind.SCHEMA_DEFINITION : import_graphql48.Kind.SCHEMA_EXTENSION,
76652
+ kind: node.kind === import_graphql49.Kind.SCHEMA_DEFINITION || existingNode.kind === import_graphql49.Kind.SCHEMA_DEFINITION ? import_graphql49.Kind.SCHEMA_DEFINITION : import_graphql49.Kind.SCHEMA_EXTENSION,
76744
76653
  description: node["description"] || existingNode["description"],
76745
76654
  directives: mergeDirectives2(node.directives, existingNode.directives, config2, directives),
76746
76655
  operationTypes: mergeOperationTypes2(node.operationTypes, existingNode.operationTypes)
@@ -76748,7 +76657,7 @@ function mergeSchemaDefs2(node, existingNode, config2, directives) {
76748
76657
  }
76749
76658
  return config2?.convertExtensions ? {
76750
76659
  ...node,
76751
- kind: import_graphql48.Kind.SCHEMA_DEFINITION
76660
+ kind: import_graphql49.Kind.SCHEMA_DEFINITION
76752
76661
  } : node;
76753
76662
  }
76754
76663
 
@@ -76772,36 +76681,36 @@ function mergeGraphQLNodes2(nodes, config2, directives = {}) {
76772
76681
  delete mergedResultMap[name];
76773
76682
  } else {
76774
76683
  switch (nodeDefinition.kind) {
76775
- case import_graphql49.Kind.OBJECT_TYPE_DEFINITION:
76776
- case import_graphql49.Kind.OBJECT_TYPE_EXTENSION:
76684
+ case import_graphql50.Kind.OBJECT_TYPE_DEFINITION:
76685
+ case import_graphql50.Kind.OBJECT_TYPE_EXTENSION:
76777
76686
  mergedResultMap[name] = mergeType2(nodeDefinition, mergedResultMap[name], config2, directives);
76778
76687
  break;
76779
- case import_graphql49.Kind.ENUM_TYPE_DEFINITION:
76780
- case import_graphql49.Kind.ENUM_TYPE_EXTENSION:
76688
+ case import_graphql50.Kind.ENUM_TYPE_DEFINITION:
76689
+ case import_graphql50.Kind.ENUM_TYPE_EXTENSION:
76781
76690
  mergedResultMap[name] = mergeEnum2(nodeDefinition, mergedResultMap[name], config2, directives);
76782
76691
  break;
76783
- case import_graphql49.Kind.UNION_TYPE_DEFINITION:
76784
- case import_graphql49.Kind.UNION_TYPE_EXTENSION:
76692
+ case import_graphql50.Kind.UNION_TYPE_DEFINITION:
76693
+ case import_graphql50.Kind.UNION_TYPE_EXTENSION:
76785
76694
  mergedResultMap[name] = mergeUnion2(nodeDefinition, mergedResultMap[name], config2, directives);
76786
76695
  break;
76787
- case import_graphql49.Kind.SCALAR_TYPE_DEFINITION:
76788
- case import_graphql49.Kind.SCALAR_TYPE_EXTENSION:
76696
+ case import_graphql50.Kind.SCALAR_TYPE_DEFINITION:
76697
+ case import_graphql50.Kind.SCALAR_TYPE_EXTENSION:
76789
76698
  mergedResultMap[name] = mergeScalar2(nodeDefinition, mergedResultMap[name], config2, directives);
76790
76699
  break;
76791
- case import_graphql49.Kind.INPUT_OBJECT_TYPE_DEFINITION:
76792
- case import_graphql49.Kind.INPUT_OBJECT_TYPE_EXTENSION:
76700
+ case import_graphql50.Kind.INPUT_OBJECT_TYPE_DEFINITION:
76701
+ case import_graphql50.Kind.INPUT_OBJECT_TYPE_EXTENSION:
76793
76702
  mergedResultMap[name] = mergeInputType2(nodeDefinition, mergedResultMap[name], config2, directives);
76794
76703
  break;
76795
- case import_graphql49.Kind.INTERFACE_TYPE_DEFINITION:
76796
- case import_graphql49.Kind.INTERFACE_TYPE_EXTENSION:
76704
+ case import_graphql50.Kind.INTERFACE_TYPE_DEFINITION:
76705
+ case import_graphql50.Kind.INTERFACE_TYPE_EXTENSION:
76797
76706
  mergedResultMap[name] = mergeInterface2(nodeDefinition, mergedResultMap[name], config2, directives);
76798
76707
  break;
76799
- case import_graphql49.Kind.DIRECTIVE_DEFINITION:
76708
+ case import_graphql50.Kind.DIRECTIVE_DEFINITION:
76800
76709
  mergedResultMap[name] = mergeDirective2(nodeDefinition, mergedResultMap[name]);
76801
76710
  break;
76802
76711
  }
76803
76712
  }
76804
- } else if (nodeDefinition.kind === import_graphql49.Kind.SCHEMA_DEFINITION || nodeDefinition.kind === import_graphql49.Kind.SCHEMA_EXTENSION) {
76713
+ } else if (nodeDefinition.kind === import_graphql50.Kind.SCHEMA_DEFINITION || nodeDefinition.kind === import_graphql50.Kind.SCHEMA_EXTENSION) {
76805
76714
  mergedResultMap[schemaDefSymbol2] = mergeSchemaDefs2(nodeDefinition, mergedResultMap[schemaDefSymbol2], config2);
76806
76715
  }
76807
76716
  }
@@ -76809,11 +76718,11 @@ function mergeGraphQLNodes2(nodes, config2, directives = {}) {
76809
76718
  }
76810
76719
 
76811
76720
  // ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/merge-typedefs.js
76812
- var import_graphql50 = require("graphql");
76721
+ var import_graphql51 = require("graphql");
76813
76722
  function mergeTypeDefs2(typeSource, config2) {
76814
76723
  resetComments2();
76815
76724
  const doc = {
76816
- kind: import_graphql50.Kind.DOCUMENT,
76725
+ kind: import_graphql51.Kind.DOCUMENT,
76817
76726
  definitions: mergeGraphQLTypes2(typeSource, {
76818
76727
  useSchemaDefinition: true,
76819
76728
  forceSchemaDefinition: false,
@@ -76840,14 +76749,14 @@ function visitTypeSources2(typeSource, options, allDirectives = [], allNodes = [
76840
76749
  for (const type of typeSource) {
76841
76750
  visitTypeSources2(type, options, allDirectives, allNodes, visitedTypeSources);
76842
76751
  }
76843
- } else if ((0, import_graphql50.isSchema)(typeSource)) {
76752
+ } else if ((0, import_graphql51.isSchema)(typeSource)) {
76844
76753
  const documentNode = getDocumentNodeFromSchema2(typeSource, options);
76845
76754
  visitTypeSources2(documentNode.definitions, options, allDirectives, allNodes, visitedTypeSources);
76846
76755
  } else if (isStringTypes2(typeSource) || isSourceTypes2(typeSource)) {
76847
- const documentNode = (0, import_graphql50.parse)(typeSource, options);
76756
+ const documentNode = (0, import_graphql51.parse)(typeSource, options);
76848
76757
  visitTypeSources2(documentNode.definitions, options, allDirectives, allNodes, visitedTypeSources);
76849
- } else if (typeof typeSource === "object" && (0, import_graphql50.isDefinitionNode)(typeSource)) {
76850
- if (typeSource.kind === import_graphql50.Kind.DIRECTIVE_DEFINITION) {
76758
+ } else if (typeof typeSource === "object" && (0, import_graphql51.isDefinitionNode)(typeSource)) {
76759
+ if (typeSource.kind === import_graphql51.Kind.DIRECTIVE_DEFINITION) {
76851
76760
  allDirectives.push(typeSource);
76852
76761
  } else {
76853
76762
  allNodes.push(typeSource);
@@ -76867,7 +76776,7 @@ function mergeGraphQLTypes2(typeSource, config2) {
76867
76776
  const mergedNodes = mergeGraphQLNodes2(allNodes, config2, mergedDirectives);
76868
76777
  if (config2?.useSchemaDefinition) {
76869
76778
  const schemaDef = mergedNodes[schemaDefSymbol2] || {
76870
- kind: import_graphql50.Kind.SCHEMA_DEFINITION,
76779
+ kind: import_graphql51.Kind.SCHEMA_DEFINITION,
76871
76780
  operationTypes: []
76872
76781
  };
76873
76782
  const operationTypes = schemaDef.operationTypes;
@@ -76878,9 +76787,9 @@ function mergeGraphQLTypes2(typeSource, config2) {
76878
76787
  const existingPossibleRootType = mergedNodes[possibleRootTypeName];
76879
76788
  if (existingPossibleRootType != null && existingPossibleRootType.name != null) {
76880
76789
  operationTypes.push({
76881
- kind: import_graphql50.Kind.OPERATION_TYPE_DEFINITION,
76790
+ kind: import_graphql51.Kind.OPERATION_TYPE_DEFINITION,
76882
76791
  type: {
76883
- kind: import_graphql50.Kind.NAMED_TYPE,
76792
+ kind: import_graphql51.Kind.NAMED_TYPE,
76884
76793
  name: existingPossibleRootType.name
76885
76794
  },
76886
76795
  operation: opTypeDefNodeType
@@ -76894,15 +76803,15 @@ function mergeGraphQLTypes2(typeSource, config2) {
76894
76803
  }
76895
76804
  if (config2?.forceSchemaDefinition && !mergedNodes[schemaDefSymbol2]?.operationTypes?.length) {
76896
76805
  mergedNodes[schemaDefSymbol2] = {
76897
- kind: import_graphql50.Kind.SCHEMA_DEFINITION,
76806
+ kind: import_graphql51.Kind.SCHEMA_DEFINITION,
76898
76807
  operationTypes: [
76899
76808
  {
76900
- kind: import_graphql50.Kind.OPERATION_TYPE_DEFINITION,
76809
+ kind: import_graphql51.Kind.OPERATION_TYPE_DEFINITION,
76901
76810
  operation: "query",
76902
76811
  type: {
76903
- kind: import_graphql50.Kind.NAMED_TYPE,
76812
+ kind: import_graphql51.Kind.NAMED_TYPE,
76904
76813
  name: {
76905
- kind: import_graphql50.Kind.NAME,
76814
+ kind: import_graphql51.Kind.NAME,
76906
76815
  value: "Query"
76907
76816
  }
76908
76817
  }
@@ -76919,7 +76828,7 @@ function mergeGraphQLTypes2(typeSource, config2) {
76919
76828
  }
76920
76829
 
76921
76830
  // src/codegen/transforms/schema.ts
76922
- var graphql25 = __toESM(require("graphql"), 1);
76831
+ var graphql24 = __toESM(require("graphql"), 1);
76923
76832
  async function graphqlExtensions(config2, documents) {
76924
76833
  let internalSchema = `
76925
76834
  enum CachePolicy {
@@ -77042,7 +76951,7 @@ directive @${config2.componentFieldDirective}(field: String!, prop: String, expo
77042
76951
  const args = fragmentArguments(config2, "", field.parent);
77043
76952
  if (args.length > 0) {
77044
76953
  argString = "(" + args.map((arg) => {
77045
- const typeName = graphql25.print(arg.type);
76954
+ const typeName = graphql24.print(arg.type);
77046
76955
  return `${arg.name}:${typeName}${arg.required ? "!" : ""}`;
77047
76956
  }).join("\n") + ")";
77048
76957
  }
@@ -77052,20 +76961,20 @@ directive @${config2.componentFieldDirective}(field: String!, prop: String, expo
77052
76961
  `;
77053
76962
  }).join("\n");
77054
76963
  extensions += `${Object.keys(config2.configFile.features?.runtimeScalars ?? {}).map((scalar) => `scalar ${scalar}`).join("\n")}`;
77055
- config2.newSchema = graphql25.print(mergeTypeDefs2([internalSchema, config2.newSchema]));
76964
+ config2.newSchema = graphql24.print(mergeTypeDefs2([internalSchema, config2.newSchema]));
77056
76965
  config2.schemaString += extensions;
77057
- config2.schema = graphql25.buildSchema(
77058
- graphql25.print(
77059
- mergeTypeDefs2([graphql25.printSchema(config2.schema), internalSchema, extensions])
76966
+ config2.schema = graphql24.buildSchema(
76967
+ graphql24.print(
76968
+ mergeTypeDefs2([graphql24.printSchema(config2.schema), internalSchema, extensions])
77060
76969
  )
77061
76970
  );
77062
76971
  }
77063
76972
 
77064
76973
  // src/codegen/transforms/typename.ts
77065
- var graphql26 = __toESM(require("graphql"), 1);
76974
+ var graphql25 = __toESM(require("graphql"), 1);
77066
76975
  async function addTypename(config2, documents) {
77067
76976
  for (const doc of documents) {
77068
- doc.document = graphql26.visit(doc.document, {
76977
+ doc.document = graphql25.visit(doc.document, {
77069
76978
  Field(node, key, parent2, path3, ancestors) {
77070
76979
  if (!node.selectionSet) {
77071
76980
  return;
@@ -77077,7 +76986,7 @@ async function addTypename(config2, documents) {
77077
76986
  );
77078
76987
  const field = type.getFields()[node.name.value];
77079
76988
  const fieldType = unwrapType(config2, field.type).type;
77080
- if (graphql26.isInterfaceType(fieldType) || graphql26.isUnionType(fieldType)) {
76989
+ if (graphql25.isInterfaceType(fieldType) || graphql25.isUnionType(fieldType)) {
77081
76990
  return {
77082
76991
  ...node,
77083
76992
  selectionSet: {
@@ -77085,9 +76994,9 @@ async function addTypename(config2, documents) {
77085
76994
  selections: [
77086
76995
  ...node.selectionSet.selections,
77087
76996
  {
77088
- kind: graphql26.Kind.FIELD,
76997
+ kind: graphql25.Kind.FIELD,
77089
76998
  name: {
77090
- kind: graphql26.Kind.NAME,
76999
+ kind: graphql25.Kind.NAME,
77091
77000
  value: "__typename"
77092
77001
  }
77093
77002
  }
@@ -77104,9 +77013,9 @@ async function addTypename(config2, documents) {
77104
77013
  selections: [
77105
77014
  ...node.selectionSet.selections,
77106
77015
  {
77107
- kind: graphql26.Kind.FIELD,
77016
+ kind: graphql25.Kind.FIELD,
77108
77017
  name: {
77109
- kind: graphql26.Kind.NAME,
77018
+ kind: graphql25.Kind.NAME,
77110
77019
  value: "__typename"
77111
77020
  }
77112
77021
  }
@@ -77119,10 +77028,10 @@ async function addTypename(config2, documents) {
77119
77028
  }
77120
77029
 
77121
77030
  // src/codegen/transforms/addID.ts
77122
- var graphql27 = __toESM(require("graphql"), 1);
77031
+ var graphql26 = __toESM(require("graphql"), 1);
77123
77032
  async function addID(config2, documents) {
77124
77033
  for (const doc of documents) {
77125
- doc.document = graphql27.visit(doc.document, {
77034
+ doc.document = graphql26.visit(doc.document, {
77126
77035
  Field(node, key, parent2, path3, ancestors) {
77127
77036
  if (!node.selectionSet) {
77128
77037
  return;
@@ -77160,7 +77069,7 @@ function addKeysToSelection(config2, node, fieldType) {
77160
77069
  if (!node.selectionSet || node.selectionSet.selections.length == 0) {
77161
77070
  return;
77162
77071
  }
77163
- if (!graphql27.isObjectType(fieldType) && !graphql27.isInterfaceType(fieldType)) {
77072
+ if (!graphql26.isObjectType(fieldType) && !graphql26.isInterfaceType(fieldType)) {
77164
77073
  return;
77165
77074
  }
77166
77075
  const keyFields = config2.keyFieldsForType(fieldType.name);
@@ -77175,9 +77084,9 @@ function addKeysToSelection(config2, node, fieldType) {
77175
77084
  continue;
77176
77085
  }
77177
77086
  selections.push({
77178
- kind: graphql27.Kind.FIELD,
77087
+ kind: graphql26.Kind.FIELD,
77179
77088
  name: {
77180
- kind: graphql27.Kind.NAME,
77089
+ kind: graphql26.Kind.NAME,
77181
77090
  value: keyField
77182
77091
  }
77183
77092
  });
@@ -77192,13 +77101,13 @@ function addKeysToSelection(config2, node, fieldType) {
77192
77101
  }
77193
77102
 
77194
77103
  // src/codegen/transforms/componentFields.ts
77195
- var graphql28 = __toESM(require("graphql"), 1);
77104
+ var graphql27 = __toESM(require("graphql"), 1);
77196
77105
  async function componentFields(config2, documents) {
77197
77106
  for (const document of documents) {
77198
- const typeInfo = new graphql28.TypeInfo(config2.schema);
77199
- document.document = graphql28.visit(
77107
+ const typeInfo = new graphql27.TypeInfo(config2.schema);
77108
+ document.document = graphql27.visit(
77200
77109
  document.document,
77201
- graphql28.visitWithTypeInfo(typeInfo, {
77110
+ graphql27.visitWithTypeInfo(typeInfo, {
77202
77111
  Field(node) {
77203
77112
  const parentType = typeInfo.getParentType();
77204
77113
  if (!parentType) {
@@ -77247,10 +77156,10 @@ async function componentFields(config2, documents) {
77247
77156
  }
77248
77157
 
77249
77158
  // src/codegen/transforms/runtimeScalars.ts
77250
- var graphql29 = __toESM(require("graphql"), 1);
77159
+ var graphql28 = __toESM(require("graphql"), 1);
77251
77160
  async function addTypename2(config2, documents) {
77252
77161
  for (const doc of documents) {
77253
- doc.document = graphql29.visit(doc.document, {
77162
+ doc.document = graphql28.visit(doc.document, {
77254
77163
  VariableDefinition(node) {
77255
77164
  const { type, wrappers } = unwrapType(config2, node.type);
77256
77165
  const runtimeScalar = config2.configFile.features?.runtimeScalars?.[type.name];
@@ -77289,7 +77198,7 @@ async function addTypename2(config2, documents) {
77289
77198
  }
77290
77199
 
77291
77200
  // src/codegen/validators/typeCheck.ts
77292
- var graphql30 = __toESM(require("graphql"), 1);
77201
+ var graphql29 = __toESM(require("graphql"), 1);
77293
77202
  async function typeCheck(config2, docs) {
77294
77203
  const errors = [];
77295
77204
  const freeLists = [];
@@ -77297,7 +77206,7 @@ async function typeCheck(config2, docs) {
77297
77206
  const listTypes = [];
77298
77207
  const fragments = {};
77299
77208
  for (const { document: parsed, originalString, filename } of docs) {
77300
- graphql30.visit(parsed, {
77209
+ graphql29.visit(parsed, {
77301
77210
  FragmentDefinition(definition) {
77302
77211
  fragments[definition.name.value] = definition;
77303
77212
  },
@@ -77342,14 +77251,14 @@ async function typeCheck(config2, docs) {
77342
77251
  );
77343
77252
  return;
77344
77253
  }
77345
- if (graphql30.isListType(rootType) || graphql30.isNonNullType(rootType) && graphql30.isListType(rootType.ofType)) {
77254
+ if (graphql29.isListType(rootType) || graphql29.isNonNullType(rootType) && graphql29.isListType(rootType.ofType)) {
77346
77255
  needsParent = true;
77347
77256
  break;
77348
77257
  }
77349
- if (graphql30.isNonNullType(rootType) && "ofType" in rootType) {
77258
+ if (graphql29.isNonNullType(rootType) && "ofType" in rootType) {
77350
77259
  rootType = rootType.ofType;
77351
77260
  }
77352
- if (graphql30.isScalarType(rootType)) {
77261
+ if (graphql29.isScalarType(rootType)) {
77353
77262
  break;
77354
77263
  }
77355
77264
  rootType = rootType?.getFields()[parent3.name.value]?.type;
@@ -77425,9 +77334,9 @@ async function typeCheck(config2, docs) {
77425
77334
  );
77426
77335
  }
77427
77336
  let targetTypes = [type];
77428
- if (graphql30.isUnionType(type)) {
77337
+ if (graphql29.isUnionType(type)) {
77429
77338
  targetTypes = config2.schema.getPossibleTypes(type);
77430
- } else if (graphql30.isInterfaceType(type)) {
77339
+ } else if (graphql29.isInterfaceType(type)) {
77431
77340
  try {
77432
77341
  for (const key of config2.keyFieldsForType(type.name)) {
77433
77342
  if (!type.getFields()[key]) {
@@ -77463,13 +77372,13 @@ async function typeCheck(config2, docs) {
77463
77372
  if (errors.length > 0) {
77464
77373
  throw errors;
77465
77374
  }
77466
- const rules = (filepath) => [...graphql30.specifiedRules].filter(
77375
+ const rules = (filepath) => [...graphql29.specifiedRules].filter(
77467
77376
  (rule) => ![
77468
- graphql30.NoUnusedFragmentsRule,
77469
- graphql30.KnownFragmentNamesRule,
77470
- graphql30.ExecutableDefinitionsRule,
77471
- graphql30.KnownDirectivesRule,
77472
- graphql30.KnownArgumentNamesRule
77377
+ graphql29.NoUnusedFragmentsRule,
77378
+ graphql29.KnownFragmentNamesRule,
77379
+ graphql29.ExecutableDefinitionsRule,
77380
+ graphql29.KnownDirectivesRule,
77381
+ graphql29.KnownArgumentNamesRule
77473
77382
  ].includes(rule)
77474
77383
  ).concat(
77475
77384
  validateLists({
@@ -77490,7 +77399,7 @@ async function typeCheck(config2, docs) {
77490
77399
  validateLoadingDirective(config2)
77491
77400
  );
77492
77401
  for (const { filename, document: parsed, originalString } of docs) {
77493
- for (const error of graphql30.validate(config2.schema, parsed, rules(filename))) {
77402
+ for (const error of graphql29.validate(config2.schema, parsed, rules(filename))) {
77494
77403
  errors.push(
77495
77404
  new HoudiniError({
77496
77405
  filepath: filename,
@@ -77519,20 +77428,20 @@ function validateRequiredDirective(config2, filepath) {
77519
77428
  if (!node.directives?.some(({ name }) => name.value === config2.requiredDirective))
77520
77429
  return;
77521
77430
  const parentType = parentTypeFromAncestors(config2.schema, filepath, ancestors);
77522
- if (!graphql30.isObjectType(parentType)) {
77431
+ if (!graphql29.isObjectType(parentType)) {
77523
77432
  ctx.reportError(
77524
- new graphql30.GraphQLError(
77433
+ new graphql29.GraphQLError(
77525
77434
  `@${config2.requiredDirective} may only be used on objects, not arguments`
77526
77435
  )
77527
77436
  );
77528
77437
  return;
77529
77438
  }
77530
77439
  const type = parentType.getFields()[node.name.value].type;
77531
- const isServerNullable = !graphql30.isNonNullType(type);
77440
+ const isServerNullable = !graphql29.isNonNullType(type);
77532
77441
  const isAlreadyClientNullable = isClientNullable(node, true);
77533
77442
  if (!isServerNullable && !isAlreadyClientNullable) {
77534
77443
  ctx.reportError(
77535
- new graphql30.GraphQLError(
77444
+ new graphql29.GraphQLError(
77536
77445
  `@${config2.requiredDirective} may only be used on nullable fields`
77537
77446
  )
77538
77447
  );
@@ -77554,7 +77463,7 @@ var validateLists = ({
77554
77463
  if (!config2.isListFragment(node.name.value)) {
77555
77464
  if (!fragments[node.name.value]) {
77556
77465
  ctx.reportError(
77557
- new graphql30.GraphQLError(
77466
+ new graphql29.GraphQLError(
77558
77467
  "Encountered unknown fragment: " + node.name.value
77559
77468
  )
77560
77469
  );
@@ -77564,7 +77473,7 @@ var validateLists = ({
77564
77473
  const listName = config2.listNameFromFragment(node.name.value);
77565
77474
  if (!lists.includes(listName)) {
77566
77475
  ctx.reportError(
77567
- new graphql30.GraphQLError(
77476
+ new graphql29.GraphQLError(
77568
77477
  "Encountered fragment referencing unknown list: " + listName
77569
77478
  )
77570
77479
  );
@@ -77589,7 +77498,7 @@ var validateLists = ({
77589
77498
  );
77590
77499
  if (parentArg) {
77591
77500
  ctx.reportError(
77592
- new graphql30.GraphQLError(
77501
+ new graphql29.GraphQLError(
77593
77502
  `@${config2.deprecatedlistDirectiveParentIDArg} should be defined only in it's own directive now`
77594
77503
  )
77595
77504
  );
@@ -77605,7 +77514,7 @@ var validateLists = ({
77605
77514
  return;
77606
77515
  }
77607
77516
  ctx.reportError(
77608
- new graphql30.GraphQLError(
77517
+ new graphql29.GraphQLError(
77609
77518
  `For this list fragment, you need to add or @${config2.listParentDirective} or @${config2.listAllListsDirective} directive to specify the behavior`
77610
77519
  )
77611
77520
  );
@@ -77615,7 +77524,7 @@ var validateLists = ({
77615
77524
  const directiveName = node.name.value;
77616
77525
  if (directiveName === "connection") {
77617
77526
  ctx.reportError(
77618
- new graphql30.GraphQLError(
77527
+ new graphql29.GraphQLError(
77619
77528
  "@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."
77620
77529
  )
77621
77530
  );
@@ -77624,7 +77533,7 @@ var validateLists = ({
77624
77533
  if (!config2.isInternalDirective(node.name.value)) {
77625
77534
  if (!config2.schema.getDirective(directiveName)) {
77626
77535
  ctx.reportError(
77627
- new graphql30.GraphQLError(
77536
+ new graphql29.GraphQLError(
77628
77537
  "Encountered unknown directive: " + directiveName
77629
77538
  )
77630
77539
  );
@@ -77633,7 +77542,7 @@ var validateLists = ({
77633
77542
  }
77634
77543
  if (config2.isListOperationDirective(directiveName) && !listTypes.includes(config2.listNameFromDirective(directiveName))) {
77635
77544
  ctx.reportError(
77636
- new graphql30.GraphQLError(
77545
+ new graphql29.GraphQLError(
77637
77546
  "Encountered directive referencing unknown list: " + directiveName
77638
77547
  )
77639
77548
  );
@@ -77644,7 +77553,7 @@ var validateLists = ({
77644
77553
  };
77645
77554
  function knownArguments(config2) {
77646
77555
  return function(ctx) {
77647
- const nativeValidator = graphql30.KnownArgumentNamesRule(ctx);
77556
+ const nativeValidator = graphql29.KnownArgumentNamesRule(ctx);
77648
77557
  return {
77649
77558
  ...nativeValidator,
77650
77559
  Directive(directiveNode) {
@@ -77679,7 +77588,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
77679
77588
  for (const arg of node.arguments || []) {
77680
77589
  if (arg.value.kind !== "ObjectValue") {
77681
77590
  ctx.reportError(
77682
- new graphql30.GraphQLError("values in @arguments must be an object")
77591
+ new graphql29.GraphQLError("values in @arguments must be an object")
77683
77592
  );
77684
77593
  return;
77685
77594
  }
@@ -77689,13 +77598,13 @@ function validateFragmentArguments(config2, filepath, fragments) {
77689
77598
  );
77690
77599
  if (!typeArg) {
77691
77600
  ctx.reportError(
77692
- new graphql30.GraphQLError("missing type field for @arguments directive")
77601
+ new graphql29.GraphQLError("missing type field for @arguments directive")
77693
77602
  );
77694
77603
  return;
77695
77604
  }
77696
- if (typeArg.value.kind !== graphql30.Kind.STRING) {
77605
+ if (typeArg.value.kind !== graphql29.Kind.STRING) {
77697
77606
  ctx.reportError(
77698
- new graphql30.GraphQLError("type field to @arguments must be a string")
77607
+ new graphql29.GraphQLError("type field to @arguments must be a string")
77699
77608
  );
77700
77609
  return;
77701
77610
  }
@@ -77708,7 +77617,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
77708
77617
  );
77709
77618
  if (typeArg.value.value !== defaultValueType) {
77710
77619
  ctx.reportError(
77711
- new graphql30.GraphQLError(
77620
+ new graphql29.GraphQLError(
77712
77621
  `Invalid default value provided for ${arg.name.value}. Expected ${typeArg.value.value}, found ${defaultValueType}`
77713
77622
  )
77714
77623
  );
@@ -77726,7 +77635,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
77726
77635
  try {
77727
77636
  args = fragmentArguments(config2, filepath, fragments[fragmentName]);
77728
77637
  } catch (e2) {
77729
- ctx.reportError(new graphql30.GraphQLError(e2.message));
77638
+ ctx.reportError(new graphql29.GraphQLError(e2.message));
77730
77639
  return;
77731
77640
  }
77732
77641
  fragmentArguments2[fragmentName] = args;
@@ -77749,7 +77658,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
77749
77658
  );
77750
77659
  if (missing.length > 0) {
77751
77660
  ctx.reportError(
77752
- new graphql30.GraphQLError(
77661
+ new graphql29.GraphQLError(
77753
77662
  `The following arguments are missing from the "${fragmentName}" fragment: ` + JSON.stringify(missing)
77754
77663
  )
77755
77664
  );
@@ -77760,7 +77669,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
77760
77669
  );
77761
77670
  if (unknown.length > 0) {
77762
77671
  ctx.reportError(
77763
- new graphql30.GraphQLError(
77672
+ new graphql29.GraphQLError(
77764
77673
  "Encountered unknown arguments: " + JSON.stringify(unknown)
77765
77674
  )
77766
77675
  );
@@ -77772,7 +77681,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
77772
77681
  for (const [applied, target] of zipped) {
77773
77682
  if (!valueIsType(config2, applied.value, target)) {
77774
77683
  ctx.reportError(
77775
- new graphql30.GraphQLError(
77684
+ new graphql29.GraphQLError(
77776
77685
  `Invalid argument type. Expected ${target}, found ${applied.value.kind}`
77777
77686
  )
77778
77687
  );
@@ -77814,7 +77723,7 @@ function valueIsType(config2, value, targetType) {
77814
77723
  }
77815
77724
  if (value.kind === "EnumValue" && targetType.kind === "NamedType") {
77816
77725
  const enumType = config2.schema.getType(targetType.name.value);
77817
- if (!graphql30.isEnumType(enumType)) {
77726
+ if (!graphql29.isEnumType(enumType)) {
77818
77727
  return false;
77819
77728
  }
77820
77729
  return enumType.getValues().some((enumValue) => enumValue.value === value.value);
@@ -77834,7 +77743,7 @@ function paginateArgs(config2, filepath) {
77834
77743
  }
77835
77744
  if (alreadyPaginated) {
77836
77745
  ctx.reportError(
77837
- new graphql30.GraphQLError(
77746
+ new graphql29.GraphQLError(
77838
77747
  `@${config2.paginateDirective} can only appear in a document once.`
77839
77748
  )
77840
77749
  );
@@ -77866,7 +77775,7 @@ function paginateArgs(config2, filepath) {
77866
77775
  const backwards = appliedArgs.has("last");
77867
77776
  if (!forward && !backwards) {
77868
77777
  ctx.reportError(
77869
- new graphql30.GraphQLError(
77778
+ new graphql29.GraphQLError(
77870
77779
  "A field with cursor-based pagination must have a first or last argument"
77871
77780
  )
77872
77781
  );
@@ -77880,7 +77789,7 @@ function paginateArgs(config2, filepath) {
77880
77789
  }
77881
77790
  if (forward && backwards && paginateMode === "Infinite") {
77882
77791
  ctx.reportError(
77883
- new graphql30.GraphQLError(
77792
+ new graphql29.GraphQLError(
77884
77793
  `A field with cursor pagination cannot go forwards an backwards simultaneously`
77885
77794
  )
77886
77795
  );
@@ -77894,7 +77803,7 @@ function paginateArgs(config2, filepath) {
77894
77803
  );
77895
77804
  if (!appliedLimitArg) {
77896
77805
  ctx.reportError(
77897
- new graphql30.GraphQLError(
77806
+ new graphql29.GraphQLError(
77898
77807
  "A field with offset-based pagination must have a limit argument"
77899
77808
  )
77900
77809
  );
@@ -77910,20 +77819,20 @@ function noUnusedFragmentArguments(config2) {
77910
77819
  const args = /* @__PURE__ */ new Set();
77911
77820
  return {
77912
77821
  enter(node) {
77913
- if (node.kind === graphql30.Kind.FRAGMENT_DEFINITION) {
77822
+ if (node.kind === graphql29.Kind.FRAGMENT_DEFINITION) {
77914
77823
  const definitionArguments = node.directives?.filter((directive) => directive.name.value === config2.argumentsDirective).flatMap((directive) => directive.arguments);
77915
77824
  for (const arg of definitionArguments?.map((arg2) => arg2?.name.value) || []) {
77916
77825
  args.add(arg);
77917
77826
  }
77918
- } else if (node.kind === graphql30.Kind.VARIABLE) {
77827
+ } else if (node.kind === graphql29.Kind.VARIABLE) {
77919
77828
  args.delete(node.name.value);
77920
77829
  }
77921
77830
  },
77922
77831
  leave(node) {
77923
- if (node.kind === graphql30.Kind.FRAGMENT_DEFINITION) {
77832
+ if (node.kind === graphql29.Kind.FRAGMENT_DEFINITION) {
77924
77833
  if (args.size > 0) {
77925
77834
  ctx.reportError(
77926
- new graphql30.GraphQLError(
77835
+ new graphql29.GraphQLError(
77927
77836
  "Encountered unused fragment arguments: " + [...args].join(",")
77928
77837
  )
77929
77838
  );
@@ -77959,7 +77868,7 @@ function nodeDirectives(config2, directives) {
77959
77868
  if (definition.kind === "OperationDefinition") {
77960
77869
  if (definition.operation !== "query") {
77961
77870
  ctx.reportError(
77962
- new graphql30.GraphQLError(
77871
+ new graphql29.GraphQLError(
77963
77872
  `@${node.name.value} must fall on a fragment or query document`
77964
77873
  )
77965
77874
  );
@@ -77971,7 +77880,7 @@ function nodeDirectives(config2, directives) {
77971
77880
  }
77972
77881
  if (!possibleNodes.includes(definitionType)) {
77973
77882
  ctx.reportError(
77974
- new graphql30.GraphQLError(paginateOnNonNodeMessage(node.name.value))
77883
+ new graphql29.GraphQLError(paginateOnNonNodeMessage(node.name.value))
77975
77884
  );
77976
77885
  }
77977
77886
  }
@@ -77990,7 +77899,7 @@ function checkMutationOperation(config2) {
77990
77899
  );
77991
77900
  if (append && prepend) {
77992
77901
  ctx.reportError(
77993
- new graphql30.GraphQLError(
77902
+ new graphql29.GraphQLError(
77994
77903
  `You can't apply both @${config2.listPrependDirective} and @${config2.listAppendDirective} at the same time`
77995
77904
  )
77996
77905
  );
@@ -78004,7 +77913,7 @@ function checkMutationOperation(config2) {
78004
77913
  );
78005
77914
  if (parentId && allLists) {
78006
77915
  ctx.reportError(
78007
- new graphql30.GraphQLError(
77916
+ new graphql29.GraphQLError(
78008
77917
  `You can't apply both @${config2.listParentDirective} and @${config2.listAllListsDirective} at the same time`
78009
77918
  )
78010
77919
  );
@@ -78026,7 +77935,7 @@ function checkMaskDirectives(config2) {
78026
77935
  );
78027
77936
  if (maskEnableDirective && maskDisableDirective) {
78028
77937
  ctx.reportError(
78029
- new graphql30.GraphQLError(
77938
+ new graphql29.GraphQLError(
78030
77939
  `You can't apply both @${config2.maskEnableDirective} and @${config2.maskDisableDirective} at the same time`
78031
77940
  )
78032
77941
  );
@@ -78068,7 +77977,7 @@ function validateLoadingDirective(config2) {
78068
77977
  );
78069
77978
  if (!parentLoading && !global2) {
78070
77979
  ctx.reportError(
78071
- new graphql30.GraphQLError(
77980
+ new graphql29.GraphQLError(
78072
77981
  `@${config2.loadingDirective} can only be applied on a field or fragment spread at the root of a document or on one whose parent also has @${config2.loadingDirective}`
78073
77982
  )
78074
77983
  );
@@ -78090,7 +77999,7 @@ function validateLoadingDirective(config2) {
78090
77999
  );
78091
78000
  if (!parentLoading && !global2) {
78092
78001
  ctx.reportError(
78093
- new graphql30.GraphQLError(
78002
+ new graphql29.GraphQLError(
78094
78003
  `@${config2.loadingDirective} can only be applied on a field or fragment spread at the root of a document or on one whose parent also has @${config2.loadingDirective}`
78095
78004
  )
78096
78005
  );
@@ -78105,7 +78014,7 @@ function getAndVerifyNodeInterface(config2) {
78105
78014
  if (!nodeInterface) {
78106
78015
  return null;
78107
78016
  }
78108
- if (!graphql30.isInterfaceType(nodeInterface)) {
78017
+ if (!graphql29.isInterfaceType(nodeInterface)) {
78109
78018
  displayInvalidNodeFieldMessage(config2);
78110
78019
  return null;
78111
78020
  }
@@ -78200,11 +78109,11 @@ async function uniqueDocumentNames(config2, docs) {
78200
78109
  }
78201
78110
 
78202
78111
  // src/codegen/validators/noIDAlias.ts
78203
- var graphql31 = __toESM(require("graphql"), 1);
78112
+ var graphql30 = __toESM(require("graphql"), 1);
78204
78113
  async function noIDAlias(config2, docs) {
78205
78114
  const errors = [];
78206
78115
  for (const { filename, document } of docs) {
78207
- graphql31.visit(document, {
78116
+ graphql30.visit(document, {
78208
78117
  Field(node, _, __, ___, ancestors) {
78209
78118
  const fieldType = parentTypeFromAncestors(config2.schema, filename, ancestors).name;
78210
78119
  if (config2.keyFieldsForType(fieldType).includes(node.alias?.value || "")) {
@@ -78243,11 +78152,11 @@ async function validatePlugins(config2, documents) {
78243
78152
  }
78244
78153
 
78245
78154
  // src/codegen/validators/componentFields.ts
78246
- var graphql32 = __toESM(require("graphql"), 1);
78155
+ var graphql31 = __toESM(require("graphql"), 1);
78247
78156
  async function componentFields2(config2, docs) {
78248
78157
  const errors = [];
78249
78158
  for (const { filename: filepath, document } of docs) {
78250
- graphql32.visit(document, {
78159
+ graphql31.visit(document, {
78251
78160
  FragmentDefinition(node, _, __, ___, ancestors) {
78252
78161
  const componentFieldDirective = node.directives?.find(
78253
78162
  (dir) => dir.name.value === config2.componentFieldDirective
@@ -78295,7 +78204,7 @@ async function componentFields2(config2, docs) {
78295
78204
  if (existingField && existingField.filepath !== filepath) {
78296
78205
  conflict = true;
78297
78206
  } else if (parentType && fieldValue) {
78298
- const fieldDef = graphql32.isObjectType(parentType) && parentType.getFields()[fieldValue];
78207
+ const fieldDef = graphql31.isObjectType(parentType) && parentType.getFields()[fieldValue];
78299
78208
  if (fieldDef && !fieldDef.astNode?.directives?.find(
78300
78209
  (dir) => dir.name.value === config2.componentFieldDirective
78301
78210
  )) {
@@ -78308,7 +78217,7 @@ async function componentFields2(config2, docs) {
78308
78217
  filepath
78309
78218
  });
78310
78219
  }
78311
- if (parentType && graphql32.isAbstractType(parentType)) {
78220
+ if (parentType && graphql31.isAbstractType(parentType)) {
78312
78221
  errors.push({
78313
78222
  message: `Cannot add component field ${parent2}.${fieldValue} because ${parent2} is an abstract type`,
78314
78223
  filepath
@@ -78529,12 +78438,12 @@ async function processJSFile(config2, contents) {
78529
78438
  return documents;
78530
78439
  }
78531
78440
  async function processGraphQLDocument(config2, filepath, document) {
78532
- const parsedDoc = graphql33.parse(document);
78441
+ const parsedDoc = graphql32.parse(document);
78533
78442
  const operations = parsedDoc.definitions.filter(
78534
- ({ kind: kind2 }) => kind2 === graphql33.Kind.OPERATION_DEFINITION
78443
+ ({ kind: kind2 }) => kind2 === graphql32.Kind.OPERATION_DEFINITION
78535
78444
  );
78536
78445
  const fragments = parsedDoc.definitions.filter(
78537
- ({ kind: kind2 }) => kind2 === graphql33.Kind.FRAGMENT_DEFINITION
78446
+ ({ kind: kind2 }) => kind2 === graphql32.Kind.FRAGMENT_DEFINITION
78538
78447
  );
78539
78448
  if (operations.length > 1) {
78540
78449
  throw new HoudiniError({