houdini 1.2.44 → 1.2.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/build/cmd-cjs/index.js +664 -848
  2. package/build/cmd-esm/index.js +514 -698
  3. package/build/codegen/generators/comments/jsdoc.d.ts +2 -0
  4. package/build/codegen-cjs/index.js +662 -846
  5. package/build/codegen-esm/index.js +512 -696
  6. package/build/lib/graphql.d.ts +1 -1
  7. package/build/lib/index.d.ts +1 -0
  8. package/build/lib/typescript.d.ts +19 -0
  9. package/build/lib-cjs/index.js +726 -467
  10. package/build/lib-esm/index.js +720 -467
  11. package/build/runtime/client/index.d.ts +7 -1
  12. package/build/runtime/client/plugins/fragment.d.ts +2 -2
  13. package/build/runtime/client/plugins/mutation.d.ts +2 -1
  14. package/build/runtime/client/plugins/query.d.ts +2 -2
  15. package/build/runtime/lib/scalars.d.ts +1 -1
  16. package/build/runtime/lib/types.d.ts +13 -2
  17. package/build/runtime/router/match.d.ts +3 -2
  18. package/build/runtime/router/types.d.ts +3 -1
  19. package/build/runtime-cjs/client/index.d.ts +7 -1
  20. package/build/runtime-cjs/client/index.js +26 -11
  21. package/build/runtime-cjs/client/plugins/fragment.d.ts +2 -2
  22. package/build/runtime-cjs/client/plugins/fragment.js +4 -11
  23. package/build/runtime-cjs/client/plugins/mutation.d.ts +2 -1
  24. package/build/runtime-cjs/client/plugins/mutation.js +8 -15
  25. package/build/runtime-cjs/client/plugins/query.d.ts +2 -2
  26. package/build/runtime-cjs/client/plugins/query.js +4 -11
  27. package/build/runtime-cjs/lib/scalars.d.ts +1 -1
  28. package/build/runtime-cjs/lib/scalars.js +4 -0
  29. package/build/runtime-cjs/lib/types.d.ts +13 -2
  30. package/build/runtime-cjs/router/match.d.ts +3 -2
  31. package/build/runtime-cjs/router/match.js +11 -2
  32. package/build/runtime-cjs/router/server.js +1 -1
  33. package/build/runtime-cjs/router/types.d.ts +3 -1
  34. package/build/runtime-esm/client/index.d.ts +7 -1
  35. package/build/runtime-esm/client/index.js +26 -11
  36. package/build/runtime-esm/client/plugins/fragment.d.ts +2 -2
  37. package/build/runtime-esm/client/plugins/fragment.js +1 -2
  38. package/build/runtime-esm/client/plugins/mutation.d.ts +2 -1
  39. package/build/runtime-esm/client/plugins/mutation.js +1 -2
  40. package/build/runtime-esm/client/plugins/query.d.ts +2 -2
  41. package/build/runtime-esm/client/plugins/query.js +1 -2
  42. package/build/runtime-esm/lib/scalars.d.ts +1 -1
  43. package/build/runtime-esm/lib/scalars.js +6 -0
  44. package/build/runtime-esm/lib/types.d.ts +13 -2
  45. package/build/runtime-esm/router/match.d.ts +3 -2
  46. package/build/runtime-esm/router/match.js +11 -2
  47. package/build/runtime-esm/router/server.js +1 -1
  48. package/build/runtime-esm/router/types.d.ts +3 -1
  49. package/build/test-cjs/index.js +677 -844
  50. package/build/test-esm/index.js +527 -694
  51. package/build/vite-cjs/index.js +786 -857
  52. package/build/vite-esm/index.js +636 -707
  53. package/package.json +1 -1
  54. package/build/codegen/generators/typescript/typeReference.d.ts +0 -8
  55. package/build/codegen/generators/typescript/types.d.ts +0 -10
@@ -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);
@@ -69717,7 +69480,12 @@ function deepMerge2(filepath, ...targets) {
69717
69480
  // src/lib/parse.ts
69718
69481
  function parseJS(str, config2) {
69719
69482
  const defaultConfig = {
69720
- plugins: ["typescript", "importAssertions", "decorators-legacy"],
69483
+ plugins: [
69484
+ "typescript",
69485
+ "importAssertions",
69486
+ "decorators-legacy",
69487
+ "explicitResourceManagement"
69488
+ ],
69721
69489
  sourceType: "module"
69722
69490
  };
69723
69491
  return (0, import_parser.parse)(str || "", config2 ? deepMerge2("", defaultConfig, config2) : defaultConfig).program;
@@ -69789,6 +69557,231 @@ async function cleanupFiles(pathFolder, listOfObj) {
69789
69557
  return allFilesNotInList;
69790
69558
  }
69791
69559
 
69560
+ // src/runtime/router/match.ts
69561
+ var param_pattern = /^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;
69562
+ function parse_page_pattern(id) {
69563
+ const params = [];
69564
+ const pattern = id === "/" ? /^\/$/ : new RegExp(
69565
+ `^${get_route_segments(id).map((segment) => {
69566
+ const rest_match = /^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(segment);
69567
+ if (rest_match) {
69568
+ params.push({
69569
+ name: rest_match[1],
69570
+ matcher: rest_match[2],
69571
+ optional: false,
69572
+ rest: true,
69573
+ chained: true
69574
+ });
69575
+ return "(?:/(.*))?";
69576
+ }
69577
+ const optional_match = /^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(segment);
69578
+ if (optional_match) {
69579
+ params.push({
69580
+ name: optional_match[1],
69581
+ matcher: optional_match[2],
69582
+ optional: true,
69583
+ rest: false,
69584
+ chained: true
69585
+ });
69586
+ return "(?:/([^/]+))?";
69587
+ }
69588
+ if (!segment) {
69589
+ return;
69590
+ }
69591
+ const parts = segment.split(/\[(.+?)\](?!\])/);
69592
+ const result = parts.map((content, i2) => {
69593
+ if (i2 % 2) {
69594
+ if (content.startsWith("x+")) {
69595
+ return escape2(
69596
+ String.fromCharCode(parseInt(content.slice(2), 16))
69597
+ );
69598
+ }
69599
+ if (content.startsWith("u+")) {
69600
+ return escape2(
69601
+ String.fromCharCode(
69602
+ ...content.slice(2).split("-").map((code) => parseInt(code, 16))
69603
+ )
69604
+ );
69605
+ }
69606
+ const match = param_pattern.exec(content);
69607
+ if (!match) {
69608
+ throw new Error(
69609
+ `Invalid param: ${content}. Params and matcher names can only have underscores and alphanumeric characters.`
69610
+ );
69611
+ }
69612
+ const [, is_optional, is_rest, name, matcher] = match;
69613
+ params.push({
69614
+ name,
69615
+ matcher,
69616
+ optional: !!is_optional,
69617
+ rest: !!is_rest,
69618
+ chained: is_rest ? i2 === 1 && parts[0] === "" : false
69619
+ });
69620
+ return is_rest ? "(.*?)" : is_optional ? "([^/]*)?" : "([^/]+?)";
69621
+ }
69622
+ return escape2(content);
69623
+ }).join("");
69624
+ return "/" + result;
69625
+ }).join("")}/?$`
69626
+ );
69627
+ return { pattern, params, page_id: id };
69628
+ }
69629
+ function affects_path(segment) {
69630
+ return !/^\([^)]+\)$/.test(segment);
69631
+ }
69632
+ function get_route_segments(route) {
69633
+ return route.slice(1).split("/").filter(affects_path);
69634
+ }
69635
+ function escape2(str) {
69636
+ return str.normalize().replace(/[[\]]/g, "\\$&").replace(/%/g, "%25").replace(/\//g, "%2[Ff]").replace(/\?/g, "%3[Ff]").replace(/#/g, "%23").replace(/[.*+?^${}()|\\]/g, "\\$&");
69637
+ }
69638
+
69639
+ // src/lib/typescript.ts
69640
+ var graphql4 = __toESM(require("graphql"), 1);
69641
+ var recast2 = __toESM(require_main2(), 1);
69642
+ var AST2 = recast2.types.builders;
69643
+ function unwrappedTsTypeReference(config2, filepath, missingScalars, {
69644
+ type,
69645
+ wrappers
69646
+ }, body) {
69647
+ let result;
69648
+ if (graphql4.isScalarType(type)) {
69649
+ result = scalarPropertyValue(config2, filepath, missingScalars, type, body, null);
69650
+ } else if (graphql4.isEnumType(type)) {
69651
+ result = enumReference(config2, body, type.name);
69652
+ } else {
69653
+ result = AST2.tsTypeReference(AST2.identifier(type.name));
69654
+ }
69655
+ for (const toWrap of wrappers) {
69656
+ if (toWrap === "NonNull" /* NonNull */) {
69657
+ continue;
69658
+ } else if (toWrap === "Nullable" /* Nullable */) {
69659
+ result = nullableField(result, true);
69660
+ } else if (toWrap === "List" /* List */) {
69661
+ result = AST2.tsArrayType(AST2.tsParenthesizedType(result));
69662
+ }
69663
+ }
69664
+ return result;
69665
+ }
69666
+ function tsTypeReference(config2, filepath, missingScalars, definition, body) {
69667
+ const { type, wrappers } = unwrapType(config2, definition.type);
69668
+ return unwrappedTsTypeReference(
69669
+ config2,
69670
+ filepath,
69671
+ missingScalars,
69672
+ { type, wrappers },
69673
+ body
69674
+ );
69675
+ }
69676
+ function enumReference(config2, body, name) {
69677
+ ensureImports({
69678
+ config: config2,
69679
+ body,
69680
+ import: ["ValueOf"],
69681
+ importKind: "type",
69682
+ sourceModule: "$houdini/runtime/lib/types"
69683
+ });
69684
+ return AST2.tsTypeReference(
69685
+ AST2.identifier("ValueOf"),
69686
+ AST2.tsTypeParameterInstantiation([AST2.tsTypeQuery(AST2.identifier(name))])
69687
+ );
69688
+ }
69689
+ function readonlyProperty(prop, enable = true) {
69690
+ if (enable) {
69691
+ prop.readonly = true;
69692
+ }
69693
+ return prop;
69694
+ }
69695
+ function nullableField(inner, input = false) {
69696
+ const members = [inner, AST2.tsNullKeyword()];
69697
+ if (input) {
69698
+ members.push(AST2.tsUndefinedKeyword());
69699
+ }
69700
+ return AST2.tsUnionType(members);
69701
+ }
69702
+ function scalarPropertyValue(config2, filepath, missingScalars, target, body, field) {
69703
+ if (config2.configFile.features?.componentFields && target.name === config2.componentScalar) {
69704
+ if (!field) {
69705
+ return AST2.tsNeverKeyword();
69706
+ }
69707
+ const component = config2.componentFields[field.parent][field.field];
69708
+ const sourcePathRelative = path_exports.relative(
69709
+ path_exports.join(config2.projectRoot, "src"),
69710
+ component.filepath
69711
+ );
69712
+ let sourcePathParsed = path_exports.parse(sourcePathRelative);
69713
+ let sourcePath = path_exports.join(sourcePathParsed.dir, sourcePathParsed.name);
69714
+ const localImport = ensureImports({
69715
+ config: config2,
69716
+ body,
69717
+ import: "__component__" + component.fragment,
69718
+ sourceModule: path_exports.join(
69719
+ path_exports.relative(path_exports.dirname(filepath), config2.projectRoot),
69720
+ "src",
69721
+ sourcePath
69722
+ )
69723
+ }) ?? "__component__" + component.fragment;
69724
+ const parameters = AST2.tsTypeReference(AST2.identifier("Parameters"));
69725
+ parameters.typeParameters = AST2.tsTypeParameterInstantiation([
69726
+ AST2.tsTypeQuery(AST2.identifier(localImport))
69727
+ ]);
69728
+ const indexed = AST2.tsIndexedAccessType(
69729
+ parameters,
69730
+ AST2.tsLiteralType(AST2.numericLiteral(0))
69731
+ );
69732
+ const omit = AST2.tsTypeReference(AST2.identifier("Omit"));
69733
+ omit.typeParameters = AST2.tsTypeParameterInstantiation([
69734
+ indexed,
69735
+ AST2.tsLiteralType(AST2.stringLiteral(component.prop))
69736
+ ]);
69737
+ const arg = AST2.identifier("props");
69738
+ arg.typeAnnotation = AST2.tsTypeAnnotation(omit);
69739
+ const returnType = AST2.tsTypeReference(AST2.identifier("ReturnType"));
69740
+ returnType.typeParameters = AST2.tsTypeParameterInstantiation([
69741
+ AST2.tsTypeQuery(AST2.identifier(localImport))
69742
+ ]);
69743
+ const fnType = AST2.tsFunctionType([arg]);
69744
+ fnType.typeAnnotation = AST2.tsTypeAnnotation(returnType);
69745
+ return fnType;
69746
+ }
69747
+ switch (target.name) {
69748
+ case "String": {
69749
+ return AST2.tsStringKeyword();
69750
+ }
69751
+ case "Int": {
69752
+ return AST2.tsNumberKeyword();
69753
+ }
69754
+ case "Float": {
69755
+ return AST2.tsNumberKeyword();
69756
+ }
69757
+ case "Boolean": {
69758
+ return AST2.tsBooleanKeyword();
69759
+ }
69760
+ case "ID": {
69761
+ return AST2.tsStringKeyword();
69762
+ }
69763
+ default: {
69764
+ if (graphql4.isNonNullType(target) && "ofType" in target) {
69765
+ return scalarPropertyValue(
69766
+ config2,
69767
+ filepath,
69768
+ missingScalars,
69769
+ target.ofType,
69770
+ body,
69771
+ field
69772
+ );
69773
+ }
69774
+ if (config2.scalars?.[target.name]) {
69775
+ return AST2.tsTypeReference(AST2.identifier(config2.scalars?.[target.name].type));
69776
+ }
69777
+ if (target.name !== config2.componentScalar) {
69778
+ missingScalars.add(target.name);
69779
+ }
69780
+ return AST2.tsAnyKeyword();
69781
+ }
69782
+ }
69783
+ }
69784
+
69792
69785
  // ../../node_modules/.pnpm/estree-walker@3.0.1/node_modules/estree-walker/src/walker.js
69793
69786
  var WalkerBase = class {
69794
69787
  constructor() {
@@ -69902,7 +69895,7 @@ async function asyncWalk(ast, { enter, leave }) {
69902
69895
  }
69903
69896
 
69904
69897
  // src/lib/walk.ts
69905
- var graphql4 = __toESM(require("graphql"), 1);
69898
+ var graphql5 = __toESM(require("graphql"), 1);
69906
69899
  async function find_graphql(config2, parsedScript, walker) {
69907
69900
  await asyncWalk(parsedScript, {
69908
69901
  async enter(node, parent2) {
@@ -69957,7 +69950,7 @@ async function find_graphql(config2, parsedScript, walker) {
69957
69950
  } else if (!documentString) {
69958
69951
  return;
69959
69952
  }
69960
- const parsedTag = graphql4.parse(documentString);
69953
+ const parsedTag = graphql5.parse(documentString);
69961
69954
  if (walker.where && !walker.where(parsedTag, { node, parent: parent2 })) {
69962
69955
  return;
69963
69956
  }
@@ -70089,7 +70082,7 @@ function extractAnonymousQuery(config2, raw, expr, propName) {
70089
70082
  };
70090
70083
  return defs.concat([
70091
70084
  {
70092
- raw: graphql4.print(parsed),
70085
+ raw: graphql5.print(parsed),
70093
70086
  parsed
70094
70087
  }
70095
70088
  ]);
@@ -70230,7 +70223,7 @@ function serialized_manifest_path(config2, base = base_dir(config2)) {
70230
70223
 
70231
70224
  // src/lib/router/manifest.ts
70232
70225
  var t2 = __toESM(require_lib6(), 1);
70233
- var graphql5 = __toESM(require("graphql"), 1);
70226
+ var graphql6 = __toESM(require("graphql"), 1);
70234
70227
  async function load_manifest(args) {
70235
70228
  const manifest = await walk_routes({
70236
70229
  config: args.config,
@@ -70247,7 +70240,8 @@ async function load_manifest(args) {
70247
70240
  local_yoga: false
70248
70241
  },
70249
70242
  queries: [],
70250
- layouts: []
70243
+ layouts: [],
70244
+ variables: {}
70251
70245
  });
70252
70246
  if (args.includeArtifacts) {
70253
70247
  try {
@@ -70278,6 +70272,7 @@ async function walk_routes(args) {
70278
70272
  const directory_contents = await fs_exports.readdir(args.filepath, {
70279
70273
  withFileTypes: true
70280
70274
  });
70275
+ const variables = { ...args.variables };
70281
70276
  let newLayouts = args.layouts;
70282
70277
  let newLayoutQueries = args.queries;
70283
70278
  let layout = null;
@@ -70301,7 +70296,8 @@ async function walk_routes(args) {
70301
70296
  url: args.url,
70302
70297
  project: args.project,
70303
70298
  type: "layout",
70304
- contents: layoutQueryContents
70299
+ contents: layoutQueryContents,
70300
+ variables
70305
70301
  });
70306
70302
  newLayoutQueries = [...args.queries, layoutQuery.name];
70307
70303
  }
@@ -70314,7 +70310,8 @@ async function walk_routes(args) {
70314
70310
  contents: layoutViewContents,
70315
70311
  layouts: args.layouts,
70316
70312
  queries: newLayoutQueries,
70317
- config: args.config
70313
+ config: args.config,
70314
+ variables
70318
70315
  });
70319
70316
  newLayouts = [...args.layouts, page_id(layout.url)];
70320
70317
  }
@@ -70325,7 +70322,8 @@ async function walk_routes(args) {
70325
70322
  url: args.url,
70326
70323
  project: args.project,
70327
70324
  type: "page",
70328
- contents: pageQueryContents
70325
+ contents: pageQueryContents,
70326
+ variables
70329
70327
  });
70330
70328
  }
70331
70329
  if (pageViewContents) {
@@ -70337,7 +70335,8 @@ async function walk_routes(args) {
70337
70335
  contents: pageViewContents,
70338
70336
  layouts: newLayouts,
70339
70337
  queries: pageQuery ? [...newLayoutQueries, pageQuery.name] : newLayoutQueries,
70340
- config: args.config
70338
+ config: args.config,
70339
+ variables
70341
70340
  });
70342
70341
  }
70343
70342
  await Promise.all(
@@ -70350,7 +70349,8 @@ async function walk_routes(args) {
70350
70349
  filepath: path_exports.join(args.filepath, dir.name),
70351
70350
  url: `${args.url}${dir.name}/`,
70352
70351
  queries: newLayoutQueries,
70353
- layouts: newLayouts
70352
+ layouts: newLayouts,
70353
+ variables
70354
70354
  });
70355
70355
  })
70356
70356
  );
@@ -70372,12 +70372,18 @@ async function add_view(args) {
70372
70372
  url: args.url,
70373
70373
  layouts: args.layouts,
70374
70374
  path: path_exports.relative(args.config.projectRoot, args.path),
70375
- query_options: args.queries
70375
+ query_options: args.queries,
70376
+ params: Object.fromEntries(
70377
+ parse_page_pattern(args.url).params.map((param) => [
70378
+ param.name,
70379
+ args.variables[param.name] ?? null
70380
+ ])
70381
+ )
70376
70382
  };
70377
70383
  return target[id];
70378
70384
  }
70379
70385
  async function add_query(args) {
70380
- const parsed = graphql5.parse(args.contents);
70386
+ const parsed = graphql6.parse(args.contents);
70381
70387
  const query2 = parsed.definitions.find(
70382
70388
  (def) => def.kind === "OperationDefinition" && def.operation === "query"
70383
70389
  );
@@ -70385,20 +70391,30 @@ async function add_query(args) {
70385
70391
  throw new Error("No query found");
70386
70392
  }
70387
70393
  let loading = false;
70388
- await graphql5.visit(parsed, {
70394
+ await graphql6.visit(parsed, {
70389
70395
  Directive(node) {
70390
70396
  if (node.name.value === args.config.loadingDirective) {
70391
70397
  loading = true;
70392
70398
  }
70393
70399
  }
70394
70400
  });
70401
+ const queryVariables = Object.fromEntries(
70402
+ query2.variableDefinitions?.map((variable) => {
70403
+ const { type, wrappers } = unwrapType(args.config, variable.type, [], true);
70404
+ return [
70405
+ variable.variable.name.value,
70406
+ { wrappers, type: type.name }
70407
+ ];
70408
+ }) ?? []
70409
+ );
70410
+ Object.assign(args.variables, queryVariables);
70395
70411
  const target = args.type === "page" ? args.project.page_queries : args.project.layout_queries;
70396
70412
  target[page_id(args.url)] = {
70397
70413
  path: path_exports.relative(args.config.routesDir, args.path),
70398
70414
  name: query2.name.value,
70399
70415
  url: args.url,
70400
70416
  loading,
70401
- variables: query2.variableDefinitions?.map((variable) => variable.variable.name.value) ?? []
70417
+ variables: queryVariables
70402
70418
  };
70403
70419
  return target[page_id(args.url)];
70404
70420
  }
@@ -70452,7 +70468,18 @@ async function extractQueries(source) {
70452
70468
  } else {
70453
70469
  return [];
70454
70470
  }
70455
- return props.filter((p) => p !== "children");
70471
+ return props.reduce((queries, query2) => {
70472
+ if (query2 === "children") {
70473
+ return queries;
70474
+ }
70475
+ if (query2.endsWith("$handle")) {
70476
+ query2 = query2.substring(0, query2.length - "$handle".length);
70477
+ }
70478
+ if (queries.includes(query2)) {
70479
+ return queries;
70480
+ }
70481
+ return queries.concat([query2]);
70482
+ }, []);
70456
70483
  }
70457
70484
 
70458
70485
  // src/lib/router/server.ts
@@ -70494,8 +70521,8 @@ async function loadLocalSchema(config2) {
70494
70521
  }
70495
70522
 
70496
70523
  // src/codegen/generators/artifacts/index.ts
70497
- var graphql16 = __toESM(require("graphql"), 1);
70498
- var recast4 = __toESM(require_main2(), 1);
70524
+ var graphql17 = __toESM(require("graphql"), 1);
70525
+ var recast5 = __toESM(require_main2(), 1);
70499
70526
 
70500
70527
  // src/codegen/utils/commonjs.ts
70501
70528
  var cjsIndexFilePreamble = `"use strict";
@@ -70737,19 +70764,19 @@ var FieldCollection = class {
70737
70764
  };
70738
70765
 
70739
70766
  // src/codegen/utils/moduleExport.ts
70740
- var recast2 = __toESM(require_main2(), 1);
70741
- var AST2 = recast2.types.builders;
70767
+ var recast3 = __toESM(require_main2(), 1);
70768
+ var AST3 = recast3.types.builders;
70742
70769
  function moduleExport(config2, key, value) {
70743
70770
  if (config2.module === "commonjs") {
70744
- let target = AST2.memberExpression(AST2.identifier("module"), AST2.identifier("exports"));
70771
+ let target = AST3.memberExpression(AST3.identifier("module"), AST3.identifier("exports"));
70745
70772
  if (key !== "default") {
70746
- target = AST2.memberExpression(target, AST2.identifier(key));
70773
+ target = AST3.memberExpression(target, AST3.identifier(key));
70747
70774
  }
70748
- return AST2.expressionStatement(AST2.assignmentExpression("=", target, value));
70775
+ return AST3.expressionStatement(AST3.assignmentExpression("=", target, value));
70749
70776
  }
70750
- return key === "default" ? AST2.exportDefaultDeclaration(value) : AST2.exportNamedDeclaration(
70751
- AST2.variableDeclaration("const", [
70752
- AST2.variableDeclarator(AST2.identifier(key), value)
70777
+ return key === "default" ? AST3.exportDefaultDeclaration(value) : AST3.exportNamedDeclaration(
70778
+ AST3.variableDeclaration("const", [
70779
+ AST3.variableDeclarator(AST3.identifier(key), value)
70753
70780
  ])
70754
70781
  );
70755
70782
  }
@@ -71006,7 +71033,7 @@ var serialize = (value, { json, lossy } = {}) => {
71006
71033
  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
71034
 
71008
71035
  // src/codegen/transforms/fragmentVariables.ts
71009
- var graphql7 = __toESM(require("graphql"), 1);
71036
+ var graphql8 = __toESM(require("graphql"), 1);
71010
71037
 
71011
71038
  // src/codegen/utils/stripLoc.ts
71012
71039
  function stripLoc(value) {
@@ -71027,13 +71054,13 @@ function stripLoc(value) {
71027
71054
  }
71028
71055
 
71029
71056
  // src/codegen/transforms/collectDefinitions.ts
71030
- var graphql6 = __toESM(require("graphql"), 1);
71031
- var import_graphql31 = require("graphql");
71057
+ var graphql7 = __toESM(require("graphql"), 1);
71058
+ var import_graphql32 = require("graphql");
71032
71059
  async function includeFragmentDefinitions(config2, documents) {
71033
71060
  const fragments = collectDefinitions(config2, documents);
71034
71061
  for (const [index, { name, document, filename }] of documents.entries()) {
71035
71062
  const operation = document.definitions.find(
71036
- (def) => def.kind === import_graphql31.Kind.OPERATION_DEFINITION || def.kind === "FragmentDefinition"
71063
+ (def) => def.kind === import_graphql32.Kind.OPERATION_DEFINITION || def.kind === "FragmentDefinition"
71037
71064
  );
71038
71065
  if (!operation) {
71039
71066
  continue;
@@ -71077,10 +71104,10 @@ function collectDefinitions(config2, docs) {
71077
71104
  }
71078
71105
  function findRequiredFragments(config2, definition) {
71079
71106
  const referencedFragments = [];
71080
- const typeInfo = new graphql6.TypeInfo(config2.schema);
71081
- definition.selectionSet = graphql6.visit(
71107
+ const typeInfo = new graphql7.TypeInfo(config2.schema);
71108
+ definition.selectionSet = graphql7.visit(
71082
71109
  definition,
71083
- graphql6.visitWithTypeInfo(typeInfo, {
71110
+ graphql7.visitWithTypeInfo(typeInfo, {
71084
71111
  FragmentSpread(node) {
71085
71112
  referencedFragments.push(node.name.value);
71086
71113
  }
@@ -71114,7 +71141,7 @@ function flattenFragments(filepath, operation, fragments) {
71114
71141
  }
71115
71142
 
71116
71143
  // src/codegen/transforms/fragmentVariables.ts
71117
- var GraphqlKinds2 = graphql7.Kind;
71144
+ var GraphqlKinds2 = graphql8.Kind;
71118
71145
  async function fragmentVariables(config2, documents) {
71119
71146
  const fragments = collectDefinitions(config2, documents);
71120
71147
  const generatedFragments = {};
@@ -71137,7 +71164,7 @@ async function fragmentVariables(config2, documents) {
71137
71164
  });
71138
71165
  }
71139
71166
  const doc = {
71140
- kind: graphql7.Kind.DOCUMENT,
71167
+ kind: graphql8.Kind.DOCUMENT,
71141
71168
  definitions: Object.values(generatedFragments)
71142
71169
  };
71143
71170
  documents.push({
@@ -71208,7 +71235,7 @@ function inlineFragmentArgs({
71208
71235
  return null;
71209
71236
  };
71210
71237
  const result = esm_default(
71211
- graphql7.visit(document, {
71238
+ graphql8.visit(document, {
71212
71239
  FragmentSpread(node) {
71213
71240
  if (!fragmentDefinitions[node.name.value]) {
71214
71241
  throw new Error("Could not find definition for fragment" + node.name.value);
@@ -71294,7 +71321,7 @@ function inlineFragmentArgs({
71294
71321
  );
71295
71322
  if (newName) {
71296
71323
  result.name = {
71297
- kind: graphql7.Kind.NAME,
71324
+ kind: graphql8.Kind.NAME,
71298
71325
  value: newName
71299
71326
  };
71300
71327
  }
@@ -71461,7 +71488,7 @@ ${exportDefaultFrom(`./${doc.name}`, doc.name)}`,
71461
71488
  }
71462
71489
 
71463
71490
  // src/codegen/generators/artifacts/inputs.ts
71464
- var graphql8 = __toESM(require("graphql"), 1);
71491
+ var graphql9 = __toESM(require("graphql"), 1);
71465
71492
  function inputObject(config2, inputs, runtimeScalars) {
71466
71493
  const visitedTypes = /* @__PURE__ */ new Set();
71467
71494
  const inputObj = {
@@ -71491,10 +71518,10 @@ function walkInputs(config2, visitedTypes, inputObj, rootType) {
71491
71518
  if (visitedTypes.has(type.name)) {
71492
71519
  return;
71493
71520
  }
71494
- if (graphql8.isEnumType(type) || graphql8.isScalarType(type)) {
71521
+ if (graphql9.isEnumType(type) || graphql9.isScalarType(type)) {
71495
71522
  return;
71496
71523
  }
71497
- if (graphql8.isUnionType(type)) {
71524
+ if (graphql9.isUnionType(type)) {
71498
71525
  return;
71499
71526
  }
71500
71527
  visitedTypes.add(type.name);
@@ -71512,50 +71539,50 @@ function walkInputs(config2, visitedTypes, inputObj, rootType) {
71512
71539
  }
71513
71540
 
71514
71541
  // src/codegen/generators/artifacts/operations.ts
71515
- var graphql10 = __toESM(require("graphql"), 1);
71542
+ var graphql11 = __toESM(require("graphql"), 1);
71516
71543
 
71517
71544
  // 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;
71545
+ var graphql10 = __toESM(require("graphql"), 1);
71546
+ var recast4 = __toESM(require_main2(), 1);
71547
+ var AST4 = recast4.types.builders;
71521
71548
  function serializeValue(value) {
71522
71549
  if (Array.isArray(value)) {
71523
- return AST3.arrayExpression(value.map(serializeValue));
71550
+ return AST4.arrayExpression(value.map(serializeValue));
71524
71551
  }
71525
71552
  if (typeof value === "object" && value !== null) {
71526
- return AST3.objectExpression(
71553
+ return AST4.objectExpression(
71527
71554
  Object.entries(value).filter(([key, value2]) => typeof value2 !== "undefined").map(([key, val]) => {
71528
- return AST3.objectProperty(AST3.stringLiteral(key), serializeValue(val));
71555
+ return AST4.objectProperty(AST4.stringLiteral(key), serializeValue(val));
71529
71556
  })
71530
71557
  );
71531
71558
  }
71532
71559
  if (typeof value === "string") {
71533
71560
  if (value.indexOf("\n") !== -1) {
71534
- return AST3.templateLiteral(
71535
- [AST3.templateElement({ raw: value, cooked: value }, true)],
71561
+ return AST4.templateLiteral(
71562
+ [AST4.templateElement({ raw: value, cooked: value }, true)],
71536
71563
  []
71537
71564
  );
71538
71565
  }
71539
- return AST3.stringLiteral(value);
71566
+ return AST4.stringLiteral(value);
71540
71567
  }
71541
- return AST3.literal(value);
71568
+ return AST4.literal(value);
71542
71569
  }
71543
71570
  function convertValue(config2, val) {
71544
71571
  let value;
71545
71572
  let kind;
71546
- if (val.kind === graphql9.Kind.INT) {
71573
+ if (val.kind === graphql10.Kind.INT) {
71547
71574
  value = parseInt(val.value, 10);
71548
71575
  kind = "Int";
71549
- } else if (val.kind === graphql9.Kind.FLOAT) {
71576
+ } else if (val.kind === graphql10.Kind.FLOAT) {
71550
71577
  value = parseFloat(val.value);
71551
71578
  kind = "Float";
71552
- } else if (val.kind === graphql9.Kind.BOOLEAN) {
71579
+ } else if (val.kind === graphql10.Kind.BOOLEAN) {
71553
71580
  value = val.value;
71554
71581
  kind = "Boolean";
71555
- } else if (val.kind === graphql9.Kind.VARIABLE) {
71582
+ } else if (val.kind === graphql10.Kind.VARIABLE) {
71556
71583
  value = val.name.value;
71557
71584
  kind = "Variable";
71558
- } else if (val.kind === graphql9.Kind.STRING) {
71585
+ } else if (val.kind === graphql10.Kind.STRING) {
71559
71586
  value = val.value;
71560
71587
  kind = "String";
71561
71588
  }
@@ -71568,9 +71595,13 @@ function operationsByPath(config2, filepath, definition, filterTypes) {
71568
71595
  return {};
71569
71596
  }
71570
71597
  const pathOperations = {};
71571
- graphql10.visit(definition, {
71598
+ graphql11.visit(definition, {
71572
71599
  FragmentSpread(node, _, __, ___, ancestors) {
71573
- if (!config2.isListFragment(node.name.value)) {
71600
+ let nameWithoutHash = node.name.value;
71601
+ if (node.directives && node.directives.find((directive) => directive.name.value === "with")) {
71602
+ nameWithoutHash = nameWithoutHash.substring(0, nameWithoutHash.lastIndexOf("_"));
71603
+ }
71604
+ if (!config2.isListFragment(nameWithoutHash)) {
71574
71605
  return;
71575
71606
  }
71576
71607
  const path3 = ancestorKey(ancestors);
@@ -71581,8 +71612,8 @@ function operationsByPath(config2, filepath, definition, filterTypes) {
71581
71612
  operationObject({
71582
71613
  config: config2,
71583
71614
  filepath,
71584
- listName: config2.listNameFromFragment(node.name.value),
71585
- operationKind: config2.listOperationFromFragment(node.name.value),
71615
+ listName: config2.listNameFromFragment(nameWithoutHash),
71616
+ operationKind: config2.listOperationFromFragment(nameWithoutHash),
71586
71617
  type: parentTypeFromAncestors(config2.schema, filepath, ancestors).name,
71587
71618
  selection: node
71588
71619
  })
@@ -71727,19 +71758,19 @@ function ancestorKey(ancestors) {
71727
71758
  }
71728
71759
 
71729
71760
  // src/codegen/generators/artifacts/selection.ts
71730
- var graphql15 = __toESM(require("graphql"), 1);
71761
+ var graphql16 = __toESM(require("graphql"), 1);
71731
71762
 
71732
71763
  // src/codegen/transforms/list.ts
71733
- var graphql13 = __toESM(require("graphql"), 1);
71764
+ var graphql14 = __toESM(require("graphql"), 1);
71734
71765
 
71735
71766
  // src/codegen/utils/objectIdentificationSelection.ts
71736
- var graphql11 = __toESM(require("graphql"), 1);
71767
+ var graphql12 = __toESM(require("graphql"), 1);
71737
71768
  var objectIdentificationSelection = (config2, type) => {
71738
71769
  return config2.keyFieldsForType(type.name).map((key) => {
71739
71770
  return {
71740
- kind: graphql11.Kind.FIELD,
71771
+ kind: graphql12.Kind.FIELD,
71741
71772
  name: {
71742
- kind: graphql11.Kind.NAME,
71773
+ kind: graphql12.Kind.NAME,
71743
71774
  value: key
71744
71775
  }
71745
71776
  };
@@ -71747,7 +71778,7 @@ var objectIdentificationSelection = (config2, type) => {
71747
71778
  };
71748
71779
 
71749
71780
  // src/codegen/transforms/paginate.ts
71750
- var graphql12 = __toESM(require("graphql"), 1);
71781
+ var graphql13 = __toESM(require("graphql"), 1);
71751
71782
  async function paginate(config2, documents) {
71752
71783
  const newDocs = [];
71753
71784
  for (const doc of documents) {
@@ -71780,7 +71811,7 @@ async function paginate(config2, documents) {
71780
71811
  };
71781
71812
  let cursorType = "String";
71782
71813
  let paginationPath = [];
71783
- doc.document = graphql12.visit(doc.document, {
71814
+ doc.document = graphql13.visit(doc.document, {
71784
71815
  Field(node, _, __, ___, ancestors) {
71785
71816
  const paginateDirective = node.directives?.find(
71786
71817
  (directive) => directive.name.value === config2.paginateDirective
@@ -71806,7 +71837,7 @@ async function paginate(config2, documents) {
71806
71837
  flags.offset.enabled = offsetPagination;
71807
71838
  flags.limit.enabled = offsetPagination;
71808
71839
  paginationPath = ancestors.filter(
71809
- (ancestor) => !Array.isArray(ancestor) && ancestor.kind === graphql12.Kind.FIELD
71840
+ (ancestor) => !Array.isArray(ancestor) && ancestor.kind === graphql13.Kind.FIELD
71810
71841
  ).concat(node).map((field) => field.alias?.value || field.name.value);
71811
71842
  return {
71812
71843
  ...node,
@@ -71825,7 +71856,7 @@ async function paginate(config2, documents) {
71825
71856
  let fragment2 = "";
71826
71857
  let paginateMode = config2.defaultPaginateMode;
71827
71858
  const requiredArgs = [];
71828
- doc.document = graphql12.visit(doc.document, {
71859
+ doc.document = graphql13.visit(doc.document, {
71829
71860
  OperationDefinition(node) {
71830
71861
  if (node.operation !== "query") {
71831
71862
  throw new HoudiniError({
@@ -71884,9 +71915,9 @@ async function paginate(config2, documents) {
71884
71915
  directives: [
71885
71916
  ...node.directives || [],
71886
71917
  {
71887
- kind: graphql12.Kind.DIRECTIVE,
71918
+ kind: graphql13.Kind.DIRECTIVE,
71888
71919
  name: {
71889
- kind: graphql12.Kind.NAME,
71920
+ kind: graphql13.Kind.NAME,
71890
71921
  value: config2.argumentsDirective
71891
71922
  }
71892
71923
  }
@@ -71956,22 +71987,22 @@ async function paginate(config2, documents) {
71956
71987
  const paginationArgs = Object.entries(flags).filter(([_, { enabled }]) => enabled).map(([key, value]) => ({ name: key, ...value }));
71957
71988
  const fragmentSpreadSelection = [
71958
71989
  {
71959
- kind: graphql12.Kind.FRAGMENT_SPREAD,
71990
+ kind: graphql13.Kind.FRAGMENT_SPREAD,
71960
71991
  name: {
71961
- kind: graphql12.Kind.NAME,
71992
+ kind: graphql13.Kind.NAME,
71962
71993
  value: fragmentName
71963
71994
  },
71964
71995
  directives: [
71965
71996
  {
71966
- kind: graphql12.Kind.DIRECTIVE,
71997
+ kind: graphql13.Kind.DIRECTIVE,
71967
71998
  name: {
71968
- kind: graphql12.Kind.NAME,
71999
+ kind: graphql13.Kind.NAME,
71969
72000
  value: config2.withDirective
71970
72001
  },
71971
72002
  ["arguments"]: requiredArgs.map((arg) => variableAsArgument(arg.name)).concat(paginationArgs.map(({ name }) => variableAsArgument(name)))
71972
72003
  },
71973
72004
  {
71974
- kind: graphql12.Kind.DIRECTIVE,
72005
+ kind: graphql13.Kind.DIRECTIVE,
71975
72006
  name: {
71976
72007
  kind: "Name",
71977
72008
  value: config2.maskDisableDirective
@@ -71998,23 +72029,23 @@ async function paginate(config2, documents) {
71998
72029
  });
71999
72030
  const typeConfig = config2.typeConfig?.[fragment2];
72000
72031
  const queryDoc = {
72001
- kind: graphql12.Kind.DOCUMENT,
72032
+ kind: graphql13.Kind.DOCUMENT,
72002
72033
  definitions: [
72003
72034
  {
72004
- kind: graphql12.Kind.OPERATION_DEFINITION,
72035
+ kind: graphql13.Kind.OPERATION_DEFINITION,
72005
72036
  name: {
72006
- kind: graphql12.Kind.NAME,
72037
+ kind: graphql13.Kind.NAME,
72007
72038
  value: refetchQueryName
72008
72039
  },
72009
72040
  operation: "query",
72010
72041
  variableDefinitions: requiredArgs.map(
72011
72042
  (arg) => ({
72012
- kind: graphql12.Kind.VARIABLE_DEFINITION,
72043
+ kind: graphql13.Kind.VARIABLE_DEFINITION,
72013
72044
  type: arg.type,
72014
72045
  variable: {
72015
- kind: graphql12.Kind.VARIABLE,
72046
+ kind: graphql13.Kind.VARIABLE,
72016
72047
  name: {
72017
- kind: graphql12.Kind.NAME,
72048
+ kind: graphql13.Kind.NAME,
72018
72049
  value: arg.name
72019
72050
  }
72020
72051
  }
@@ -72022,18 +72053,18 @@ async function paginate(config2, documents) {
72022
72053
  ).concat(
72023
72054
  paginationArgs.map(
72024
72055
  (arg) => ({
72025
- kind: graphql12.Kind.VARIABLE_DEFINITION,
72056
+ kind: graphql13.Kind.VARIABLE_DEFINITION,
72026
72057
  type: {
72027
- kind: graphql12.Kind.NAMED_TYPE,
72058
+ kind: graphql13.Kind.NAMED_TYPE,
72028
72059
  name: {
72029
- kind: graphql12.Kind.NAME,
72060
+ kind: graphql13.Kind.NAME,
72030
72061
  value: arg.type
72031
72062
  }
72032
72063
  },
72033
72064
  variable: {
72034
- kind: graphql12.Kind.VARIABLE,
72065
+ kind: graphql13.Kind.VARIABLE,
72035
72066
  name: {
72036
- kind: graphql12.Kind.NAME,
72067
+ kind: graphql13.Kind.NAME,
72037
72068
  value: arg.name
72038
72069
  }
72039
72070
  },
@@ -72045,12 +72076,12 @@ async function paginate(config2, documents) {
72045
72076
  ).concat(
72046
72077
  !nodeQuery ? [] : keys2.map(
72047
72078
  (key) => ({
72048
- kind: graphql12.Kind.VARIABLE_DEFINITION,
72079
+ kind: graphql13.Kind.VARIABLE_DEFINITION,
72049
72080
  type: key.type,
72050
72081
  variable: {
72051
- kind: graphql12.Kind.VARIABLE,
72082
+ kind: graphql13.Kind.VARIABLE,
72052
72083
  name: {
72053
- kind: graphql12.Kind.NAME,
72084
+ kind: graphql13.Kind.NAME,
72054
72085
  value: key.name
72055
72086
  }
72056
72087
  }
@@ -72059,42 +72090,42 @@ async function paginate(config2, documents) {
72059
72090
  )
72060
72091
  ),
72061
72092
  selectionSet: {
72062
- kind: graphql12.Kind.SELECTION_SET,
72093
+ kind: graphql13.Kind.SELECTION_SET,
72063
72094
  selections: !nodeQuery ? fragmentSpreadSelection : [
72064
72095
  {
72065
- kind: graphql12.Kind.FIELD,
72096
+ kind: graphql13.Kind.FIELD,
72066
72097
  name: {
72067
- kind: graphql12.Kind.NAME,
72098
+ kind: graphql13.Kind.NAME,
72068
72099
  value: typeConfig?.resolve?.queryField || "node"
72069
72100
  },
72070
72101
  ["arguments"]: keys2.map((key) => ({
72071
- kind: graphql12.Kind.ARGUMENT,
72102
+ kind: graphql13.Kind.ARGUMENT,
72072
72103
  name: {
72073
- kind: graphql12.Kind.NAME,
72104
+ kind: graphql13.Kind.NAME,
72074
72105
  value: key.name
72075
72106
  },
72076
72107
  value: {
72077
- kind: graphql12.Kind.VARIABLE,
72108
+ kind: graphql13.Kind.VARIABLE,
72078
72109
  name: {
72079
- kind: graphql12.Kind.NAME,
72110
+ kind: graphql13.Kind.NAME,
72080
72111
  value: key.name
72081
72112
  }
72082
72113
  }
72083
72114
  })),
72084
72115
  selectionSet: {
72085
- kind: graphql12.Kind.SELECTION_SET,
72116
+ kind: graphql13.Kind.SELECTION_SET,
72086
72117
  selections: [
72087
72118
  {
72088
- kind: graphql12.Kind.FIELD,
72119
+ kind: graphql13.Kind.FIELD,
72089
72120
  name: {
72090
- kind: graphql12.Kind.NAME,
72121
+ kind: graphql13.Kind.NAME,
72091
72122
  value: "__typename"
72092
72123
  }
72093
72124
  },
72094
72125
  ...(typeConfig?.keys || [config2.defaultKeys[0]]).map((key) => ({
72095
- kind: graphql12.Kind.FIELD,
72126
+ kind: graphql13.Kind.FIELD,
72096
72127
  name: {
72097
- kind: graphql12.Kind.NAME,
72128
+ kind: graphql13.Kind.NAME,
72098
72129
  value: key
72099
72130
  }
72100
72131
  })),
@@ -72151,15 +72182,15 @@ function replaceArgumentsWithVariables(args, flags) {
72151
72182
  }
72152
72183
  function variableAsArgument(name, variable) {
72153
72184
  return {
72154
- kind: graphql12.Kind.ARGUMENT,
72185
+ kind: graphql13.Kind.ARGUMENT,
72155
72186
  name: {
72156
- kind: graphql12.Kind.NAME,
72187
+ kind: graphql13.Kind.NAME,
72157
72188
  value: name
72158
72189
  },
72159
72190
  value: {
72160
- kind: graphql12.Kind.VARIABLE,
72191
+ kind: graphql13.Kind.VARIABLE,
72161
72192
  name: {
72162
- kind: graphql12.Kind.NAME,
72193
+ kind: graphql13.Kind.NAME,
72163
72194
  value: variable ?? name
72164
72195
  }
72165
72196
  }
@@ -72167,18 +72198,18 @@ function variableAsArgument(name, variable) {
72167
72198
  }
72168
72199
  function staticVariableDefinition(name, type, defaultValue, variableName) {
72169
72200
  return {
72170
- kind: graphql12.Kind.VARIABLE_DEFINITION,
72201
+ kind: graphql13.Kind.VARIABLE_DEFINITION,
72171
72202
  type: {
72172
- kind: graphql12.Kind.NAMED_TYPE,
72203
+ kind: graphql13.Kind.NAMED_TYPE,
72173
72204
  name: {
72174
- kind: graphql12.Kind.NAME,
72205
+ kind: graphql13.Kind.NAME,
72175
72206
  value: type
72176
72207
  }
72177
72208
  },
72178
72209
  variable: {
72179
- kind: graphql12.Kind.VARIABLE,
72210
+ kind: graphql13.Kind.VARIABLE,
72180
72211
  name: {
72181
- kind: graphql12.Kind.NAME,
72212
+ kind: graphql13.Kind.NAME,
72182
72213
  value: variableName ?? name
72183
72214
  }
72184
72215
  },
@@ -72190,9 +72221,9 @@ function staticVariableDefinition(name, type, defaultValue, variableName) {
72190
72221
  }
72191
72222
  function argumentNode(name, value) {
72192
72223
  return {
72193
- kind: graphql12.Kind.ARGUMENT,
72224
+ kind: graphql13.Kind.ARGUMENT,
72194
72225
  name: {
72195
- kind: graphql12.Kind.NAME,
72226
+ kind: graphql13.Kind.NAME,
72196
72227
  value: name
72197
72228
  },
72198
72229
  value: objectNode(value)
@@ -72200,16 +72231,16 @@ function argumentNode(name, value) {
72200
72231
  }
72201
72232
  function objectNode([type, defaultValue]) {
72202
72233
  const node = {
72203
- kind: graphql12.Kind.OBJECT,
72234
+ kind: graphql13.Kind.OBJECT,
72204
72235
  fields: [
72205
72236
  {
72206
- kind: graphql12.Kind.OBJECT_FIELD,
72237
+ kind: graphql13.Kind.OBJECT_FIELD,
72207
72238
  name: {
72208
- kind: graphql12.Kind.NAME,
72239
+ kind: graphql13.Kind.NAME,
72209
72240
  value: "type"
72210
72241
  },
72211
72242
  value: {
72212
- kind: graphql12.Kind.STRING,
72243
+ kind: graphql13.Kind.STRING,
72213
72244
  value: type
72214
72245
  }
72215
72246
  }
@@ -72217,8 +72248,8 @@ function objectNode([type, defaultValue]) {
72217
72248
  };
72218
72249
  if (defaultValue) {
72219
72250
  node.fields.push({
72220
- kind: graphql12.Kind.OBJECT_FIELD,
72221
- name: { kind: graphql12.Kind.NAME, value: "default" },
72251
+ kind: graphql13.Kind.OBJECT_FIELD,
72252
+ name: { kind: graphql13.Kind.NAME, value: "default" },
72222
72253
  value: {
72223
72254
  kind: typeof defaultValue === "number" ? "IntValue" : "StringValue",
72224
72255
  value: defaultValue.toString()
@@ -72229,34 +72260,34 @@ function objectNode([type, defaultValue]) {
72229
72260
  }
72230
72261
  var pageInfoSelection = [
72231
72262
  {
72232
- kind: graphql12.Kind.FIELD,
72263
+ kind: graphql13.Kind.FIELD,
72233
72264
  name: {
72234
- kind: graphql12.Kind.NAME,
72265
+ kind: graphql13.Kind.NAME,
72235
72266
  value: "edges"
72236
72267
  },
72237
72268
  selectionSet: {
72238
- kind: graphql12.Kind.SELECTION_SET,
72269
+ kind: graphql13.Kind.SELECTION_SET,
72239
72270
  selections: [
72240
72271
  {
72241
- kind: graphql12.Kind.FIELD,
72272
+ kind: graphql13.Kind.FIELD,
72242
72273
  name: {
72243
- kind: graphql12.Kind.NAME,
72274
+ kind: graphql13.Kind.NAME,
72244
72275
  value: "cursor"
72245
72276
  }
72246
72277
  },
72247
72278
  {
72248
- kind: graphql12.Kind.FIELD,
72279
+ kind: graphql13.Kind.FIELD,
72249
72280
  name: {
72250
- kind: graphql12.Kind.NAME,
72281
+ kind: graphql13.Kind.NAME,
72251
72282
  value: "node"
72252
72283
  },
72253
72284
  selectionSet: {
72254
- kind: graphql12.Kind.SELECTION_SET,
72285
+ kind: graphql13.Kind.SELECTION_SET,
72255
72286
  selections: [
72256
72287
  {
72257
- kind: graphql12.Kind.FIELD,
72288
+ kind: graphql13.Kind.FIELD,
72258
72289
  name: {
72259
- kind: graphql12.Kind.NAME,
72290
+ kind: graphql13.Kind.NAME,
72260
72291
  value: "__typename"
72261
72292
  }
72262
72293
  }
@@ -72267,39 +72298,39 @@ var pageInfoSelection = [
72267
72298
  }
72268
72299
  },
72269
72300
  {
72270
- kind: graphql12.Kind.FIELD,
72301
+ kind: graphql13.Kind.FIELD,
72271
72302
  name: {
72272
- kind: graphql12.Kind.NAME,
72303
+ kind: graphql13.Kind.NAME,
72273
72304
  value: "pageInfo"
72274
72305
  },
72275
72306
  selectionSet: {
72276
- kind: graphql12.Kind.SELECTION_SET,
72307
+ kind: graphql13.Kind.SELECTION_SET,
72277
72308
  selections: [
72278
72309
  {
72279
- kind: graphql12.Kind.FIELD,
72310
+ kind: graphql13.Kind.FIELD,
72280
72311
  name: {
72281
- kind: graphql12.Kind.NAME,
72312
+ kind: graphql13.Kind.NAME,
72282
72313
  value: "hasPreviousPage"
72283
72314
  }
72284
72315
  },
72285
72316
  {
72286
- kind: graphql12.Kind.FIELD,
72317
+ kind: graphql13.Kind.FIELD,
72287
72318
  name: {
72288
- kind: graphql12.Kind.NAME,
72319
+ kind: graphql13.Kind.NAME,
72289
72320
  value: "hasNextPage"
72290
72321
  }
72291
72322
  },
72292
72323
  {
72293
- kind: graphql12.Kind.FIELD,
72324
+ kind: graphql13.Kind.FIELD,
72294
72325
  name: {
72295
- kind: graphql12.Kind.NAME,
72326
+ kind: graphql13.Kind.NAME,
72296
72327
  value: "startCursor"
72297
72328
  }
72298
72329
  },
72299
72330
  {
72300
- kind: graphql12.Kind.FIELD,
72331
+ kind: graphql13.Kind.FIELD,
72301
72332
  name: {
72302
- kind: graphql12.Kind.NAME,
72333
+ kind: graphql13.Kind.NAME,
72303
72334
  value: "endCursor"
72304
72335
  }
72305
72336
  }
@@ -72313,17 +72344,17 @@ async function addListFragments(config2, documents) {
72313
72344
  const lists = {};
72314
72345
  const errors = [];
72315
72346
  for (const doc of documents) {
72316
- doc.document = graphql13.visit(doc.document, {
72347
+ doc.document = graphql14.visit(doc.document, {
72317
72348
  Directive(node, key, parent2, path3, ancestors) {
72318
72349
  if ([config2.listDirective, config2.paginateDirective].includes(node.name.value)) {
72319
72350
  const nameArg = node.arguments?.find(
72320
72351
  (arg) => arg.name.value === config2.listOrPaginateNameArg
72321
72352
  );
72322
72353
  let error = {
72323
- ...new graphql13.GraphQLError(
72354
+ ...new graphql14.GraphQLError(
72324
72355
  "",
72325
72356
  node,
72326
- new graphql13.Source(""),
72357
+ new graphql14.Source(""),
72327
72358
  node.loc ? [node.loc.start, node.loc.end] : null,
72328
72359
  path3
72329
72360
  ),
@@ -72375,7 +72406,7 @@ async function addListFragments(config2, documents) {
72375
72406
  {
72376
72407
  kind: "Argument",
72377
72408
  name: {
72378
- kind: graphql13.Kind.NAME,
72409
+ kind: graphql14.Kind.NAME,
72379
72410
  value: "connection"
72380
72411
  },
72381
72412
  value: {
@@ -72425,7 +72456,7 @@ async function addListFragments(config2, documents) {
72425
72456
  const validDeletes = [
72426
72457
  ...new Set(
72427
72458
  Object.values(lists).map(({ type }) => {
72428
- if (!(type instanceof graphql13.GraphQLObjectType)) {
72459
+ if (!(type instanceof graphql14.GraphQLObjectType)) {
72429
72460
  return "";
72430
72461
  }
72431
72462
  if (config2.keyFieldsForType(type.name).length !== 1) {
@@ -72439,7 +72470,7 @@ async function addListFragments(config2, documents) {
72439
72470
  return;
72440
72471
  }
72441
72472
  const generatedDoc = {
72442
- kind: graphql13.Kind.DOCUMENT,
72473
+ kind: graphql14.Kind.DOCUMENT,
72443
72474
  definitions: Object.entries(lists).flatMap(
72444
72475
  ([name, { selection, type }]) => {
72445
72476
  const schemaType = config2.schema.getType(type.name);
@@ -72447,7 +72478,7 @@ async function addListFragments(config2, documents) {
72447
72478
  throw new HoudiniError({ message: "Lists must have a selection" });
72448
72479
  }
72449
72480
  const fragmentSelection = {
72450
- kind: graphql13.Kind.SELECTION_SET,
72481
+ kind: graphql14.Kind.SELECTION_SET,
72451
72482
  selections: [...selection.selections]
72452
72483
  };
72453
72484
  if (schemaType && fragmentSelection && !fragmentSelection?.selections.find(
@@ -72462,14 +72493,14 @@ async function addListFragments(config2, documents) {
72462
72493
  {
72463
72494
  name: {
72464
72495
  value: config2.listInsertFragment(name),
72465
- kind: graphql13.Kind.NAME
72496
+ kind: graphql14.Kind.NAME
72466
72497
  },
72467
- kind: graphql13.Kind.FRAGMENT_DEFINITION,
72498
+ kind: graphql14.Kind.FRAGMENT_DEFINITION,
72468
72499
  selectionSet: fragmentSelection,
72469
72500
  typeCondition: {
72470
- kind: graphql13.Kind.NAMED_TYPE,
72501
+ kind: graphql14.Kind.NAMED_TYPE,
72471
72502
  name: {
72472
- kind: graphql13.Kind.NAME,
72503
+ kind: graphql14.Kind.NAME,
72473
72504
  value: type.name
72474
72505
  }
72475
72506
  }
@@ -72477,32 +72508,32 @@ async function addListFragments(config2, documents) {
72477
72508
  {
72478
72509
  name: {
72479
72510
  value: config2.listToggleFragment(name),
72480
- kind: graphql13.Kind.NAME
72511
+ kind: graphql14.Kind.NAME
72481
72512
  },
72482
- kind: graphql13.Kind.FRAGMENT_DEFINITION,
72513
+ kind: graphql14.Kind.FRAGMENT_DEFINITION,
72483
72514
  selectionSet: fragmentSelection,
72484
72515
  typeCondition: {
72485
- kind: graphql13.Kind.NAMED_TYPE,
72516
+ kind: graphql14.Kind.NAMED_TYPE,
72486
72517
  name: {
72487
- kind: graphql13.Kind.NAME,
72518
+ kind: graphql14.Kind.NAME,
72488
72519
  value: type.name
72489
72520
  }
72490
72521
  }
72491
72522
  },
72492
72523
  {
72493
- kind: graphql13.Kind.FRAGMENT_DEFINITION,
72524
+ kind: graphql14.Kind.FRAGMENT_DEFINITION,
72494
72525
  name: {
72495
72526
  value: config2.listRemoveFragment(name),
72496
- kind: graphql13.Kind.NAME
72527
+ kind: graphql14.Kind.NAME
72497
72528
  },
72498
72529
  selectionSet: {
72499
- kind: graphql13.Kind.SELECTION_SET,
72530
+ kind: graphql14.Kind.SELECTION_SET,
72500
72531
  selections: [...objectIdentificationSelection(config2, type)]
72501
72532
  },
72502
72533
  typeCondition: {
72503
- kind: graphql13.Kind.NAMED_TYPE,
72534
+ kind: graphql14.Kind.NAMED_TYPE,
72504
72535
  name: {
72505
- kind: graphql13.Kind.NAME,
72536
+ kind: graphql14.Kind.NAME,
72506
72537
  value: type.name
72507
72538
  }
72508
72539
  }
@@ -72511,14 +72542,14 @@ async function addListFragments(config2, documents) {
72511
72542
  }
72512
72543
  ).concat(
72513
72544
  ...validDeletes.map((typeName) => ({
72514
- kind: graphql13.Kind.DIRECTIVE_DEFINITION,
72545
+ kind: graphql14.Kind.DIRECTIVE_DEFINITION,
72515
72546
  name: {
72516
- kind: graphql13.Kind.NAME,
72547
+ kind: graphql14.Kind.NAME,
72517
72548
  value: config2.listDeleteDirective(typeName)
72518
72549
  },
72519
72550
  locations: [
72520
72551
  {
72521
- kind: graphql13.Kind.NAME,
72552
+ kind: graphql14.Kind.NAME,
72522
72553
  value: "FIELD"
72523
72554
  }
72524
72555
  ],
@@ -72526,8 +72557,8 @@ async function addListFragments(config2, documents) {
72526
72557
  }))
72527
72558
  )
72528
72559
  };
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");
72560
+ config2.newSchema += "\n" + generatedDoc.definitions.filter((c) => c.kind !== "FragmentDefinition").map(graphql14.print).join("\n\n");
72561
+ config2.newDocuments += "\n" + generatedDoc.definitions.filter((c) => c.kind === "FragmentDefinition").map(graphql14.print).join("\n\n");
72531
72562
  documents.push({
72532
72563
  name: "generated::lists",
72533
72564
  kind: ArtifactKind.Fragment,
@@ -72613,11 +72644,11 @@ var nodeNotDefinedMessage = (config2) => `Looks like you are trying to use the $
72613
72644
  For more information, visit this link: ${siteURL}/guides/pagination`;
72614
72645
 
72615
72646
  // src/codegen/generators/artifacts/fieldKey.ts
72616
- var graphql14 = __toESM(require("graphql"), 1);
72647
+ var graphql15 = __toESM(require("graphql"), 1);
72617
72648
  function fieldKey(config2, field) {
72618
72649
  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];
72650
+ const printed = graphql15.print(field);
72651
+ const secondParse = graphql15.parse(`{${printed}}`).definitions[0].selectionSet.selections[0];
72621
72652
  let paginateMode = config2.defaultPaginateMode;
72622
72653
  const paginatedDirective = field.directives?.find(
72623
72654
  (directive) => directive.name.value === config2.paginateDirective
@@ -72740,13 +72771,13 @@ function prepareSelection({
72740
72771
  } else if ("getFields" in type) {
72741
72772
  let typeRef = type.getFields()[field.name.value].type;
72742
72773
  fieldType = getRootType(typeRef);
72743
- nullable = !graphql15.isNonNullType(typeRef);
72744
- } else if (graphql15.isAbstractType(type)) {
72774
+ nullable = !graphql16.isNonNullType(typeRef);
72775
+ } else if (graphql16.isAbstractType(type)) {
72745
72776
  for (const possible of config2.schema.getPossibleTypes(type)) {
72746
- if (graphql15.isObjectType(possible)) {
72777
+ if (graphql16.isObjectType(possible)) {
72747
72778
  if (possible.getFields()[field.name.value]) {
72748
72779
  fieldType = possible.getFields()[field.name.value].type;
72749
- nullable = !graphql15.isNonNullType(fieldType);
72780
+ nullable = !graphql16.isNonNullType(fieldType);
72750
72781
  break;
72751
72782
  }
72752
72783
  }
@@ -72883,7 +72914,7 @@ function prepareSelection({
72883
72914
  kind: "value"
72884
72915
  } : { kind: "continue" };
72885
72916
  const parentType = config2.schema.getType(rootType);
72886
- if (graphql15.isObjectType(parentType) || graphql15.isInterfaceType(parentType)) {
72917
+ if (graphql16.isObjectType(parentType) || graphql16.isInterfaceType(parentType)) {
72887
72918
  const fieldType2 = parentType.getFields()[field.name.value]?.type;
72888
72919
  if (fieldType2) {
72889
72920
  const listCount = unwrapType(config2, fieldType2).wrappers.filter(
@@ -72906,7 +72937,7 @@ function prepareSelection({
72906
72937
  }
72907
72938
  fieldObj.loading = loadingValue;
72908
72939
  }
72909
- if (graphql15.isInterfaceType(fieldType) || graphql15.isUnionType(fieldType)) {
72940
+ if (graphql16.isInterfaceType(fieldType) || graphql16.isUnionType(fieldType)) {
72910
72941
  fieldObj.abstract = true;
72911
72942
  if (Object.values(fieldObj.selection?.abstractFields?.fields ?? {}).some(
72912
72943
  (fields) => Object.values(fields ?? {}).some((field2) => field2.required)
@@ -72988,7 +73019,7 @@ function mergeSelection({
72988
73019
  typeSelection,
72989
73020
  abstractSelection.fields[typeName] ?? {}
72990
73021
  );
72991
- if (graphql15.isAbstractType(gqlType)) {
73022
+ if (graphql16.isAbstractType(gqlType)) {
72992
73023
  for (const possible of config2.schema.getPossibleTypes(gqlType)) {
72993
73024
  if (!possibleSelectionTypes[typeName]) {
72994
73025
  possibleSelectionTypes[typeName] = [];
@@ -73023,7 +73054,7 @@ function mergeSelection({
73023
73054
  }
73024
73055
  }
73025
73056
  const parentType = config2.schema.getType(rootType);
73026
- const possibleParents = graphql15.isAbstractType(parentType) ? config2.schema.getPossibleTypes(parentType)?.map((t3) => t3.name) : [parentType.name];
73057
+ const possibleParents = graphql16.isAbstractType(parentType) ? config2.schema.getPossibleTypes(parentType)?.map((t3) => t3.name) : [parentType.name];
73027
73058
  for (const key of Object.keys(abstractSelection.typeMap)) {
73028
73059
  if (!possibleParents.includes(key) && rootType !== key || abstractSelection.fields[key]) {
73029
73060
  delete abstractSelection.typeMap[key];
@@ -73080,12 +73111,12 @@ function mergeSelection({
73080
73111
  }
73081
73112
 
73082
73113
  // src/codegen/generators/artifacts/index.ts
73083
- var AST4 = recast4.types.builders;
73114
+ var AST5 = recast5.types.builders;
73084
73115
  function artifactGenerator(stats) {
73085
73116
  return async function(config2, docs) {
73086
73117
  const filterTypes = {};
73087
73118
  for (const doc of docs) {
73088
- graphql16.visit(doc.document, {
73119
+ graphql17.visit(doc.document, {
73089
73120
  Directive(node, _, __, ___, ancestors) {
73090
73121
  if (node.name.value !== config2.listDirective) {
73091
73122
  return;
@@ -73145,7 +73176,7 @@ function artifactGenerator(stats) {
73145
73176
  return;
73146
73177
  }
73147
73178
  const usedVariableNames = /* @__PURE__ */ new Set();
73148
- let documentWithoutInternalDirectives = graphql16.visit(document, {
73179
+ let documentWithoutInternalDirectives = graphql17.visit(document, {
73149
73180
  Directive(node) {
73150
73181
  if (config2.isInternalDirective(node.name.value)) {
73151
73182
  return null;
@@ -73158,7 +73189,7 @@ function artifactGenerator(stats) {
73158
73189
  }
73159
73190
  }
73160
73191
  });
73161
- let documentWithoutExtraVariables = graphql16.visit(
73192
+ let documentWithoutExtraVariables = graphql17.visit(
73162
73193
  documentWithoutInternalDirectives,
73163
73194
  {
73164
73195
  VariableDefinition(variableDefinitionNode) {
@@ -73169,13 +73200,13 @@ function artifactGenerator(stats) {
73169
73200
  }
73170
73201
  }
73171
73202
  );
73172
- let rawString = graphql16.print(documentWithoutExtraVariables);
73203
+ let rawString = graphql17.print(documentWithoutExtraVariables);
73173
73204
  let docKind = doc.kind;
73174
73205
  const operations = document.definitions.filter(
73175
- ({ kind }) => kind === graphql16.Kind.OPERATION_DEFINITION
73206
+ ({ kind }) => kind === graphql17.Kind.OPERATION_DEFINITION
73176
73207
  );
73177
73208
  const fragments = document.definitions.filter(
73178
- ({ kind }) => kind === graphql16.Kind.FRAGMENT_DEFINITION
73209
+ ({ kind }) => kind === graphql17.Kind.FRAGMENT_DEFINITION
73179
73210
  );
73180
73211
  let rootType = "";
73181
73212
  let selectionSet;
@@ -73375,9 +73406,9 @@ function artifactGenerator(stats) {
73375
73406
  plugin2.artifactEnd({ config: config2, document: doc });
73376
73407
  }
73377
73408
  const _houdiniHash = hashOriginal({ document: doc });
73378
- const file = AST4.program([
73409
+ const file = AST5.program([
73379
73410
  moduleExport(config2, "default", serializeValue(artifact)),
73380
- AST4.expressionStatement(AST4.stringLiteral(`HoudiniHash=${_houdiniHash}`))
73411
+ AST5.expressionStatement(AST5.stringLiteral(`HoudiniHash=${_houdiniHash}`))
73381
73412
  ]);
73382
73413
  const artifactPath = config2.artifactPath(document);
73383
73414
  const countDocument = doc.generateStore;
@@ -73435,7 +73466,7 @@ function applyMask(config2, target, mask) {
73435
73466
  if (!targetType) {
73436
73467
  continue;
73437
73468
  }
73438
- if (graphql16.isAbstractType(targetType)) {
73469
+ if (graphql17.isAbstractType(targetType)) {
73439
73470
  for (const possible of config2.schema.getPossibleTypes(targetType)) {
73440
73471
  if (target.abstractFields?.fields[possible.name]) {
73441
73472
  applyMask(
@@ -73458,8 +73489,8 @@ function applyMask(config2, target, mask) {
73458
73489
  }
73459
73490
 
73460
73491
  // src/codegen/generators/runtime/graphqlFunction.ts
73461
- var recast5 = __toESM(require_main2(), 1);
73462
- var AST5 = recast5.types.builders;
73492
+ var recast6 = __toESM(require_main2(), 1);
73493
+ var AST6 = recast6.types.builders;
73463
73494
  async function generateGraphqlReturnTypes(config2, docs) {
73464
73495
  const indexPath = path_exports.join(config2.runtimeDirectory, "index.d.ts");
73465
73496
  const fileContent = await fs_exports.readFile(indexPath) || "";
@@ -73494,18 +73525,18 @@ async function generateGraphqlReturnTypes(config2, docs) {
73494
73525
  continue;
73495
73526
  }
73496
73527
  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))
73528
+ const input = AST6.identifier("str");
73529
+ input.typeAnnotation = AST6.tsTypeAnnotation(
73530
+ AST6.tsLiteralType(AST6.stringLiteral(queryString))
73500
73531
  );
73501
73532
  script.body.splice(
73502
73533
  i2,
73503
73534
  0,
73504
- AST5.exportNamedDeclaration(
73505
- AST5.tsDeclareFunction(
73506
- AST5.identifier("graphql"),
73535
+ AST6.exportNamedDeclaration(
73536
+ AST6.tsDeclareFunction(
73537
+ AST6.identifier("graphql"),
73507
73538
  [input],
73508
- AST5.tsTypeAnnotation(AST5.tsTypeReference(AST5.identifier(returnValue)))
73539
+ AST6.tsTypeAnnotation(AST6.tsTypeReference(AST6.identifier(returnValue)))
73509
73540
  )
73510
73541
  )
73511
73542
  );
@@ -73680,165 +73711,22 @@ function moduleStatments(config2) {
73680
73711
  var recast11 = __toESM(require_main2(), 1);
73681
73712
 
73682
73713
  // 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
73714
  var graphql18 = __toESM(require("graphql"), 1);
73688
73715
  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
73716
  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
73717
  function addReferencedInputTypes(config2, filepath, body, visitedTypes, missingScalars, rootType) {
73830
73718
  const { type } = unwrapType(config2, rootType);
73831
- if (graphql19.isScalarType(type)) {
73719
+ if (graphql18.isScalarType(type)) {
73832
73720
  return;
73833
73721
  }
73834
73722
  if (visitedTypes.has(type.name)) {
73835
73723
  return;
73836
73724
  }
73837
- if (graphql19.isUnionType(type)) {
73725
+ if (graphql18.isUnionType(type)) {
73838
73726
  throw new HoudiniError({ filepath, message: "Input Unions are not supported yet. Sorry!" });
73839
73727
  }
73840
73728
  visitedTypes.add(type.name);
73841
- if (graphql19.isEnumType(type)) {
73729
+ if (graphql18.isEnumType(type)) {
73842
73730
  ensureImports({
73843
73731
  config: config2,
73844
73732
  body,
@@ -73852,21 +73740,37 @@ function addReferencedInputTypes(config2, filepath, body, visitedTypes, missingS
73852
73740
  for (const field of Object.values(type.getFields())) {
73853
73741
  addReferencedInputTypes(config2, filepath, body, visitedTypes, missingScalars, field.type);
73854
73742
  members.push(
73855
- AST8.tsPropertySignature(
73856
- AST8.identifier(field.name),
73857
- AST8.tsTypeAnnotation(
73743
+ AST7.tsPropertySignature(
73744
+ AST7.identifier(field.name),
73745
+ AST7.tsTypeAnnotation(
73858
73746
  tsTypeReference(config2, filepath, missingScalars, field, body)
73859
73747
  ),
73860
- graphql19.isNullableType(field.type)
73748
+ graphql18.isNullableType(field.type)
73861
73749
  )
73862
73750
  );
73863
73751
  }
73864
- body.push(AST8.tsTypeAliasDeclaration(AST8.identifier(type.name), AST8.tsTypeLiteral(members)));
73752
+ body.push(AST7.tsTypeAliasDeclaration(AST7.identifier(type.name), AST7.tsTypeLiteral(members)));
73865
73753
  }
73866
73754
 
73867
73755
  // src/codegen/generators/typescript/inlineType.ts
73868
- var graphql20 = __toESM(require("graphql"), 1);
73756
+ var graphql19 = __toESM(require("graphql"), 1);
73869
73757
  var recast9 = __toESM(require_main2(), 1);
73758
+
73759
+ // src/codegen/generators/comments/jsdoc.ts
73760
+ var recast8 = __toESM(require_main2(), 1);
73761
+ var AST8 = recast8.types.builders;
73762
+ function jsdocComment(text, deprecated) {
73763
+ let commentContent = `*
73764
+ * ${text}
73765
+ `;
73766
+ if (deprecated) {
73767
+ commentContent = `${commentContent} * @deprecated ${deprecated}
73768
+ `;
73769
+ }
73770
+ return AST8.commentBlock(commentContent, true);
73771
+ }
73772
+
73773
+ // src/codegen/generators/typescript/inlineType.ts
73870
73774
  var AST9 = recast9.types.builders;
73871
73775
  var fragmentKey2 = " $fragments";
73872
73776
  function inlineType({
@@ -73887,7 +73791,7 @@ function inlineType({
73887
73791
  const { type, wrappers } = unwrapType(config2, rootType);
73888
73792
  let result;
73889
73793
  let forceNullable = false;
73890
- if (graphql20.isScalarType(type)) {
73794
+ if (graphql19.isScalarType(type)) {
73891
73795
  result = scalarPropertyValue(
73892
73796
  config2,
73893
73797
  filepath,
@@ -73896,7 +73800,7 @@ function inlineType({
73896
73800
  body,
73897
73801
  field
73898
73802
  );
73899
- } else if (graphql20.isEnumType(type)) {
73803
+ } else if (graphql19.isEnumType(type)) {
73900
73804
  ensureImports({
73901
73805
  config: config2,
73902
73806
  body,
@@ -73921,11 +73825,11 @@ function inlineType({
73921
73825
  for (const selection of selections) {
73922
73826
  if (selection.kind === "InlineFragment" && selection.typeCondition) {
73923
73827
  const fragmentType = config2.schema.getType(selection.typeCondition.name.value);
73924
- if (!graphql20.isInterfaceType(type) && !graphql20.isUnionType(type)) {
73828
+ if (!graphql19.isInterfaceType(type) && !graphql19.isUnionType(type)) {
73925
73829
  selectedFields.push(...selection.selectionSet.selections);
73926
73830
  continue;
73927
73831
  }
73928
- if (!graphql20.isInterfaceType(fragmentType) && !graphql20.isUnionType(fragmentType)) {
73832
+ if (!graphql19.isInterfaceType(fragmentType) && !graphql19.isUnionType(fragmentType)) {
73929
73833
  if (!inlineFragments[fragmentType.name]) {
73930
73834
  inlineFragments[fragmentType.name] = [];
73931
73835
  }
@@ -74017,6 +73921,11 @@ function inlineType({
74017
73921
  if (allOptional) {
74018
73922
  prop.optional = true;
74019
73923
  }
73924
+ if (field2.description || field2.deprecationReason) {
73925
+ prop.comments = [
73926
+ jsdocComment(field2.description ?? "", field2.deprecationReason ?? void 0)
73927
+ ];
73928
+ }
74020
73929
  return prop;
74021
73930
  })
74022
73931
  ]);
@@ -74068,7 +73977,7 @@ function inlineType({
74068
73977
  }
74069
73978
  }
74070
73979
  }
74071
- if (objectType.type === "TSTypeLiteral" && !graphql20.isInterfaceType(fragmentRootType) && !graphql20.isUnionType(fragmentRootType)) {
73980
+ if (objectType.type === "TSTypeLiteral" && !graphql19.isInterfaceType(fragmentRootType) && !graphql19.isUnionType(fragmentRootType)) {
74072
73981
  const existingTypenameIndex = objectType.members.findIndex(
74073
73982
  (member) => member.type === "TSPropertySignature" && member.key.type === "Identifier" && member.key.name === "__typename"
74074
73983
  );
@@ -74093,11 +74002,11 @@ function inlineType({
74093
74002
  ];
74094
74003
  }
74095
74004
  let coveredTypenames;
74096
- if (graphql20.isInterfaceType(fragmentRootType)) {
74005
+ if (graphql19.isInterfaceType(fragmentRootType)) {
74097
74006
  coveredTypenames = interfaceCoveredTypenames(fragmentRootType);
74098
- } else if (graphql20.isUnionType(fragmentRootType)) {
74007
+ } else if (graphql19.isUnionType(fragmentRootType)) {
74099
74008
  coveredTypenames = fragmentRootType.getTypes().map((type2) => type2.name);
74100
- } else if (graphql20.isObjectType(fragmentRootType)) {
74009
+ } else if (graphql19.isObjectType(fragmentRootType)) {
74101
74010
  coveredTypenames = [fragmentRootType.name];
74102
74011
  } else {
74103
74012
  throw Error("unreachable code");
@@ -74133,7 +74042,7 @@ function inlineType({
74133
74042
  );
74134
74043
  }
74135
74044
  );
74136
- const parentIsUnionOrInterface = !graphql20.isInterfaceType(type) && !graphql20.isUnionType(type);
74045
+ const parentIsUnionOrInterface = !graphql19.isInterfaceType(type) && !graphql19.isUnionType(type);
74137
74046
  const possibleTypenames = parentIsUnionOrInterface ? [parent.name] : config2.schema.getPossibleTypes(type).map((type2) => type2.name);
74138
74047
  const coveredTypenames = new Set(
74139
74048
  Object.values(inlineFragmentSelections).flatMap((sel) => sel.coveredTypenames)
@@ -74200,7 +74109,7 @@ function selectionTypeInfo(schema, filepath, rootType, selection) {
74200
74109
  },
74201
74110
  type: schema.getType("String")
74202
74111
  };
74203
- } else if (graphql20.isNonNullType(rootType) && "getFields" in rootType.ofType) {
74112
+ } else if (graphql19.isNonNullType(rootType) && "getFields" in rootType.ofType) {
74204
74113
  fields = rootType.ofType.getFields();
74205
74114
  } else {
74206
74115
  fields = rootType.getFields();
@@ -74212,7 +74121,7 @@ function selectionTypeInfo(schema, filepath, rootType, selection) {
74212
74121
  message: `Could not find type information for field ${rootType.toString()}.${selectionName} ${field}`
74213
74122
  });
74214
74123
  }
74215
- const fieldType = graphql20.getNamedType(field.type);
74124
+ const fieldType = graphql19.getNamedType(field.type);
74216
74125
  if (!fieldType) {
74217
74126
  throw new HoudiniError({
74218
74127
  filepath,
@@ -74720,7 +74629,7 @@ async function generateFragmentTypeDefs(config2, filepath, body, selections, def
74720
74629
  }
74721
74630
 
74722
74631
  // src/codegen/generators/typescript/imperativeTypeDef.ts
74723
- var graphql21 = __toESM(require("graphql"), 1);
74632
+ var graphql20 = __toESM(require("graphql"), 1);
74724
74633
  var recast12 = __toESM(require_main2(), 1);
74725
74634
  var AST12 = recast12.types.builders;
74726
74635
  async function imperativeCacheTypef(config2, docs) {
@@ -74772,7 +74681,7 @@ function typeDefinitions(config2, filepath, body, docs, returnType) {
74772
74681
  const operationTypes = [config2.schema.getMutationType(), config2.schema.getSubscriptionType()].filter(Boolean).map((type) => type?.name);
74773
74682
  const visitedTypes = /* @__PURE__ */ new Set();
74774
74683
  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)
74684
+ (type) => !graphql20.isAbstractType(type) && !graphql20.isScalarType(type) && !graphql20.isEnumType(type) && !graphql20.isInputObjectType(type) && !type.name.startsWith("__") && !operationTypes.includes(type.name)
74776
74685
  );
74777
74686
  const fragmentMap = fragmentListMap(
74778
74687
  config2,
@@ -74789,7 +74698,7 @@ function typeDefinitions(config2, filepath, body, docs, returnType) {
74789
74698
  }
74790
74699
  let idFields = AST12.tsNeverKeyword();
74791
74700
  const keys2 = keyFieldsForType(config2.configFile, type.name);
74792
- if (graphql21.isObjectType(type) && keys2.length > 0 && keys2.every((key) => type.getFields()[key])) {
74701
+ if (graphql20.isObjectType(type) && keys2.length > 0 && keys2.every((key) => type.getFields()[key])) {
74793
74702
  idFields = AST12.tsTypeLiteral(
74794
74703
  keys2.map((key) => {
74795
74704
  const fieldType = type.getFields()[key];
@@ -74816,13 +74725,13 @@ function typeDefinitions(config2, filepath, body, docs, returnType) {
74816
74725
  idFields = AST12.tsTypeLiteral([]);
74817
74726
  }
74818
74727
  let fields = AST12.tsTypeLiteral([]);
74819
- if (graphql21.isObjectType(type)) {
74728
+ if (graphql20.isObjectType(type)) {
74820
74729
  fields = AST12.tsTypeLiteral(
74821
74730
  Object.entries(type.getFields()).map(
74822
74731
  ([key, fieldType]) => {
74823
74732
  const unwrapped = unwrapType(config2, fieldType.type);
74824
74733
  let typeOptions = AST12.tsUnionType([]);
74825
- if (graphql21.isScalarType(unwrapped.type)) {
74734
+ if (graphql20.isScalarType(unwrapped.type)) {
74826
74735
  typeOptions.types.push(
74827
74736
  scalarPropertyValue(
74828
74737
  config2,
@@ -74836,11 +74745,11 @@ function typeDefinitions(config2, filepath, body, docs, returnType) {
74836
74745
  }
74837
74746
  )
74838
74747
  );
74839
- } else if (graphql21.isEnumType(unwrapped.type)) {
74748
+ } else if (graphql20.isEnumType(unwrapped.type)) {
74840
74749
  typeOptions.types.push(
74841
74750
  AST12.tsTypeReference(AST12.identifier(unwrapped.type.name))
74842
74751
  );
74843
- } else if (!graphql21.isAbstractType(unwrapped.type)) {
74752
+ } else if (!graphql20.isAbstractType(unwrapped.type)) {
74844
74753
  typeOptions.types.push(record(unwrapped.type.name));
74845
74754
  } else {
74846
74755
  typeOptions.types.push(
@@ -74936,7 +74845,7 @@ function listDefinitions(config2, filepath, body, docs) {
74936
74845
  const lists = [];
74937
74846
  const visitedLists = /* @__PURE__ */ new Set();
74938
74847
  for (const doc of docs) {
74939
- graphql21.visit(doc.document, {
74848
+ graphql20.visit(doc.document, {
74940
74849
  Directive(node, key, parent2, path3, ancestors) {
74941
74850
  if (![config2.listDirective, config2.paginateDirective].includes(node.name.value)) {
74942
74851
  return;
@@ -74958,7 +74867,7 @@ function listDefinitions(config2, filepath, body, docs) {
74958
74867
  const targetFieldDefinition = parentType.getFields()[targetField.name.value];
74959
74868
  const { type: listType } = unwrapType(config2, targetFieldDefinition.type);
74960
74869
  const possibleTypes = [];
74961
- if (graphql21.isAbstractType(listType)) {
74870
+ if (graphql20.isAbstractType(listType)) {
74962
74871
  possibleTypes.push(
74963
74872
  ...config2.schema.getPossibleTypes(listType).map((possible) => possible.name)
74964
74873
  );
@@ -75120,7 +75029,7 @@ async function typescriptGenerator(config2, docs) {
75120
75029
  }
75121
75030
 
75122
75031
  // src/codegen/generators/persistedQueries/index.ts
75123
- var graphql22 = __toESM(require("graphql"), 1);
75032
+ var graphql21 = __toESM(require("graphql"), 1);
75124
75033
  async function persistOutputGenerator(config2, docs) {
75125
75034
  if (!config2.persistedQueriesPath.endsWith(".json")) {
75126
75035
  throw new Error('Can write Persisted Queries only in a ".json" file.');
@@ -75130,8 +75039,8 @@ async function persistOutputGenerator(config2, docs) {
75130
75039
  if (!generateArtifact) {
75131
75040
  return acc;
75132
75041
  }
75133
- let rawString = graphql22.print(
75134
- graphql22.visit(document, {
75042
+ let rawString = graphql21.print(
75043
+ graphql21.visit(document, {
75135
75044
  Directive(node) {
75136
75045
  if (config2.isInternalDirective(node.name.value)) {
75137
75046
  return null;
@@ -75140,7 +75049,7 @@ async function persistOutputGenerator(config2, docs) {
75140
75049
  })
75141
75050
  );
75142
75051
  const operations = document.definitions.filter(
75143
- ({ kind }) => kind === graphql22.Kind.OPERATION_DEFINITION
75052
+ ({ kind }) => kind === graphql21.Kind.OPERATION_DEFINITION
75144
75053
  );
75145
75054
  if (operations.length > 0 && operations[0].kind === "OperationDefinition") {
75146
75055
  if (artifact) {
@@ -75155,33 +75064,45 @@ async function persistOutputGenerator(config2, docs) {
75155
75064
  }
75156
75065
 
75157
75066
  // src/codegen/generators/definitions/index.ts
75158
- var graphql24 = __toESM(require("graphql"), 1);
75067
+ var graphql23 = __toESM(require("graphql"), 1);
75159
75068
 
75160
75069
  // src/codegen/generators/definitions/enums.ts
75161
- var graphql23 = __toESM(require("graphql"), 1);
75070
+ var graphql22 = __toESM(require("graphql"), 1);
75162
75071
  var recast13 = __toESM(require_main2(), 1);
75163
75072
  var AST13 = recast13.types.builders;
75164
75073
  async function definitionsGenerator(config2) {
75165
- const enums = graphql23.parse(graphql23.printSchema(config2.schema)).definitions.filter(
75074
+ const enums = graphql22.parse(graphql22.printSchema(config2.schema)).definitions.filter(
75166
75075
  (definition) => definition.kind === "EnumTypeDefinition"
75167
75076
  ).filter((def) => !config2.isInternalEnum(def));
75168
75077
  const { code: runtimeDefinitions } = await printJS(
75169
75078
  AST13.program(
75170
75079
  enums.map((defn) => {
75171
75080
  const name = defn.name.value;
75172
- return moduleExport(
75081
+ const declaration = moduleExport(
75173
75082
  config2,
75174
75083
  name,
75175
75084
  AST13.objectExpression(
75176
75085
  defn.values?.map((value) => {
75177
75086
  const str = value.name.value;
75178
- return AST13.objectProperty(
75087
+ const prop = AST13.objectProperty(
75179
75088
  AST13.stringLiteral(str),
75180
75089
  AST13.stringLiteral(str)
75181
75090
  );
75091
+ const deprecationReason = value.directives?.find((d) => d.name.value === "deprecated")?.arguments?.find((a) => a.name.value === "reason")?.value?.value;
75092
+ if (value.description || deprecationReason)
75093
+ prop.comments = [
75094
+ jsdocComment(value.description?.value ?? "", deprecationReason)
75095
+ ];
75096
+ return prop;
75182
75097
  }) || []
75183
75098
  )
75184
75099
  );
75100
+ if (defn.description) {
75101
+ declaration.comments = [
75102
+ AST13.commentBlock(`* ${defn.description.value} `, true, false)
75103
+ ];
75104
+ }
75105
+ return declaration;
75185
75106
  })
75186
75107
  )
75187
75108
  );
@@ -75190,11 +75111,19 @@ type ValuesOf<T> = T[keyof T]
75190
75111
  ` + enums.sort((a, b) => a.name.value.localeCompare(b.name.value)).map((definition) => {
75191
75112
  const name = definition.name.value;
75192
75113
  const values = definition.values;
75193
- return `
75114
+ let jsdoc = "";
75115
+ if (definition.description) {
75116
+ jsdoc = `
75117
+ /** ${definition.description.value} */`;
75118
+ }
75119
+ return `${jsdoc}
75194
75120
  export declare const ${name}: {
75195
- ${values?.map((value) => ` readonly ${value.name.value}: "${value.name.value}";`).join("\n")}
75121
+ ${values?.map(
75122
+ (value) => (value.description ? ` /** ${value.description.value} */
75123
+ ` : "") + ` readonly ${value.name.value}: "${value.name.value}";`
75124
+ ).join("\n")}
75196
75125
  }
75197
-
75126
+ ${jsdoc}
75198
75127
  export type ${name}$options = ValuesOf<typeof ${name}>
75199
75128
  `;
75200
75129
  }).join("");
@@ -75214,7 +75143,7 @@ async function schemaGenerator(config2) {
75214
75143
  await Promise.all([
75215
75144
  fs_exports.writeFile(
75216
75145
  config2.definitionsSchemaPath,
75217
- config2.localSchema ? graphql24.printSchema(config2.schema) : config2.newSchema
75146
+ config2.localSchema ? graphql23.printSchema(config2.schema) : config2.newSchema
75218
75147
  ),
75219
75148
  fs_exports.writeFile(config2.definitionsDocumentsPath, config2.newDocuments),
75220
75149
  definitionsGenerator(config2)
@@ -75259,7 +75188,7 @@ async function writeIndexFile2(config2, docs) {
75259
75188
  }
75260
75189
 
75261
75190
  // ../../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");
75191
+ var import_graphql33 = require("graphql");
75263
75192
  function compareStrings2(a, b) {
75264
75193
  if (String(a) < String(b)) {
75265
75194
  return -1;
@@ -75295,7 +75224,7 @@ function isSome2(input) {
75295
75224
  }
75296
75225
 
75297
75226
  // ../../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");
75227
+ var import_graphql34 = require("graphql");
75299
75228
  var MAX_RECURSIVE_DEPTH2 = 3;
75300
75229
  function inspect2(value) {
75301
75230
  return formatValue2(value, []);
@@ -75313,7 +75242,7 @@ function formatValue2(value, seenValues) {
75313
75242
  }
75314
75243
  }
75315
75244
  function formatError2(value) {
75316
- if (value instanceof import_graphql33.GraphQLError) {
75245
+ if (value instanceof import_graphql34.GraphQLError) {
75317
75246
  return value.toString();
75318
75247
  }
75319
75248
  return `${value.name}: ${value.message};
@@ -75396,43 +75325,43 @@ function getDirectivesInExtensions2(node, pathToDirectivesInExtensions = ["direc
75396
75325
  }
75397
75326
 
75398
75327
  // ../../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");
75328
+ var import_graphql38 = require("graphql");
75400
75329
 
75401
75330
  // ../../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");
75331
+ var import_graphql35 = require("graphql");
75403
75332
  function astFromType2(type) {
75404
- if ((0, import_graphql34.isNonNullType)(type)) {
75333
+ if ((0, import_graphql35.isNonNullType)(type)) {
75405
75334
  const innerType = astFromType2(type.ofType);
75406
- if (innerType.kind === import_graphql34.Kind.NON_NULL_TYPE) {
75335
+ if (innerType.kind === import_graphql35.Kind.NON_NULL_TYPE) {
75407
75336
  throw new Error(`Invalid type node ${inspect2(type)}. Inner type of non-null type cannot be a non-null type.`);
75408
75337
  }
75409
75338
  return {
75410
- kind: import_graphql34.Kind.NON_NULL_TYPE,
75339
+ kind: import_graphql35.Kind.NON_NULL_TYPE,
75411
75340
  type: innerType
75412
75341
  };
75413
- } else if ((0, import_graphql34.isListType)(type)) {
75342
+ } else if ((0, import_graphql35.isListType)(type)) {
75414
75343
  return {
75415
- kind: import_graphql34.Kind.LIST_TYPE,
75344
+ kind: import_graphql35.Kind.LIST_TYPE,
75416
75345
  type: astFromType2(type.ofType)
75417
75346
  };
75418
75347
  }
75419
75348
  return {
75420
- kind: import_graphql34.Kind.NAMED_TYPE,
75349
+ kind: import_graphql35.Kind.NAMED_TYPE,
75421
75350
  name: {
75422
- kind: import_graphql34.Kind.NAME,
75351
+ kind: import_graphql35.Kind.NAME,
75423
75352
  value: type.name
75424
75353
  }
75425
75354
  };
75426
75355
  }
75427
75356
 
75428
75357
  // ../../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");
75358
+ var import_graphql37 = require("graphql");
75430
75359
 
75431
75360
  // ../../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");
75361
+ var import_graphql36 = require("graphql");
75433
75362
  function astFromValueUntyped2(value) {
75434
75363
  if (value === null) {
75435
- return { kind: import_graphql35.Kind.NULL };
75364
+ return { kind: import_graphql36.Kind.NULL };
75436
75365
  }
75437
75366
  if (value === void 0) {
75438
75367
  return null;
@@ -75445,7 +75374,7 @@ function astFromValueUntyped2(value) {
75445
75374
  valuesNodes.push(itemNode);
75446
75375
  }
75447
75376
  }
75448
- return { kind: import_graphql35.Kind.LIST, values: valuesNodes };
75377
+ return { kind: import_graphql36.Kind.LIST, values: valuesNodes };
75449
75378
  }
75450
75379
  if (typeof value === "object") {
75451
75380
  const fieldNodes = [];
@@ -75454,26 +75383,26 @@ function astFromValueUntyped2(value) {
75454
75383
  const ast = astFromValueUntyped2(fieldValue);
75455
75384
  if (ast) {
75456
75385
  fieldNodes.push({
75457
- kind: import_graphql35.Kind.OBJECT_FIELD,
75458
- name: { kind: import_graphql35.Kind.NAME, value: fieldName },
75386
+ kind: import_graphql36.Kind.OBJECT_FIELD,
75387
+ name: { kind: import_graphql36.Kind.NAME, value: fieldName },
75459
75388
  value: ast
75460
75389
  });
75461
75390
  }
75462
75391
  }
75463
- return { kind: import_graphql35.Kind.OBJECT, fields: fieldNodes };
75392
+ return { kind: import_graphql36.Kind.OBJECT, fields: fieldNodes };
75464
75393
  }
75465
75394
  if (typeof value === "boolean") {
75466
- return { kind: import_graphql35.Kind.BOOLEAN, value };
75395
+ return { kind: import_graphql36.Kind.BOOLEAN, value };
75467
75396
  }
75468
75397
  if (typeof value === "bigint") {
75469
- return { kind: import_graphql35.Kind.INT, value: String(value) };
75398
+ return { kind: import_graphql36.Kind.INT, value: String(value) };
75470
75399
  }
75471
75400
  if (typeof value === "number" && isFinite(value)) {
75472
75401
  const stringNum = String(value);
75473
- return integerStringRegExp2.test(stringNum) ? { kind: import_graphql35.Kind.INT, value: stringNum } : { kind: import_graphql35.Kind.FLOAT, value: stringNum };
75402
+ return integerStringRegExp2.test(stringNum) ? { kind: import_graphql36.Kind.INT, value: stringNum } : { kind: import_graphql36.Kind.FLOAT, value: stringNum };
75474
75403
  }
75475
75404
  if (typeof value === "string") {
75476
- return { kind: import_graphql35.Kind.STRING, value };
75405
+ return { kind: import_graphql36.Kind.STRING, value };
75477
75406
  }
75478
75407
  throw new TypeError(`Cannot convert value to AST: ${value}.`);
75479
75408
  }
@@ -75481,20 +75410,20 @@ var integerStringRegExp2 = /^-?(?:0|[1-9][0-9]*)$/;
75481
75410
 
75482
75411
  // ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/astFromValue.js
75483
75412
  function astFromValue2(value, type) {
75484
- if ((0, import_graphql36.isNonNullType)(type)) {
75413
+ if ((0, import_graphql37.isNonNullType)(type)) {
75485
75414
  const astValue = astFromValue2(value, type.ofType);
75486
- if (astValue?.kind === import_graphql36.Kind.NULL) {
75415
+ if (astValue?.kind === import_graphql37.Kind.NULL) {
75487
75416
  return null;
75488
75417
  }
75489
75418
  return astValue;
75490
75419
  }
75491
75420
  if (value === null) {
75492
- return { kind: import_graphql36.Kind.NULL };
75421
+ return { kind: import_graphql37.Kind.NULL };
75493
75422
  }
75494
75423
  if (value === void 0) {
75495
75424
  return null;
75496
75425
  }
75497
- if ((0, import_graphql36.isListType)(type)) {
75426
+ if ((0, import_graphql37.isListType)(type)) {
75498
75427
  const itemType = type.ofType;
75499
75428
  if (isIterableObject(value)) {
75500
75429
  const valuesNodes = [];
@@ -75504,11 +75433,11 @@ function astFromValue2(value, type) {
75504
75433
  valuesNodes.push(itemNode);
75505
75434
  }
75506
75435
  }
75507
- return { kind: import_graphql36.Kind.LIST, values: valuesNodes };
75436
+ return { kind: import_graphql37.Kind.LIST, values: valuesNodes };
75508
75437
  }
75509
75438
  return astFromValue2(value, itemType);
75510
75439
  }
75511
- if ((0, import_graphql36.isInputObjectType)(type)) {
75440
+ if ((0, import_graphql37.isInputObjectType)(type)) {
75512
75441
  if (!isObjectLike(value)) {
75513
75442
  return null;
75514
75443
  }
@@ -75517,24 +75446,24 @@ function astFromValue2(value, type) {
75517
75446
  const fieldValue = astFromValue2(value[field.name], field.type);
75518
75447
  if (fieldValue) {
75519
75448
  fieldNodes.push({
75520
- kind: import_graphql36.Kind.OBJECT_FIELD,
75521
- name: { kind: import_graphql36.Kind.NAME, value: field.name },
75449
+ kind: import_graphql37.Kind.OBJECT_FIELD,
75450
+ name: { kind: import_graphql37.Kind.NAME, value: field.name },
75522
75451
  value: fieldValue
75523
75452
  });
75524
75453
  }
75525
75454
  }
75526
- return { kind: import_graphql36.Kind.OBJECT, fields: fieldNodes };
75455
+ return { kind: import_graphql37.Kind.OBJECT, fields: fieldNodes };
75527
75456
  }
75528
- if ((0, import_graphql36.isLeafType)(type)) {
75457
+ if ((0, import_graphql37.isLeafType)(type)) {
75529
75458
  const serialized = type.serialize(value);
75530
75459
  if (serialized == null) {
75531
75460
  return null;
75532
75461
  }
75533
- if ((0, import_graphql36.isEnumType)(type)) {
75534
- return { kind: import_graphql36.Kind.ENUM, value: serialized };
75462
+ if ((0, import_graphql37.isEnumType)(type)) {
75463
+ return { kind: import_graphql37.Kind.ENUM, value: serialized };
75535
75464
  }
75536
75465
  if (type.name === "ID" && typeof serialized === "string" && integerStringRegExp3.test(serialized)) {
75537
- return { kind: import_graphql36.Kind.INT, value: serialized };
75466
+ return { kind: import_graphql37.Kind.INT, value: serialized };
75538
75467
  }
75539
75468
  return astFromValueUntyped2(serialized);
75540
75469
  }
@@ -75590,36 +75519,36 @@ function getDocumentNodeFromSchema2(schema, options = {}) {
75590
75519
  const definitions = schemaNode != null ? [schemaNode] : [];
75591
75520
  const directives = schema.getDirectives();
75592
75521
  for (const directive of directives) {
75593
- if ((0, import_graphql37.isSpecifiedDirective)(directive)) {
75522
+ if ((0, import_graphql38.isSpecifiedDirective)(directive)) {
75594
75523
  continue;
75595
75524
  }
75596
75525
  definitions.push(astFromDirective2(directive, schema, pathToDirectivesInExtensions));
75597
75526
  }
75598
75527
  for (const typeName in typesMap) {
75599
75528
  const type = typesMap[typeName];
75600
- const isPredefinedScalar = (0, import_graphql37.isSpecifiedScalarType)(type);
75601
- const isIntrospection = (0, import_graphql37.isIntrospectionType)(type);
75529
+ const isPredefinedScalar = (0, import_graphql38.isSpecifiedScalarType)(type);
75530
+ const isIntrospection = (0, import_graphql38.isIntrospectionType)(type);
75602
75531
  if (isPredefinedScalar || isIntrospection) {
75603
75532
  continue;
75604
75533
  }
75605
- if ((0, import_graphql37.isObjectType)(type)) {
75534
+ if ((0, import_graphql38.isObjectType)(type)) {
75606
75535
  definitions.push(astFromObjectType2(type, schema, pathToDirectivesInExtensions));
75607
- } else if ((0, import_graphql37.isInterfaceType)(type)) {
75536
+ } else if ((0, import_graphql38.isInterfaceType)(type)) {
75608
75537
  definitions.push(astFromInterfaceType2(type, schema, pathToDirectivesInExtensions));
75609
- } else if ((0, import_graphql37.isUnionType)(type)) {
75538
+ } else if ((0, import_graphql38.isUnionType)(type)) {
75610
75539
  definitions.push(astFromUnionType2(type, schema, pathToDirectivesInExtensions));
75611
- } else if ((0, import_graphql37.isInputObjectType)(type)) {
75540
+ } else if ((0, import_graphql38.isInputObjectType)(type)) {
75612
75541
  definitions.push(astFromInputObjectType2(type, schema, pathToDirectivesInExtensions));
75613
- } else if ((0, import_graphql37.isEnumType)(type)) {
75542
+ } else if ((0, import_graphql38.isEnumType)(type)) {
75614
75543
  definitions.push(astFromEnumType2(type, schema, pathToDirectivesInExtensions));
75615
- } else if ((0, import_graphql37.isScalarType)(type)) {
75544
+ } else if ((0, import_graphql38.isScalarType)(type)) {
75616
75545
  definitions.push(astFromScalarType2(type, schema, pathToDirectivesInExtensions));
75617
75546
  } else {
75618
75547
  throw new Error(`Unknown type ${type}.`);
75619
75548
  }
75620
75549
  }
75621
75550
  return {
75622
- kind: import_graphql37.Kind.DOCUMENT,
75551
+ kind: import_graphql38.Kind.DOCUMENT,
75623
75552
  definitions
75624
75553
  };
75625
75554
  }
@@ -75654,7 +75583,7 @@ function astFromSchema2(schema, pathToDirectivesInExtensions) {
75654
75583
  operationTypeDefinitionNode.type = rootTypeAST;
75655
75584
  } else {
75656
75585
  operationTypeMap.set(operationTypeNode, {
75657
- kind: import_graphql37.Kind.OPERATION_TYPE_DEFINITION,
75586
+ kind: import_graphql38.Kind.OPERATION_TYPE_DEFINITION,
75658
75587
  operation: operationTypeNode,
75659
75588
  type: rootTypeAST
75660
75589
  });
@@ -75667,12 +75596,12 @@ function astFromSchema2(schema, pathToDirectivesInExtensions) {
75667
75596
  return null;
75668
75597
  }
75669
75598
  const schemaNode = {
75670
- kind: operationTypes != null ? import_graphql37.Kind.SCHEMA_DEFINITION : import_graphql37.Kind.SCHEMA_EXTENSION,
75599
+ kind: operationTypes != null ? import_graphql38.Kind.SCHEMA_DEFINITION : import_graphql38.Kind.SCHEMA_EXTENSION,
75671
75600
  operationTypes,
75672
75601
  directives
75673
75602
  };
75674
75603
  schemaNode.description = schema.astNode?.description ?? schema.description != null ? {
75675
- kind: import_graphql37.Kind.STRING,
75604
+ kind: import_graphql38.Kind.STRING,
75676
75605
  value: schema.description,
75677
75606
  block: true
75678
75607
  } : void 0;
@@ -75680,19 +75609,19 @@ function astFromSchema2(schema, pathToDirectivesInExtensions) {
75680
75609
  }
75681
75610
  function astFromDirective2(directive, schema, pathToDirectivesInExtensions) {
75682
75611
  return {
75683
- kind: import_graphql37.Kind.DIRECTIVE_DEFINITION,
75612
+ kind: import_graphql38.Kind.DIRECTIVE_DEFINITION,
75684
75613
  description: directive.astNode?.description ?? (directive.description ? {
75685
- kind: import_graphql37.Kind.STRING,
75614
+ kind: import_graphql38.Kind.STRING,
75686
75615
  value: directive.description
75687
75616
  } : void 0),
75688
75617
  name: {
75689
- kind: import_graphql37.Kind.NAME,
75618
+ kind: import_graphql38.Kind.NAME,
75690
75619
  value: directive.name
75691
75620
  },
75692
75621
  arguments: directive.args?.map((arg) => astFromArg2(arg, schema, pathToDirectivesInExtensions)),
75693
75622
  repeatable: directive.isRepeatable,
75694
75623
  locations: directive.locations?.map((location) => ({
75695
- kind: import_graphql37.Kind.NAME,
75624
+ kind: import_graphql38.Kind.NAME,
75696
75625
  value: location
75697
75626
  })) || []
75698
75627
  };
@@ -75742,14 +75671,14 @@ function getDeprecatableDirectiveNodes2(entity, schema, pathToDirectivesInExtens
75742
75671
  }
75743
75672
  function astFromArg2(arg, schema, pathToDirectivesInExtensions) {
75744
75673
  return {
75745
- kind: import_graphql37.Kind.INPUT_VALUE_DEFINITION,
75674
+ kind: import_graphql38.Kind.INPUT_VALUE_DEFINITION,
75746
75675
  description: arg.astNode?.description ?? (arg.description ? {
75747
- kind: import_graphql37.Kind.STRING,
75676
+ kind: import_graphql38.Kind.STRING,
75748
75677
  value: arg.description,
75749
75678
  block: true
75750
75679
  } : void 0),
75751
75680
  name: {
75752
- kind: import_graphql37.Kind.NAME,
75681
+ kind: import_graphql38.Kind.NAME,
75753
75682
  value: arg.name
75754
75683
  },
75755
75684
  type: astFromType2(arg.type),
@@ -75759,14 +75688,14 @@ function astFromArg2(arg, schema, pathToDirectivesInExtensions) {
75759
75688
  }
75760
75689
  function astFromObjectType2(type, schema, pathToDirectivesInExtensions) {
75761
75690
  return {
75762
- kind: import_graphql37.Kind.OBJECT_TYPE_DEFINITION,
75691
+ kind: import_graphql38.Kind.OBJECT_TYPE_DEFINITION,
75763
75692
  description: type.astNode?.description ?? (type.description ? {
75764
- kind: import_graphql37.Kind.STRING,
75693
+ kind: import_graphql38.Kind.STRING,
75765
75694
  value: type.description,
75766
75695
  block: true
75767
75696
  } : void 0),
75768
75697
  name: {
75769
- kind: import_graphql37.Kind.NAME,
75698
+ kind: import_graphql38.Kind.NAME,
75770
75699
  value: type.name
75771
75700
  },
75772
75701
  fields: Object.values(type.getFields()).map((field) => astFromField2(field, schema, pathToDirectivesInExtensions)),
@@ -75776,14 +75705,14 @@ function astFromObjectType2(type, schema, pathToDirectivesInExtensions) {
75776
75705
  }
75777
75706
  function astFromInterfaceType2(type, schema, pathToDirectivesInExtensions) {
75778
75707
  const node = {
75779
- kind: import_graphql37.Kind.INTERFACE_TYPE_DEFINITION,
75708
+ kind: import_graphql38.Kind.INTERFACE_TYPE_DEFINITION,
75780
75709
  description: type.astNode?.description ?? (type.description ? {
75781
- kind: import_graphql37.Kind.STRING,
75710
+ kind: import_graphql38.Kind.STRING,
75782
75711
  value: type.description,
75783
75712
  block: true
75784
75713
  } : void 0),
75785
75714
  name: {
75786
- kind: import_graphql37.Kind.NAME,
75715
+ kind: import_graphql38.Kind.NAME,
75787
75716
  value: type.name
75788
75717
  },
75789
75718
  fields: Object.values(type.getFields()).map((field) => astFromField2(field, schema, pathToDirectivesInExtensions)),
@@ -75796,14 +75725,14 @@ function astFromInterfaceType2(type, schema, pathToDirectivesInExtensions) {
75796
75725
  }
75797
75726
  function astFromUnionType2(type, schema, pathToDirectivesInExtensions) {
75798
75727
  return {
75799
- kind: import_graphql37.Kind.UNION_TYPE_DEFINITION,
75728
+ kind: import_graphql38.Kind.UNION_TYPE_DEFINITION,
75800
75729
  description: type.astNode?.description ?? (type.description ? {
75801
- kind: import_graphql37.Kind.STRING,
75730
+ kind: import_graphql38.Kind.STRING,
75802
75731
  value: type.description,
75803
75732
  block: true
75804
75733
  } : void 0),
75805
75734
  name: {
75806
- kind: import_graphql37.Kind.NAME,
75735
+ kind: import_graphql38.Kind.NAME,
75807
75736
  value: type.name
75808
75737
  },
75809
75738
  directives: getDirectiveNodes2(type, schema, pathToDirectivesInExtensions),
@@ -75812,14 +75741,14 @@ function astFromUnionType2(type, schema, pathToDirectivesInExtensions) {
75812
75741
  }
75813
75742
  function astFromInputObjectType2(type, schema, pathToDirectivesInExtensions) {
75814
75743
  return {
75815
- kind: import_graphql37.Kind.INPUT_OBJECT_TYPE_DEFINITION,
75744
+ kind: import_graphql38.Kind.INPUT_OBJECT_TYPE_DEFINITION,
75816
75745
  description: type.astNode?.description ?? (type.description ? {
75817
- kind: import_graphql37.Kind.STRING,
75746
+ kind: import_graphql38.Kind.STRING,
75818
75747
  value: type.description,
75819
75748
  block: true
75820
75749
  } : void 0),
75821
75750
  name: {
75822
- kind: import_graphql37.Kind.NAME,
75751
+ kind: import_graphql38.Kind.NAME,
75823
75752
  value: type.name
75824
75753
  },
75825
75754
  fields: Object.values(type.getFields()).map((field) => astFromInputField2(field, schema, pathToDirectivesInExtensions)),
@@ -75828,14 +75757,14 @@ function astFromInputObjectType2(type, schema, pathToDirectivesInExtensions) {
75828
75757
  }
75829
75758
  function astFromEnumType2(type, schema, pathToDirectivesInExtensions) {
75830
75759
  return {
75831
- kind: import_graphql37.Kind.ENUM_TYPE_DEFINITION,
75760
+ kind: import_graphql38.Kind.ENUM_TYPE_DEFINITION,
75832
75761
  description: type.astNode?.description ?? (type.description ? {
75833
- kind: import_graphql37.Kind.STRING,
75762
+ kind: import_graphql38.Kind.STRING,
75834
75763
  value: type.description,
75835
75764
  block: true
75836
75765
  } : void 0),
75837
75766
  name: {
75838
- kind: import_graphql37.Kind.NAME,
75767
+ kind: import_graphql38.Kind.NAME,
75839
75768
  value: type.name
75840
75769
  },
75841
75770
  values: Object.values(type.getValues()).map((value) => astFromEnumValue2(value, schema, pathToDirectivesInExtensions)),
@@ -75853,14 +75782,14 @@ function astFromScalarType2(type, schema, pathToDirectivesInExtensions) {
75853
75782
  directives.push(makeDirectiveNode2("specifiedBy", specifiedByArgs));
75854
75783
  }
75855
75784
  return {
75856
- kind: import_graphql37.Kind.SCALAR_TYPE_DEFINITION,
75785
+ kind: import_graphql38.Kind.SCALAR_TYPE_DEFINITION,
75857
75786
  description: type.astNode?.description ?? (type.description ? {
75858
- kind: import_graphql37.Kind.STRING,
75787
+ kind: import_graphql38.Kind.STRING,
75859
75788
  value: type.description,
75860
75789
  block: true
75861
75790
  } : void 0),
75862
75791
  name: {
75863
- kind: import_graphql37.Kind.NAME,
75792
+ kind: import_graphql38.Kind.NAME,
75864
75793
  value: type.name
75865
75794
  },
75866
75795
  directives
@@ -75868,14 +75797,14 @@ function astFromScalarType2(type, schema, pathToDirectivesInExtensions) {
75868
75797
  }
75869
75798
  function astFromField2(field, schema, pathToDirectivesInExtensions) {
75870
75799
  return {
75871
- kind: import_graphql37.Kind.FIELD_DEFINITION,
75800
+ kind: import_graphql38.Kind.FIELD_DEFINITION,
75872
75801
  description: field.astNode?.description ?? (field.description ? {
75873
- kind: import_graphql37.Kind.STRING,
75802
+ kind: import_graphql38.Kind.STRING,
75874
75803
  value: field.description,
75875
75804
  block: true
75876
75805
  } : void 0),
75877
75806
  name: {
75878
- kind: import_graphql37.Kind.NAME,
75807
+ kind: import_graphql38.Kind.NAME,
75879
75808
  value: field.name
75880
75809
  },
75881
75810
  arguments: field.args.map((arg) => astFromArg2(arg, schema, pathToDirectivesInExtensions)),
@@ -75885,14 +75814,14 @@ function astFromField2(field, schema, pathToDirectivesInExtensions) {
75885
75814
  }
75886
75815
  function astFromInputField2(field, schema, pathToDirectivesInExtensions) {
75887
75816
  return {
75888
- kind: import_graphql37.Kind.INPUT_VALUE_DEFINITION,
75817
+ kind: import_graphql38.Kind.INPUT_VALUE_DEFINITION,
75889
75818
  description: field.astNode?.description ?? (field.description ? {
75890
- kind: import_graphql37.Kind.STRING,
75819
+ kind: import_graphql38.Kind.STRING,
75891
75820
  value: field.description,
75892
75821
  block: true
75893
75822
  } : void 0),
75894
75823
  name: {
75895
- kind: import_graphql37.Kind.NAME,
75824
+ kind: import_graphql38.Kind.NAME,
75896
75825
  value: field.name
75897
75826
  },
75898
75827
  type: astFromType2(field.type),
@@ -75902,21 +75831,21 @@ function astFromInputField2(field, schema, pathToDirectivesInExtensions) {
75902
75831
  }
75903
75832
  function astFromEnumValue2(value, schema, pathToDirectivesInExtensions) {
75904
75833
  return {
75905
- kind: import_graphql37.Kind.ENUM_VALUE_DEFINITION,
75834
+ kind: import_graphql38.Kind.ENUM_VALUE_DEFINITION,
75906
75835
  description: value.astNode?.description ?? (value.description ? {
75907
- kind: import_graphql37.Kind.STRING,
75836
+ kind: import_graphql38.Kind.STRING,
75908
75837
  value: value.description,
75909
75838
  block: true
75910
75839
  } : void 0),
75911
75840
  name: {
75912
- kind: import_graphql37.Kind.NAME,
75841
+ kind: import_graphql38.Kind.NAME,
75913
75842
  value: value.name
75914
75843
  },
75915
75844
  directives: getDeprecatableDirectiveNodes2(value, schema, pathToDirectivesInExtensions)
75916
75845
  };
75917
75846
  }
75918
75847
  function makeDeprecatedDirective2(deprecationReason) {
75919
- return makeDirectiveNode2("deprecated", { reason: deprecationReason }, import_graphql37.GraphQLDeprecatedDirective);
75848
+ return makeDirectiveNode2("deprecated", { reason: deprecationReason }, import_graphql38.GraphQLDeprecatedDirective);
75920
75849
  }
75921
75850
  function makeDirectiveNode2(name, args, directive) {
75922
75851
  const directiveArguments = [];
@@ -75928,9 +75857,9 @@ function makeDirectiveNode2(name, args, directive) {
75928
75857
  const value = astFromValue2(argValue, arg.type);
75929
75858
  if (value) {
75930
75859
  directiveArguments.push({
75931
- kind: import_graphql37.Kind.ARGUMENT,
75860
+ kind: import_graphql38.Kind.ARGUMENT,
75932
75861
  name: {
75933
- kind: import_graphql37.Kind.NAME,
75862
+ kind: import_graphql38.Kind.NAME,
75934
75863
  value: argName
75935
75864
  },
75936
75865
  value
@@ -75944,9 +75873,9 @@ function makeDirectiveNode2(name, args, directive) {
75944
75873
  const value = astFromValueUntyped2(argValue);
75945
75874
  if (value) {
75946
75875
  directiveArguments.push({
75947
- kind: import_graphql37.Kind.ARGUMENT,
75876
+ kind: import_graphql38.Kind.ARGUMENT,
75948
75877
  name: {
75949
- kind: import_graphql37.Kind.NAME,
75878
+ kind: import_graphql38.Kind.NAME,
75950
75879
  value: argName
75951
75880
  },
75952
75881
  value
@@ -75955,9 +75884,9 @@ function makeDirectiveNode2(name, args, directive) {
75955
75884
  }
75956
75885
  }
75957
75886
  return {
75958
- kind: import_graphql37.Kind.DIRECTIVE,
75887
+ kind: import_graphql38.Kind.DIRECTIVE,
75959
75888
  name: {
75960
- kind: import_graphql37.Kind.NAME,
75889
+ kind: import_graphql38.Kind.NAME,
75961
75890
  value: name
75962
75891
  },
75963
75892
  arguments: directiveArguments
@@ -75980,7 +75909,7 @@ function makeDirectiveNodes2(schema, directiveValues) {
75980
75909
  }
75981
75910
 
75982
75911
  // ../../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");
75912
+ var import_graphql39 = require("graphql");
75984
75913
  var MAX_LINE_LENGTH2 = 80;
75985
75914
  var commentsRegistry2 = {};
75986
75915
  function resetComments2() {
@@ -76225,7 +76154,7 @@ var printDocASTReducerWithComments2 = Object.keys(printDocASTReducer2).reduce((p
76225
76154
  }
76226
76155
  }), {});
76227
76156
  function printWithComments2(ast) {
76228
- return (0, import_graphql38.visit)(ast, printDocASTReducerWithComments2);
76157
+ return (0, import_graphql39.visit)(ast, printDocASTReducerWithComments2);
76229
76158
  }
76230
76159
  function isFieldDefinitionNode2(node) {
76231
76160
  return node.kind === "FieldDefinition";
@@ -76244,7 +76173,7 @@ function getLeadingCommentBlock2(node) {
76244
76173
  }
76245
76174
  const comments = [];
76246
76175
  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) {
76176
+ 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
76177
  const value = String(token.value);
76249
76178
  comments.push(value);
76250
76179
  token = token.prev;
@@ -76296,9 +76225,9 @@ function isBlank2(str) {
76296
76225
  }
76297
76226
 
76298
76227
  // ../../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");
76228
+ var import_graphql40 = require("graphql");
76300
76229
  function isDocumentNode2(object) {
76301
- return object && typeof object === "object" && "kind" in object && object.kind === import_graphql39.Kind.DOCUMENT;
76230
+ return object && typeof object === "object" && "kind" in object && object.kind === import_graphql40.Kind.DOCUMENT;
76302
76231
  }
76303
76232
 
76304
76233
  // ../../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 +76251,7 @@ function deduplicateArguments2(args, config2) {
76322
76251
  }
76323
76252
 
76324
76253
  // ../../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");
76254
+ var import_graphql41 = require("graphql");
76326
76255
  function directiveAlreadyExists2(directivesArr, otherDirective) {
76327
76256
  return !!directivesArr.find((directive) => directive.name.value === otherDirective.name.value);
76328
76257
  }
@@ -76382,11 +76311,11 @@ function mergeDirectives2(d1 = [], d2 = [], config2, directives) {
76382
76311
  return result;
76383
76312
  }
76384
76313
  function validateInputs2(node, existingNode) {
76385
- const printedNode = (0, import_graphql40.print)({
76314
+ const printedNode = (0, import_graphql41.print)({
76386
76315
  ...node,
76387
76316
  description: void 0
76388
76317
  });
76389
- const printedExistingNode = (0, import_graphql40.print)({
76318
+ const printedExistingNode = (0, import_graphql41.print)({
76390
76319
  ...existingNode,
76391
76320
  description: void 0
76392
76321
  });
@@ -76453,7 +76382,7 @@ function mergeEnumValues2(first, second, config2, directives) {
76453
76382
  }
76454
76383
 
76455
76384
  // ../../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");
76385
+ var import_graphql42 = require("graphql");
76457
76386
  function mergeEnum2(e1, e2, config2, directives) {
76458
76387
  if (e2) {
76459
76388
  return {
@@ -76467,33 +76396,33 @@ function mergeEnum2(e1, e2, config2, directives) {
76467
76396
  }
76468
76397
  return config2?.convertExtensions ? {
76469
76398
  ...e1,
76470
- kind: import_graphql41.Kind.ENUM_TYPE_DEFINITION
76399
+ kind: import_graphql42.Kind.ENUM_TYPE_DEFINITION
76471
76400
  } : e1;
76472
76401
  }
76473
76402
 
76474
76403
  // ../../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");
76404
+ var import_graphql43 = require("graphql");
76476
76405
  function isStringTypes2(types17) {
76477
76406
  return typeof types17 === "string";
76478
76407
  }
76479
76408
  function isSourceTypes2(types17) {
76480
- return types17 instanceof import_graphql42.Source;
76409
+ return types17 instanceof import_graphql43.Source;
76481
76410
  }
76482
76411
  function extractType2(type) {
76483
76412
  let visitedType = type;
76484
- while (visitedType.kind === import_graphql42.Kind.LIST_TYPE || visitedType.kind === "NonNullType") {
76413
+ while (visitedType.kind === import_graphql43.Kind.LIST_TYPE || visitedType.kind === "NonNullType") {
76485
76414
  visitedType = visitedType.type;
76486
76415
  }
76487
76416
  return visitedType;
76488
76417
  }
76489
76418
  function isWrappingTypeNode2(type) {
76490
- return type.kind !== import_graphql42.Kind.NAMED_TYPE;
76419
+ return type.kind !== import_graphql43.Kind.NAMED_TYPE;
76491
76420
  }
76492
76421
  function isListTypeNode2(type) {
76493
- return type.kind === import_graphql42.Kind.LIST_TYPE;
76422
+ return type.kind === import_graphql43.Kind.LIST_TYPE;
76494
76423
  }
76495
76424
  function isNonNullTypeNode2(type) {
76496
- return type.kind === import_graphql42.Kind.NON_NULL_TYPE;
76425
+ return type.kind === import_graphql43.Kind.NON_NULL_TYPE;
76497
76426
  }
76498
76427
  function printTypeNode2(type) {
76499
76428
  if (isListTypeNode2(type)) {
@@ -76596,7 +76525,7 @@ function safeChangeForFieldType2(oldType, newType, ignoreNullability = false) {
76596
76525
  }
76597
76526
 
76598
76527
  // ../../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");
76528
+ var import_graphql44 = require("graphql");
76600
76529
  function mergeInputType2(node, existingNode, config2, directives) {
76601
76530
  if (existingNode) {
76602
76531
  try {
@@ -76614,12 +76543,12 @@ function mergeInputType2(node, existingNode, config2, directives) {
76614
76543
  }
76615
76544
  return config2?.convertExtensions ? {
76616
76545
  ...node,
76617
- kind: import_graphql43.Kind.INPUT_OBJECT_TYPE_DEFINITION
76546
+ kind: import_graphql44.Kind.INPUT_OBJECT_TYPE_DEFINITION
76618
76547
  } : node;
76619
76548
  }
76620
76549
 
76621
76550
  // ../../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");
76551
+ var import_graphql45 = require("graphql");
76623
76552
 
76624
76553
  // ../../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
76554
  function alreadyExists2(arr, other) {
@@ -76652,15 +76581,15 @@ function mergeInterface2(node, existingNode, config2, directives) {
76652
76581
  }
76653
76582
  return config2?.convertExtensions ? {
76654
76583
  ...node,
76655
- kind: import_graphql44.Kind.INTERFACE_TYPE_DEFINITION
76584
+ kind: import_graphql45.Kind.INTERFACE_TYPE_DEFINITION
76656
76585
  } : node;
76657
76586
  }
76658
76587
 
76659
76588
  // ../../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");
76589
+ var import_graphql50 = require("graphql");
76661
76590
 
76662
76591
  // ../../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");
76592
+ var import_graphql46 = require("graphql");
76664
76593
  function mergeType2(node, existingNode, config2, directives) {
76665
76594
  if (existingNode) {
76666
76595
  try {
@@ -76679,12 +76608,12 @@ function mergeType2(node, existingNode, config2, directives) {
76679
76608
  }
76680
76609
  return config2?.convertExtensions ? {
76681
76610
  ...node,
76682
- kind: import_graphql45.Kind.OBJECT_TYPE_DEFINITION
76611
+ kind: import_graphql46.Kind.OBJECT_TYPE_DEFINITION
76683
76612
  } : node;
76684
76613
  }
76685
76614
 
76686
76615
  // ../../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");
76616
+ var import_graphql47 = require("graphql");
76688
76617
  function mergeScalar2(node, existingNode, config2, directives) {
76689
76618
  if (existingNode) {
76690
76619
  return {
@@ -76697,31 +76626,31 @@ function mergeScalar2(node, existingNode, config2, directives) {
76697
76626
  }
76698
76627
  return config2?.convertExtensions ? {
76699
76628
  ...node,
76700
- kind: import_graphql46.Kind.SCALAR_TYPE_DEFINITION
76629
+ kind: import_graphql47.Kind.SCALAR_TYPE_DEFINITION
76701
76630
  } : node;
76702
76631
  }
76703
76632
 
76704
76633
  // ../../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");
76634
+ var import_graphql48 = require("graphql");
76706
76635
  function mergeUnion2(first, second, config2, directives) {
76707
76636
  if (second) {
76708
76637
  return {
76709
76638
  name: first.name,
76710
76639
  description: first["description"] || second["description"],
76711
76640
  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,
76641
+ kind: config2?.convertExtensions || first.kind === "UnionTypeDefinition" || second.kind === "UnionTypeDefinition" ? import_graphql48.Kind.UNION_TYPE_DEFINITION : import_graphql48.Kind.UNION_TYPE_EXTENSION,
76713
76642
  loc: first.loc,
76714
76643
  types: mergeNamedTypeArray2(first.types, second.types, config2)
76715
76644
  };
76716
76645
  }
76717
76646
  return config2?.convertExtensions ? {
76718
76647
  ...first,
76719
- kind: import_graphql47.Kind.UNION_TYPE_DEFINITION
76648
+ kind: import_graphql48.Kind.UNION_TYPE_DEFINITION
76720
76649
  } : first;
76721
76650
  }
76722
76651
 
76723
76652
  // ../../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");
76653
+ var import_graphql49 = require("graphql");
76725
76654
  var DEFAULT_OPERATION_TYPE_NAME_MAP2 = {
76726
76655
  query: "Query",
76727
76656
  mutation: "Mutation",
@@ -76740,7 +76669,7 @@ function mergeOperationTypes2(opNodeList = [], existingOpNodeList = []) {
76740
76669
  function mergeSchemaDefs2(node, existingNode, config2, directives) {
76741
76670
  if (existingNode) {
76742
76671
  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,
76672
+ 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
76673
  description: node["description"] || existingNode["description"],
76745
76674
  directives: mergeDirectives2(node.directives, existingNode.directives, config2, directives),
76746
76675
  operationTypes: mergeOperationTypes2(node.operationTypes, existingNode.operationTypes)
@@ -76748,7 +76677,7 @@ function mergeSchemaDefs2(node, existingNode, config2, directives) {
76748
76677
  }
76749
76678
  return config2?.convertExtensions ? {
76750
76679
  ...node,
76751
- kind: import_graphql48.Kind.SCHEMA_DEFINITION
76680
+ kind: import_graphql49.Kind.SCHEMA_DEFINITION
76752
76681
  } : node;
76753
76682
  }
76754
76683
 
@@ -76772,36 +76701,36 @@ function mergeGraphQLNodes2(nodes, config2, directives = {}) {
76772
76701
  delete mergedResultMap[name];
76773
76702
  } else {
76774
76703
  switch (nodeDefinition.kind) {
76775
- case import_graphql49.Kind.OBJECT_TYPE_DEFINITION:
76776
- case import_graphql49.Kind.OBJECT_TYPE_EXTENSION:
76704
+ case import_graphql50.Kind.OBJECT_TYPE_DEFINITION:
76705
+ case import_graphql50.Kind.OBJECT_TYPE_EXTENSION:
76777
76706
  mergedResultMap[name] = mergeType2(nodeDefinition, mergedResultMap[name], config2, directives);
76778
76707
  break;
76779
- case import_graphql49.Kind.ENUM_TYPE_DEFINITION:
76780
- case import_graphql49.Kind.ENUM_TYPE_EXTENSION:
76708
+ case import_graphql50.Kind.ENUM_TYPE_DEFINITION:
76709
+ case import_graphql50.Kind.ENUM_TYPE_EXTENSION:
76781
76710
  mergedResultMap[name] = mergeEnum2(nodeDefinition, mergedResultMap[name], config2, directives);
76782
76711
  break;
76783
- case import_graphql49.Kind.UNION_TYPE_DEFINITION:
76784
- case import_graphql49.Kind.UNION_TYPE_EXTENSION:
76712
+ case import_graphql50.Kind.UNION_TYPE_DEFINITION:
76713
+ case import_graphql50.Kind.UNION_TYPE_EXTENSION:
76785
76714
  mergedResultMap[name] = mergeUnion2(nodeDefinition, mergedResultMap[name], config2, directives);
76786
76715
  break;
76787
- case import_graphql49.Kind.SCALAR_TYPE_DEFINITION:
76788
- case import_graphql49.Kind.SCALAR_TYPE_EXTENSION:
76716
+ case import_graphql50.Kind.SCALAR_TYPE_DEFINITION:
76717
+ case import_graphql50.Kind.SCALAR_TYPE_EXTENSION:
76789
76718
  mergedResultMap[name] = mergeScalar2(nodeDefinition, mergedResultMap[name], config2, directives);
76790
76719
  break;
76791
- case import_graphql49.Kind.INPUT_OBJECT_TYPE_DEFINITION:
76792
- case import_graphql49.Kind.INPUT_OBJECT_TYPE_EXTENSION:
76720
+ case import_graphql50.Kind.INPUT_OBJECT_TYPE_DEFINITION:
76721
+ case import_graphql50.Kind.INPUT_OBJECT_TYPE_EXTENSION:
76793
76722
  mergedResultMap[name] = mergeInputType2(nodeDefinition, mergedResultMap[name], config2, directives);
76794
76723
  break;
76795
- case import_graphql49.Kind.INTERFACE_TYPE_DEFINITION:
76796
- case import_graphql49.Kind.INTERFACE_TYPE_EXTENSION:
76724
+ case import_graphql50.Kind.INTERFACE_TYPE_DEFINITION:
76725
+ case import_graphql50.Kind.INTERFACE_TYPE_EXTENSION:
76797
76726
  mergedResultMap[name] = mergeInterface2(nodeDefinition, mergedResultMap[name], config2, directives);
76798
76727
  break;
76799
- case import_graphql49.Kind.DIRECTIVE_DEFINITION:
76728
+ case import_graphql50.Kind.DIRECTIVE_DEFINITION:
76800
76729
  mergedResultMap[name] = mergeDirective2(nodeDefinition, mergedResultMap[name]);
76801
76730
  break;
76802
76731
  }
76803
76732
  }
76804
- } else if (nodeDefinition.kind === import_graphql49.Kind.SCHEMA_DEFINITION || nodeDefinition.kind === import_graphql49.Kind.SCHEMA_EXTENSION) {
76733
+ } else if (nodeDefinition.kind === import_graphql50.Kind.SCHEMA_DEFINITION || nodeDefinition.kind === import_graphql50.Kind.SCHEMA_EXTENSION) {
76805
76734
  mergedResultMap[schemaDefSymbol2] = mergeSchemaDefs2(nodeDefinition, mergedResultMap[schemaDefSymbol2], config2);
76806
76735
  }
76807
76736
  }
@@ -76809,11 +76738,11 @@ function mergeGraphQLNodes2(nodes, config2, directives = {}) {
76809
76738
  }
76810
76739
 
76811
76740
  // ../../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");
76741
+ var import_graphql51 = require("graphql");
76813
76742
  function mergeTypeDefs2(typeSource, config2) {
76814
76743
  resetComments2();
76815
76744
  const doc = {
76816
- kind: import_graphql50.Kind.DOCUMENT,
76745
+ kind: import_graphql51.Kind.DOCUMENT,
76817
76746
  definitions: mergeGraphQLTypes2(typeSource, {
76818
76747
  useSchemaDefinition: true,
76819
76748
  forceSchemaDefinition: false,
@@ -76840,14 +76769,14 @@ function visitTypeSources2(typeSource, options, allDirectives = [], allNodes = [
76840
76769
  for (const type of typeSource) {
76841
76770
  visitTypeSources2(type, options, allDirectives, allNodes, visitedTypeSources);
76842
76771
  }
76843
- } else if ((0, import_graphql50.isSchema)(typeSource)) {
76772
+ } else if ((0, import_graphql51.isSchema)(typeSource)) {
76844
76773
  const documentNode = getDocumentNodeFromSchema2(typeSource, options);
76845
76774
  visitTypeSources2(documentNode.definitions, options, allDirectives, allNodes, visitedTypeSources);
76846
76775
  } else if (isStringTypes2(typeSource) || isSourceTypes2(typeSource)) {
76847
- const documentNode = (0, import_graphql50.parse)(typeSource, options);
76776
+ const documentNode = (0, import_graphql51.parse)(typeSource, options);
76848
76777
  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) {
76778
+ } else if (typeof typeSource === "object" && (0, import_graphql51.isDefinitionNode)(typeSource)) {
76779
+ if (typeSource.kind === import_graphql51.Kind.DIRECTIVE_DEFINITION) {
76851
76780
  allDirectives.push(typeSource);
76852
76781
  } else {
76853
76782
  allNodes.push(typeSource);
@@ -76867,7 +76796,7 @@ function mergeGraphQLTypes2(typeSource, config2) {
76867
76796
  const mergedNodes = mergeGraphQLNodes2(allNodes, config2, mergedDirectives);
76868
76797
  if (config2?.useSchemaDefinition) {
76869
76798
  const schemaDef = mergedNodes[schemaDefSymbol2] || {
76870
- kind: import_graphql50.Kind.SCHEMA_DEFINITION,
76799
+ kind: import_graphql51.Kind.SCHEMA_DEFINITION,
76871
76800
  operationTypes: []
76872
76801
  };
76873
76802
  const operationTypes = schemaDef.operationTypes;
@@ -76878,9 +76807,9 @@ function mergeGraphQLTypes2(typeSource, config2) {
76878
76807
  const existingPossibleRootType = mergedNodes[possibleRootTypeName];
76879
76808
  if (existingPossibleRootType != null && existingPossibleRootType.name != null) {
76880
76809
  operationTypes.push({
76881
- kind: import_graphql50.Kind.OPERATION_TYPE_DEFINITION,
76810
+ kind: import_graphql51.Kind.OPERATION_TYPE_DEFINITION,
76882
76811
  type: {
76883
- kind: import_graphql50.Kind.NAMED_TYPE,
76812
+ kind: import_graphql51.Kind.NAMED_TYPE,
76884
76813
  name: existingPossibleRootType.name
76885
76814
  },
76886
76815
  operation: opTypeDefNodeType
@@ -76894,15 +76823,15 @@ function mergeGraphQLTypes2(typeSource, config2) {
76894
76823
  }
76895
76824
  if (config2?.forceSchemaDefinition && !mergedNodes[schemaDefSymbol2]?.operationTypes?.length) {
76896
76825
  mergedNodes[schemaDefSymbol2] = {
76897
- kind: import_graphql50.Kind.SCHEMA_DEFINITION,
76826
+ kind: import_graphql51.Kind.SCHEMA_DEFINITION,
76898
76827
  operationTypes: [
76899
76828
  {
76900
- kind: import_graphql50.Kind.OPERATION_TYPE_DEFINITION,
76829
+ kind: import_graphql51.Kind.OPERATION_TYPE_DEFINITION,
76901
76830
  operation: "query",
76902
76831
  type: {
76903
- kind: import_graphql50.Kind.NAMED_TYPE,
76832
+ kind: import_graphql51.Kind.NAMED_TYPE,
76904
76833
  name: {
76905
- kind: import_graphql50.Kind.NAME,
76834
+ kind: import_graphql51.Kind.NAME,
76906
76835
  value: "Query"
76907
76836
  }
76908
76837
  }
@@ -76919,7 +76848,7 @@ function mergeGraphQLTypes2(typeSource, config2) {
76919
76848
  }
76920
76849
 
76921
76850
  // src/codegen/transforms/schema.ts
76922
- var graphql25 = __toESM(require("graphql"), 1);
76851
+ var graphql24 = __toESM(require("graphql"), 1);
76923
76852
  async function graphqlExtensions(config2, documents) {
76924
76853
  let internalSchema = `
76925
76854
  enum CachePolicy {
@@ -77042,7 +76971,7 @@ directive @${config2.componentFieldDirective}(field: String!, prop: String, expo
77042
76971
  const args = fragmentArguments(config2, "", field.parent);
77043
76972
  if (args.length > 0) {
77044
76973
  argString = "(" + args.map((arg) => {
77045
- const typeName = graphql25.print(arg.type);
76974
+ const typeName = graphql24.print(arg.type);
77046
76975
  return `${arg.name}:${typeName}${arg.required ? "!" : ""}`;
77047
76976
  }).join("\n") + ")";
77048
76977
  }
@@ -77052,20 +76981,20 @@ directive @${config2.componentFieldDirective}(field: String!, prop: String, expo
77052
76981
  `;
77053
76982
  }).join("\n");
77054
76983
  extensions += `${Object.keys(config2.configFile.features?.runtimeScalars ?? {}).map((scalar) => `scalar ${scalar}`).join("\n")}`;
77055
- config2.newSchema = graphql25.print(mergeTypeDefs2([internalSchema, config2.newSchema]));
76984
+ config2.newSchema = graphql24.print(mergeTypeDefs2([internalSchema, config2.newSchema]));
77056
76985
  config2.schemaString += extensions;
77057
- config2.schema = graphql25.buildSchema(
77058
- graphql25.print(
77059
- mergeTypeDefs2([graphql25.printSchema(config2.schema), internalSchema, extensions])
76986
+ config2.schema = graphql24.buildSchema(
76987
+ graphql24.print(
76988
+ mergeTypeDefs2([graphql24.printSchema(config2.schema), internalSchema, extensions])
77060
76989
  )
77061
76990
  );
77062
76991
  }
77063
76992
 
77064
76993
  // src/codegen/transforms/typename.ts
77065
- var graphql26 = __toESM(require("graphql"), 1);
76994
+ var graphql25 = __toESM(require("graphql"), 1);
77066
76995
  async function addTypename(config2, documents) {
77067
76996
  for (const doc of documents) {
77068
- doc.document = graphql26.visit(doc.document, {
76997
+ doc.document = graphql25.visit(doc.document, {
77069
76998
  Field(node, key, parent2, path3, ancestors) {
77070
76999
  if (!node.selectionSet) {
77071
77000
  return;
@@ -77077,7 +77006,7 @@ async function addTypename(config2, documents) {
77077
77006
  );
77078
77007
  const field = type.getFields()[node.name.value];
77079
77008
  const fieldType = unwrapType(config2, field.type).type;
77080
- if (graphql26.isInterfaceType(fieldType) || graphql26.isUnionType(fieldType)) {
77009
+ if (graphql25.isInterfaceType(fieldType) || graphql25.isUnionType(fieldType)) {
77081
77010
  return {
77082
77011
  ...node,
77083
77012
  selectionSet: {
@@ -77085,9 +77014,9 @@ async function addTypename(config2, documents) {
77085
77014
  selections: [
77086
77015
  ...node.selectionSet.selections,
77087
77016
  {
77088
- kind: graphql26.Kind.FIELD,
77017
+ kind: graphql25.Kind.FIELD,
77089
77018
  name: {
77090
- kind: graphql26.Kind.NAME,
77019
+ kind: graphql25.Kind.NAME,
77091
77020
  value: "__typename"
77092
77021
  }
77093
77022
  }
@@ -77104,9 +77033,9 @@ async function addTypename(config2, documents) {
77104
77033
  selections: [
77105
77034
  ...node.selectionSet.selections,
77106
77035
  {
77107
- kind: graphql26.Kind.FIELD,
77036
+ kind: graphql25.Kind.FIELD,
77108
77037
  name: {
77109
- kind: graphql26.Kind.NAME,
77038
+ kind: graphql25.Kind.NAME,
77110
77039
  value: "__typename"
77111
77040
  }
77112
77041
  }
@@ -77119,10 +77048,10 @@ async function addTypename(config2, documents) {
77119
77048
  }
77120
77049
 
77121
77050
  // src/codegen/transforms/addID.ts
77122
- var graphql27 = __toESM(require("graphql"), 1);
77051
+ var graphql26 = __toESM(require("graphql"), 1);
77123
77052
  async function addID(config2, documents) {
77124
77053
  for (const doc of documents) {
77125
- doc.document = graphql27.visit(doc.document, {
77054
+ doc.document = graphql26.visit(doc.document, {
77126
77055
  Field(node, key, parent2, path3, ancestors) {
77127
77056
  if (!node.selectionSet) {
77128
77057
  return;
@@ -77160,7 +77089,7 @@ function addKeysToSelection(config2, node, fieldType) {
77160
77089
  if (!node.selectionSet || node.selectionSet.selections.length == 0) {
77161
77090
  return;
77162
77091
  }
77163
- if (!graphql27.isObjectType(fieldType) && !graphql27.isInterfaceType(fieldType)) {
77092
+ if (!graphql26.isObjectType(fieldType) && !graphql26.isInterfaceType(fieldType)) {
77164
77093
  return;
77165
77094
  }
77166
77095
  const keyFields = config2.keyFieldsForType(fieldType.name);
@@ -77175,9 +77104,9 @@ function addKeysToSelection(config2, node, fieldType) {
77175
77104
  continue;
77176
77105
  }
77177
77106
  selections.push({
77178
- kind: graphql27.Kind.FIELD,
77107
+ kind: graphql26.Kind.FIELD,
77179
77108
  name: {
77180
- kind: graphql27.Kind.NAME,
77109
+ kind: graphql26.Kind.NAME,
77181
77110
  value: keyField
77182
77111
  }
77183
77112
  });
@@ -77192,13 +77121,13 @@ function addKeysToSelection(config2, node, fieldType) {
77192
77121
  }
77193
77122
 
77194
77123
  // src/codegen/transforms/componentFields.ts
77195
- var graphql28 = __toESM(require("graphql"), 1);
77124
+ var graphql27 = __toESM(require("graphql"), 1);
77196
77125
  async function componentFields(config2, documents) {
77197
77126
  for (const document of documents) {
77198
- const typeInfo = new graphql28.TypeInfo(config2.schema);
77199
- document.document = graphql28.visit(
77127
+ const typeInfo = new graphql27.TypeInfo(config2.schema);
77128
+ document.document = graphql27.visit(
77200
77129
  document.document,
77201
- graphql28.visitWithTypeInfo(typeInfo, {
77130
+ graphql27.visitWithTypeInfo(typeInfo, {
77202
77131
  Field(node) {
77203
77132
  const parentType = typeInfo.getParentType();
77204
77133
  if (!parentType) {
@@ -77247,10 +77176,10 @@ async function componentFields(config2, documents) {
77247
77176
  }
77248
77177
 
77249
77178
  // src/codegen/transforms/runtimeScalars.ts
77250
- var graphql29 = __toESM(require("graphql"), 1);
77179
+ var graphql28 = __toESM(require("graphql"), 1);
77251
77180
  async function addTypename2(config2, documents) {
77252
77181
  for (const doc of documents) {
77253
- doc.document = graphql29.visit(doc.document, {
77182
+ doc.document = graphql28.visit(doc.document, {
77254
77183
  VariableDefinition(node) {
77255
77184
  const { type, wrappers } = unwrapType(config2, node.type);
77256
77185
  const runtimeScalar = config2.configFile.features?.runtimeScalars?.[type.name];
@@ -77289,7 +77218,7 @@ async function addTypename2(config2, documents) {
77289
77218
  }
77290
77219
 
77291
77220
  // src/codegen/validators/typeCheck.ts
77292
- var graphql30 = __toESM(require("graphql"), 1);
77221
+ var graphql29 = __toESM(require("graphql"), 1);
77293
77222
  async function typeCheck(config2, docs) {
77294
77223
  const errors = [];
77295
77224
  const freeLists = [];
@@ -77297,7 +77226,7 @@ async function typeCheck(config2, docs) {
77297
77226
  const listTypes = [];
77298
77227
  const fragments = {};
77299
77228
  for (const { document: parsed, originalString, filename } of docs) {
77300
- graphql30.visit(parsed, {
77229
+ graphql29.visit(parsed, {
77301
77230
  FragmentDefinition(definition) {
77302
77231
  fragments[definition.name.value] = definition;
77303
77232
  },
@@ -77342,14 +77271,14 @@ async function typeCheck(config2, docs) {
77342
77271
  );
77343
77272
  return;
77344
77273
  }
77345
- if (graphql30.isListType(rootType) || graphql30.isNonNullType(rootType) && graphql30.isListType(rootType.ofType)) {
77274
+ if (graphql29.isListType(rootType) || graphql29.isNonNullType(rootType) && graphql29.isListType(rootType.ofType)) {
77346
77275
  needsParent = true;
77347
77276
  break;
77348
77277
  }
77349
- if (graphql30.isNonNullType(rootType) && "ofType" in rootType) {
77278
+ if (graphql29.isNonNullType(rootType) && "ofType" in rootType) {
77350
77279
  rootType = rootType.ofType;
77351
77280
  }
77352
- if (graphql30.isScalarType(rootType)) {
77281
+ if (graphql29.isScalarType(rootType)) {
77353
77282
  break;
77354
77283
  }
77355
77284
  rootType = rootType?.getFields()[parent3.name.value]?.type;
@@ -77425,9 +77354,9 @@ async function typeCheck(config2, docs) {
77425
77354
  );
77426
77355
  }
77427
77356
  let targetTypes = [type];
77428
- if (graphql30.isUnionType(type)) {
77357
+ if (graphql29.isUnionType(type)) {
77429
77358
  targetTypes = config2.schema.getPossibleTypes(type);
77430
- } else if (graphql30.isInterfaceType(type)) {
77359
+ } else if (graphql29.isInterfaceType(type)) {
77431
77360
  try {
77432
77361
  for (const key of config2.keyFieldsForType(type.name)) {
77433
77362
  if (!type.getFields()[key]) {
@@ -77463,13 +77392,13 @@ async function typeCheck(config2, docs) {
77463
77392
  if (errors.length > 0) {
77464
77393
  throw errors;
77465
77394
  }
77466
- const rules = (filepath) => [...graphql30.specifiedRules].filter(
77395
+ const rules = (filepath) => [...graphql29.specifiedRules].filter(
77467
77396
  (rule) => ![
77468
- graphql30.NoUnusedFragmentsRule,
77469
- graphql30.KnownFragmentNamesRule,
77470
- graphql30.ExecutableDefinitionsRule,
77471
- graphql30.KnownDirectivesRule,
77472
- graphql30.KnownArgumentNamesRule
77397
+ graphql29.NoUnusedFragmentsRule,
77398
+ graphql29.KnownFragmentNamesRule,
77399
+ graphql29.ExecutableDefinitionsRule,
77400
+ graphql29.KnownDirectivesRule,
77401
+ graphql29.KnownArgumentNamesRule
77473
77402
  ].includes(rule)
77474
77403
  ).concat(
77475
77404
  validateLists({
@@ -77490,7 +77419,7 @@ async function typeCheck(config2, docs) {
77490
77419
  validateLoadingDirective(config2)
77491
77420
  );
77492
77421
  for (const { filename, document: parsed, originalString } of docs) {
77493
- for (const error of graphql30.validate(config2.schema, parsed, rules(filename))) {
77422
+ for (const error of graphql29.validate(config2.schema, parsed, rules(filename))) {
77494
77423
  errors.push(
77495
77424
  new HoudiniError({
77496
77425
  filepath: filename,
@@ -77519,20 +77448,20 @@ function validateRequiredDirective(config2, filepath) {
77519
77448
  if (!node.directives?.some(({ name }) => name.value === config2.requiredDirective))
77520
77449
  return;
77521
77450
  const parentType = parentTypeFromAncestors(config2.schema, filepath, ancestors);
77522
- if (!graphql30.isObjectType(parentType)) {
77451
+ if (!graphql29.isObjectType(parentType)) {
77523
77452
  ctx.reportError(
77524
- new graphql30.GraphQLError(
77453
+ new graphql29.GraphQLError(
77525
77454
  `@${config2.requiredDirective} may only be used on objects, not arguments`
77526
77455
  )
77527
77456
  );
77528
77457
  return;
77529
77458
  }
77530
77459
  const type = parentType.getFields()[node.name.value].type;
77531
- const isServerNullable = !graphql30.isNonNullType(type);
77460
+ const isServerNullable = !graphql29.isNonNullType(type);
77532
77461
  const isAlreadyClientNullable = isClientNullable(node, true);
77533
77462
  if (!isServerNullable && !isAlreadyClientNullable) {
77534
77463
  ctx.reportError(
77535
- new graphql30.GraphQLError(
77464
+ new graphql29.GraphQLError(
77536
77465
  `@${config2.requiredDirective} may only be used on nullable fields`
77537
77466
  )
77538
77467
  );
@@ -77554,7 +77483,7 @@ var validateLists = ({
77554
77483
  if (!config2.isListFragment(node.name.value)) {
77555
77484
  if (!fragments[node.name.value]) {
77556
77485
  ctx.reportError(
77557
- new graphql30.GraphQLError(
77486
+ new graphql29.GraphQLError(
77558
77487
  "Encountered unknown fragment: " + node.name.value
77559
77488
  )
77560
77489
  );
@@ -77564,7 +77493,7 @@ var validateLists = ({
77564
77493
  const listName = config2.listNameFromFragment(node.name.value);
77565
77494
  if (!lists.includes(listName)) {
77566
77495
  ctx.reportError(
77567
- new graphql30.GraphQLError(
77496
+ new graphql29.GraphQLError(
77568
77497
  "Encountered fragment referencing unknown list: " + listName
77569
77498
  )
77570
77499
  );
@@ -77589,7 +77518,7 @@ var validateLists = ({
77589
77518
  );
77590
77519
  if (parentArg) {
77591
77520
  ctx.reportError(
77592
- new graphql30.GraphQLError(
77521
+ new graphql29.GraphQLError(
77593
77522
  `@${config2.deprecatedlistDirectiveParentIDArg} should be defined only in it's own directive now`
77594
77523
  )
77595
77524
  );
@@ -77605,7 +77534,7 @@ var validateLists = ({
77605
77534
  return;
77606
77535
  }
77607
77536
  ctx.reportError(
77608
- new graphql30.GraphQLError(
77537
+ new graphql29.GraphQLError(
77609
77538
  `For this list fragment, you need to add or @${config2.listParentDirective} or @${config2.listAllListsDirective} directive to specify the behavior`
77610
77539
  )
77611
77540
  );
@@ -77615,7 +77544,7 @@ var validateLists = ({
77615
77544
  const directiveName = node.name.value;
77616
77545
  if (directiveName === "connection") {
77617
77546
  ctx.reportError(
77618
- new graphql30.GraphQLError(
77547
+ new graphql29.GraphQLError(
77619
77548
  "@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
77549
  )
77621
77550
  );
@@ -77624,7 +77553,7 @@ var validateLists = ({
77624
77553
  if (!config2.isInternalDirective(node.name.value)) {
77625
77554
  if (!config2.schema.getDirective(directiveName)) {
77626
77555
  ctx.reportError(
77627
- new graphql30.GraphQLError(
77556
+ new graphql29.GraphQLError(
77628
77557
  "Encountered unknown directive: " + directiveName
77629
77558
  )
77630
77559
  );
@@ -77633,7 +77562,7 @@ var validateLists = ({
77633
77562
  }
77634
77563
  if (config2.isListOperationDirective(directiveName) && !listTypes.includes(config2.listNameFromDirective(directiveName))) {
77635
77564
  ctx.reportError(
77636
- new graphql30.GraphQLError(
77565
+ new graphql29.GraphQLError(
77637
77566
  "Encountered directive referencing unknown list: " + directiveName
77638
77567
  )
77639
77568
  );
@@ -77644,7 +77573,7 @@ var validateLists = ({
77644
77573
  };
77645
77574
  function knownArguments(config2) {
77646
77575
  return function(ctx) {
77647
- const nativeValidator = graphql30.KnownArgumentNamesRule(ctx);
77576
+ const nativeValidator = graphql29.KnownArgumentNamesRule(ctx);
77648
77577
  return {
77649
77578
  ...nativeValidator,
77650
77579
  Directive(directiveNode) {
@@ -77679,7 +77608,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
77679
77608
  for (const arg of node.arguments || []) {
77680
77609
  if (arg.value.kind !== "ObjectValue") {
77681
77610
  ctx.reportError(
77682
- new graphql30.GraphQLError("values in @arguments must be an object")
77611
+ new graphql29.GraphQLError("values in @arguments must be an object")
77683
77612
  );
77684
77613
  return;
77685
77614
  }
@@ -77689,13 +77618,13 @@ function validateFragmentArguments(config2, filepath, fragments) {
77689
77618
  );
77690
77619
  if (!typeArg) {
77691
77620
  ctx.reportError(
77692
- new graphql30.GraphQLError("missing type field for @arguments directive")
77621
+ new graphql29.GraphQLError("missing type field for @arguments directive")
77693
77622
  );
77694
77623
  return;
77695
77624
  }
77696
- if (typeArg.value.kind !== graphql30.Kind.STRING) {
77625
+ if (typeArg.value.kind !== graphql29.Kind.STRING) {
77697
77626
  ctx.reportError(
77698
- new graphql30.GraphQLError("type field to @arguments must be a string")
77627
+ new graphql29.GraphQLError("type field to @arguments must be a string")
77699
77628
  );
77700
77629
  return;
77701
77630
  }
@@ -77708,7 +77637,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
77708
77637
  );
77709
77638
  if (typeArg.value.value !== defaultValueType) {
77710
77639
  ctx.reportError(
77711
- new graphql30.GraphQLError(
77640
+ new graphql29.GraphQLError(
77712
77641
  `Invalid default value provided for ${arg.name.value}. Expected ${typeArg.value.value}, found ${defaultValueType}`
77713
77642
  )
77714
77643
  );
@@ -77726,7 +77655,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
77726
77655
  try {
77727
77656
  args = fragmentArguments(config2, filepath, fragments[fragmentName]);
77728
77657
  } catch (e2) {
77729
- ctx.reportError(new graphql30.GraphQLError(e2.message));
77658
+ ctx.reportError(new graphql29.GraphQLError(e2.message));
77730
77659
  return;
77731
77660
  }
77732
77661
  fragmentArguments2[fragmentName] = args;
@@ -77749,7 +77678,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
77749
77678
  );
77750
77679
  if (missing.length > 0) {
77751
77680
  ctx.reportError(
77752
- new graphql30.GraphQLError(
77681
+ new graphql29.GraphQLError(
77753
77682
  `The following arguments are missing from the "${fragmentName}" fragment: ` + JSON.stringify(missing)
77754
77683
  )
77755
77684
  );
@@ -77760,7 +77689,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
77760
77689
  );
77761
77690
  if (unknown.length > 0) {
77762
77691
  ctx.reportError(
77763
- new graphql30.GraphQLError(
77692
+ new graphql29.GraphQLError(
77764
77693
  "Encountered unknown arguments: " + JSON.stringify(unknown)
77765
77694
  )
77766
77695
  );
@@ -77772,7 +77701,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
77772
77701
  for (const [applied, target] of zipped) {
77773
77702
  if (!valueIsType(config2, applied.value, target)) {
77774
77703
  ctx.reportError(
77775
- new graphql30.GraphQLError(
77704
+ new graphql29.GraphQLError(
77776
77705
  `Invalid argument type. Expected ${target}, found ${applied.value.kind}`
77777
77706
  )
77778
77707
  );
@@ -77814,7 +77743,7 @@ function valueIsType(config2, value, targetType) {
77814
77743
  }
77815
77744
  if (value.kind === "EnumValue" && targetType.kind === "NamedType") {
77816
77745
  const enumType = config2.schema.getType(targetType.name.value);
77817
- if (!graphql30.isEnumType(enumType)) {
77746
+ if (!graphql29.isEnumType(enumType)) {
77818
77747
  return false;
77819
77748
  }
77820
77749
  return enumType.getValues().some((enumValue) => enumValue.value === value.value);
@@ -77834,7 +77763,7 @@ function paginateArgs(config2, filepath) {
77834
77763
  }
77835
77764
  if (alreadyPaginated) {
77836
77765
  ctx.reportError(
77837
- new graphql30.GraphQLError(
77766
+ new graphql29.GraphQLError(
77838
77767
  `@${config2.paginateDirective} can only appear in a document once.`
77839
77768
  )
77840
77769
  );
@@ -77866,7 +77795,7 @@ function paginateArgs(config2, filepath) {
77866
77795
  const backwards = appliedArgs.has("last");
77867
77796
  if (!forward && !backwards) {
77868
77797
  ctx.reportError(
77869
- new graphql30.GraphQLError(
77798
+ new graphql29.GraphQLError(
77870
77799
  "A field with cursor-based pagination must have a first or last argument"
77871
77800
  )
77872
77801
  );
@@ -77880,7 +77809,7 @@ function paginateArgs(config2, filepath) {
77880
77809
  }
77881
77810
  if (forward && backwards && paginateMode === "Infinite") {
77882
77811
  ctx.reportError(
77883
- new graphql30.GraphQLError(
77812
+ new graphql29.GraphQLError(
77884
77813
  `A field with cursor pagination cannot go forwards an backwards simultaneously`
77885
77814
  )
77886
77815
  );
@@ -77894,7 +77823,7 @@ function paginateArgs(config2, filepath) {
77894
77823
  );
77895
77824
  if (!appliedLimitArg) {
77896
77825
  ctx.reportError(
77897
- new graphql30.GraphQLError(
77826
+ new graphql29.GraphQLError(
77898
77827
  "A field with offset-based pagination must have a limit argument"
77899
77828
  )
77900
77829
  );
@@ -77910,20 +77839,20 @@ function noUnusedFragmentArguments(config2) {
77910
77839
  const args = /* @__PURE__ */ new Set();
77911
77840
  return {
77912
77841
  enter(node) {
77913
- if (node.kind === graphql30.Kind.FRAGMENT_DEFINITION) {
77842
+ if (node.kind === graphql29.Kind.FRAGMENT_DEFINITION) {
77914
77843
  const definitionArguments = node.directives?.filter((directive) => directive.name.value === config2.argumentsDirective).flatMap((directive) => directive.arguments);
77915
77844
  for (const arg of definitionArguments?.map((arg2) => arg2?.name.value) || []) {
77916
77845
  args.add(arg);
77917
77846
  }
77918
- } else if (node.kind === graphql30.Kind.VARIABLE) {
77847
+ } else if (node.kind === graphql29.Kind.VARIABLE) {
77919
77848
  args.delete(node.name.value);
77920
77849
  }
77921
77850
  },
77922
77851
  leave(node) {
77923
- if (node.kind === graphql30.Kind.FRAGMENT_DEFINITION) {
77852
+ if (node.kind === graphql29.Kind.FRAGMENT_DEFINITION) {
77924
77853
  if (args.size > 0) {
77925
77854
  ctx.reportError(
77926
- new graphql30.GraphQLError(
77855
+ new graphql29.GraphQLError(
77927
77856
  "Encountered unused fragment arguments: " + [...args].join(",")
77928
77857
  )
77929
77858
  );
@@ -77959,7 +77888,7 @@ function nodeDirectives(config2, directives) {
77959
77888
  if (definition.kind === "OperationDefinition") {
77960
77889
  if (definition.operation !== "query") {
77961
77890
  ctx.reportError(
77962
- new graphql30.GraphQLError(
77891
+ new graphql29.GraphQLError(
77963
77892
  `@${node.name.value} must fall on a fragment or query document`
77964
77893
  )
77965
77894
  );
@@ -77971,7 +77900,7 @@ function nodeDirectives(config2, directives) {
77971
77900
  }
77972
77901
  if (!possibleNodes.includes(definitionType)) {
77973
77902
  ctx.reportError(
77974
- new graphql30.GraphQLError(paginateOnNonNodeMessage(node.name.value))
77903
+ new graphql29.GraphQLError(paginateOnNonNodeMessage(node.name.value))
77975
77904
  );
77976
77905
  }
77977
77906
  }
@@ -77990,7 +77919,7 @@ function checkMutationOperation(config2) {
77990
77919
  );
77991
77920
  if (append && prepend) {
77992
77921
  ctx.reportError(
77993
- new graphql30.GraphQLError(
77922
+ new graphql29.GraphQLError(
77994
77923
  `You can't apply both @${config2.listPrependDirective} and @${config2.listAppendDirective} at the same time`
77995
77924
  )
77996
77925
  );
@@ -78004,7 +77933,7 @@ function checkMutationOperation(config2) {
78004
77933
  );
78005
77934
  if (parentId && allLists) {
78006
77935
  ctx.reportError(
78007
- new graphql30.GraphQLError(
77936
+ new graphql29.GraphQLError(
78008
77937
  `You can't apply both @${config2.listParentDirective} and @${config2.listAllListsDirective} at the same time`
78009
77938
  )
78010
77939
  );
@@ -78026,7 +77955,7 @@ function checkMaskDirectives(config2) {
78026
77955
  );
78027
77956
  if (maskEnableDirective && maskDisableDirective) {
78028
77957
  ctx.reportError(
78029
- new graphql30.GraphQLError(
77958
+ new graphql29.GraphQLError(
78030
77959
  `You can't apply both @${config2.maskEnableDirective} and @${config2.maskDisableDirective} at the same time`
78031
77960
  )
78032
77961
  );
@@ -78068,7 +77997,7 @@ function validateLoadingDirective(config2) {
78068
77997
  );
78069
77998
  if (!parentLoading && !global2) {
78070
77999
  ctx.reportError(
78071
- new graphql30.GraphQLError(
78000
+ new graphql29.GraphQLError(
78072
78001
  `@${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
78002
  )
78074
78003
  );
@@ -78090,7 +78019,7 @@ function validateLoadingDirective(config2) {
78090
78019
  );
78091
78020
  if (!parentLoading && !global2) {
78092
78021
  ctx.reportError(
78093
- new graphql30.GraphQLError(
78022
+ new graphql29.GraphQLError(
78094
78023
  `@${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
78024
  )
78096
78025
  );
@@ -78105,7 +78034,7 @@ function getAndVerifyNodeInterface(config2) {
78105
78034
  if (!nodeInterface) {
78106
78035
  return null;
78107
78036
  }
78108
- if (!graphql30.isInterfaceType(nodeInterface)) {
78037
+ if (!graphql29.isInterfaceType(nodeInterface)) {
78109
78038
  displayInvalidNodeFieldMessage(config2);
78110
78039
  return null;
78111
78040
  }
@@ -78200,11 +78129,11 @@ async function uniqueDocumentNames(config2, docs) {
78200
78129
  }
78201
78130
 
78202
78131
  // src/codegen/validators/noIDAlias.ts
78203
- var graphql31 = __toESM(require("graphql"), 1);
78132
+ var graphql30 = __toESM(require("graphql"), 1);
78204
78133
  async function noIDAlias(config2, docs) {
78205
78134
  const errors = [];
78206
78135
  for (const { filename, document } of docs) {
78207
- graphql31.visit(document, {
78136
+ graphql30.visit(document, {
78208
78137
  Field(node, _, __, ___, ancestors) {
78209
78138
  const fieldType = parentTypeFromAncestors(config2.schema, filename, ancestors).name;
78210
78139
  if (config2.keyFieldsForType(fieldType).includes(node.alias?.value || "")) {
@@ -78243,11 +78172,11 @@ async function validatePlugins(config2, documents) {
78243
78172
  }
78244
78173
 
78245
78174
  // src/codegen/validators/componentFields.ts
78246
- var graphql32 = __toESM(require("graphql"), 1);
78175
+ var graphql31 = __toESM(require("graphql"), 1);
78247
78176
  async function componentFields2(config2, docs) {
78248
78177
  const errors = [];
78249
78178
  for (const { filename: filepath, document } of docs) {
78250
- graphql32.visit(document, {
78179
+ graphql31.visit(document, {
78251
78180
  FragmentDefinition(node, _, __, ___, ancestors) {
78252
78181
  const componentFieldDirective = node.directives?.find(
78253
78182
  (dir) => dir.name.value === config2.componentFieldDirective
@@ -78295,7 +78224,7 @@ async function componentFields2(config2, docs) {
78295
78224
  if (existingField && existingField.filepath !== filepath) {
78296
78225
  conflict = true;
78297
78226
  } else if (parentType && fieldValue) {
78298
- const fieldDef = graphql32.isObjectType(parentType) && parentType.getFields()[fieldValue];
78227
+ const fieldDef = graphql31.isObjectType(parentType) && parentType.getFields()[fieldValue];
78299
78228
  if (fieldDef && !fieldDef.astNode?.directives?.find(
78300
78229
  (dir) => dir.name.value === config2.componentFieldDirective
78301
78230
  )) {
@@ -78308,7 +78237,7 @@ async function componentFields2(config2, docs) {
78308
78237
  filepath
78309
78238
  });
78310
78239
  }
78311
- if (parentType && graphql32.isAbstractType(parentType)) {
78240
+ if (parentType && graphql31.isAbstractType(parentType)) {
78312
78241
  errors.push({
78313
78242
  message: `Cannot add component field ${parent2}.${fieldValue} because ${parent2} is an abstract type`,
78314
78243
  filepath
@@ -78529,12 +78458,12 @@ async function processJSFile(config2, contents) {
78529
78458
  return documents;
78530
78459
  }
78531
78460
  async function processGraphQLDocument(config2, filepath, document) {
78532
- const parsedDoc = graphql33.parse(document);
78461
+ const parsedDoc = graphql32.parse(document);
78533
78462
  const operations = parsedDoc.definitions.filter(
78534
- ({ kind: kind2 }) => kind2 === graphql33.Kind.OPERATION_DEFINITION
78463
+ ({ kind: kind2 }) => kind2 === graphql32.Kind.OPERATION_DEFINITION
78535
78464
  );
78536
78465
  const fragments = parsedDoc.definitions.filter(
78537
- ({ kind: kind2 }) => kind2 === graphql33.Kind.FRAGMENT_DEFINITION
78466
+ ({ kind: kind2 }) => kind2 === graphql32.Kind.FRAGMENT_DEFINITION
78538
78467
  );
78539
78468
  if (operations.length > 1) {
78540
78469
  throw new HoudiniError({