houdini 0.19.3 → 1.0.0-next.0

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.
@@ -9759,7 +9759,7 @@ var require_graphql = __commonJS({
9759
9759
  Object.defineProperty(exports, "__esModule", {
9760
9760
  value: true
9761
9761
  });
9762
- exports.graphql = graphql28;
9762
+ exports.graphql = graphql27;
9763
9763
  exports.graphqlSync = graphqlSync;
9764
9764
  var _isPromise = _interopRequireDefault(require_isPromise());
9765
9765
  var _parser = require_parser();
@@ -9769,7 +9769,7 @@ var require_graphql = __commonJS({
9769
9769
  function _interopRequireDefault(obj) {
9770
9770
  return obj && obj.__esModule ? obj : { default: obj };
9771
9771
  }
9772
- function graphql28(argsOrSchema, source, rootValue, contextValue, variableValues, operationName, fieldResolver, typeResolver) {
9772
+ function graphql27(argsOrSchema, source, rootValue, contextValue, variableValues, operationName, fieldResolver, typeResolver) {
9773
9773
  var _arguments = arguments;
9774
9774
  return new Promise(function(resolve2) {
9775
9775
  return resolve2(
@@ -18217,9 +18217,9 @@ var require_lib = __commonJS({
18217
18217
  }
18218
18218
  });
18219
18219
 
18220
- // ../../node_modules/.pnpm/minimatch@5.1.1/node_modules/minimatch/lib/path.js
18220
+ // ../../node_modules/.pnpm/minimatch@5.1.2/node_modules/minimatch/lib/path.js
18221
18221
  var require_path = __commonJS({
18222
- "../../node_modules/.pnpm/minimatch@5.1.1/node_modules/minimatch/lib/path.js"(exports, module) {
18222
+ "../../node_modules/.pnpm/minimatch@5.1.2/node_modules/minimatch/lib/path.js"(exports, module) {
18223
18223
  var isWindows = typeof process === "object" && process && process.platform === "win32";
18224
18224
  module.exports = isWindows ? { sep: "\\" } : { sep: "/" };
18225
18225
  }
@@ -18436,9 +18436,9 @@ var require_brace_expansion = __commonJS({
18436
18436
  }
18437
18437
  });
18438
18438
 
18439
- // ../../node_modules/.pnpm/minimatch@5.1.1/node_modules/minimatch/minimatch.js
18439
+ // ../../node_modules/.pnpm/minimatch@5.1.2/node_modules/minimatch/minimatch.js
18440
18440
  var require_minimatch = __commonJS({
18441
- "../../node_modules/.pnpm/minimatch@5.1.1/node_modules/minimatch/minimatch.js"(exports, module) {
18441
+ "../../node_modules/.pnpm/minimatch@5.1.2/node_modules/minimatch/minimatch.js"(exports, module) {
18442
18442
  var minimatch2 = module.exports = (p, pattern, options = {}) => {
18443
18443
  assertValidPattern(pattern);
18444
18444
  if (!options.nocomment && pattern.charAt(0) === "#") {
@@ -18524,7 +18524,9 @@ var require_minimatch = __commonJS({
18524
18524
  return list;
18525
18525
  };
18526
18526
  var globUnescape = (s) => s.replace(/\\(.)/g, "$1");
18527
+ var charUnescape = (s) => s.replace(/\\([^-\]])/g, "$1");
18527
18528
  var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
18529
+ var braExpEscape = (s) => s.replace(/[[\]\\]/g, "\\$&");
18528
18530
  var Minimatch = class {
18529
18531
  constructor(pattern, options) {
18530
18532
  assertValidPattern(pattern);
@@ -18716,6 +18718,10 @@ var require_minimatch = __commonJS({
18716
18718
  return false;
18717
18719
  }
18718
18720
  case "\\":
18721
+ if (inClass && pattern.charAt(i + 1) === "-") {
18722
+ re += c;
18723
+ continue;
18724
+ }
18719
18725
  clearStateChar();
18720
18726
  escaping = true;
18721
18727
  continue;
@@ -18798,17 +18804,13 @@ var require_minimatch = __commonJS({
18798
18804
  }
18799
18805
  cs = pattern.substring(classStart + 1, i);
18800
18806
  try {
18801
- RegExp("[" + cs + "]");
18807
+ RegExp("[" + braExpEscape(charUnescape(cs)) + "]");
18808
+ re += c;
18802
18809
  } catch (er) {
18803
- sp = this.parse(cs, SUBPARSE);
18804
- re = re.substring(0, reClassStart) + "\\[" + sp[0] + "\\]";
18805
- hasMagic = hasMagic || sp[1];
18806
- inClass = false;
18807
- continue;
18810
+ re = re.substring(0, reClassStart) + "(?:$.)";
18808
18811
  }
18809
18812
  hasMagic = true;
18810
18813
  inClass = false;
18811
- re += c;
18812
18814
  continue;
18813
18815
  default:
18814
18816
  clearStateChar();
@@ -23132,9 +23134,9 @@ var require_glob = __commonJS({
23132
23134
  }
23133
23135
  });
23134
23136
 
23135
- // ../../node_modules/.pnpm/@babel+parser@7.20.5/node_modules/@babel/parser/lib/index.js
23137
+ // ../../node_modules/.pnpm/@babel+parser@7.20.7/node_modules/@babel/parser/lib/index.js
23136
23138
  var require_lib3 = __commonJS({
23137
- "../../node_modules/.pnpm/@babel+parser@7.20.5/node_modules/@babel/parser/lib/index.js"(exports) {
23139
+ "../../node_modules/.pnpm/@babel+parser@7.20.7/node_modules/@babel/parser/lib/index.js"(exports) {
23138
23140
  "use strict";
23139
23141
  Object.defineProperty(exports, "__esModule", { value: true });
23140
23142
  function _objectWithoutPropertiesLoose(source, excluded) {
@@ -23250,9 +23252,9 @@ var require_lib3 = __commonJS({
23250
23252
  AwaitExpressionFormalParameter: "'await' is not allowed in async function parameters.",
23251
23253
  AwaitNotInAsyncContext: "'await' is only allowed within async functions and at the top levels of modules.",
23252
23254
  AwaitNotInAsyncFunction: "'await' is only allowed within async functions.",
23253
- BadGetterArity: "A 'get' accesor must not have any formal parameters.",
23254
- BadSetterArity: "A 'set' accesor must have exactly one formal parameter.",
23255
- BadSetterRestParameter: "A 'set' accesor function argument must not be a rest parameter.",
23255
+ BadGetterArity: "A 'get' accessor must not have any formal parameters.",
23256
+ BadSetterArity: "A 'set' accessor must have exactly one formal parameter.",
23257
+ BadSetterRestParameter: "A 'set' accessor function argument must not be a rest parameter.",
23256
23258
  ConstructorClassField: "Classes may not have a field named 'constructor'.",
23257
23259
  ConstructorClassPrivateField: "Classes may not have a private field named '#constructor'.",
23258
23260
  ConstructorIsAccessor: "Class constructor may not be an accessor.",
@@ -26686,7 +26688,7 @@ var require_lib3 = __commonJS({
26686
26688
  }
26687
26689
  this.parser.raise(toParseError, origin);
26688
26690
  }
26689
- recordArrowParemeterBindingError(error, {
26691
+ recordArrowParameterBindingError(error, {
26690
26692
  at: node
26691
26693
  }) {
26692
26694
  const {
@@ -30445,6 +30447,7 @@ var require_lib3 = __commonJS({
30445
30447
  }) => `Property '${propertyName}' cannot have an initializer because it is marked abstract.`,
30446
30448
  AccesorCannotDeclareThisParameter: "'get' and 'set' accessors cannot declare 'this' parameters.",
30447
30449
  AccesorCannotHaveTypeParameters: "An accessor cannot have type parameters.",
30450
+ AccessorCannotBeOptional: "An 'accessor' property cannot be declared optional.",
30448
30451
  ClassMethodHasDeclare: "Class methods cannot have the 'declare' modifier.",
30449
30452
  ClassMethodHasReadonly: "Class methods cannot have the 'readonly' modifier.",
30450
30453
  ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference: "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",
@@ -32407,8 +32410,12 @@ var require_lib3 = __commonJS({
32407
32410
  node.typeParameters = typeParameters;
32408
32411
  }
32409
32412
  parseClassPropertyAnnotation(node) {
32410
- if (!node.optional && this.eat(35)) {
32411
- node.definite = true;
32413
+ if (!node.optional) {
32414
+ if (this.eat(35)) {
32415
+ node.definite = true;
32416
+ } else if (this.eat(17)) {
32417
+ node.optional = true;
32418
+ }
32412
32419
  }
32413
32420
  const type = this.tsTryParseTypeAnnotation();
32414
32421
  if (type)
@@ -32447,6 +32454,15 @@ var require_lib3 = __commonJS({
32447
32454
  this.parseClassPropertyAnnotation(node);
32448
32455
  return super.parseClassPrivateProperty(node);
32449
32456
  }
32457
+ parseClassAccessorProperty(node) {
32458
+ this.parseClassPropertyAnnotation(node);
32459
+ if (node.optional) {
32460
+ this.raise(TSErrors.AccessorCannotBeOptional, {
32461
+ at: node
32462
+ });
32463
+ }
32464
+ return super.parseClassAccessorProperty(node);
32465
+ }
32450
32466
  pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
32451
32467
  const typeParameters = this.tsTryParseTypeParameters();
32452
32468
  if (typeParameters && isConstructor) {
@@ -32657,7 +32673,7 @@ var require_lib3 = __commonJS({
32657
32673
  case "TSNonNullExpression":
32658
32674
  case "TSTypeAssertion":
32659
32675
  if (isLHS) {
32660
- this.expressionScope.recordArrowParemeterBindingError(TSErrors.UnexpectedTypeCastInParameter, {
32676
+ this.expressionScope.recordArrowParameterBindingError(TSErrors.UnexpectedTypeCastInParameter, {
32661
32677
  at: node
32662
32678
  });
32663
32679
  } else {
@@ -33364,7 +33380,7 @@ var require_lib3 = __commonJS({
33364
33380
  parenthesized = unwrapParenthesizedExpression(node);
33365
33381
  if (isLHS) {
33366
33382
  if (parenthesized.type === "Identifier") {
33367
- this.expressionScope.recordArrowParemeterBindingError(Errors.InvalidParenthesizedAssignment, {
33383
+ this.expressionScope.recordArrowParameterBindingError(Errors.InvalidParenthesizedAssignment, {
33368
33384
  at: node
33369
33385
  });
33370
33386
  } else if (parenthesized.type !== "MemberExpression") {
@@ -53922,7 +53938,7 @@ var require_main2 = __commonJS({
53922
53938
  });
53923
53939
 
53924
53940
  // src/test/index.ts
53925
- var graphql27 = __toESM(require_graphql2(), 1);
53941
+ var graphql26 = __toESM(require_graphql2(), 1);
53926
53942
  var import_memfs2 = __toESM(require_lib(), 1);
53927
53943
 
53928
53944
  // src/lib/pipeline.ts
@@ -56566,6 +56582,60 @@ function definitionFromAncestors(ancestors) {
56566
56582
  }
56567
56583
  return definition;
56568
56584
  }
56585
+ function unwrapType(config2, type, wrappers = []) {
56586
+ if (type.kind === "NonNullType") {
56587
+ return unwrapType(config2, type.type, [TypeWrapper.NonNull, ...wrappers]);
56588
+ }
56589
+ if (type instanceof graphql2.GraphQLNonNull) {
56590
+ return unwrapType(config2, type.ofType, [TypeWrapper.NonNull, ...wrappers]);
56591
+ }
56592
+ if (wrappers[0] !== TypeWrapper.NonNull) {
56593
+ wrappers.unshift(TypeWrapper.Nullable);
56594
+ }
56595
+ if (type.kind === "ListType") {
56596
+ return unwrapType(config2, type.type, [TypeWrapper.List, ...wrappers]);
56597
+ }
56598
+ if (type instanceof graphql2.GraphQLList) {
56599
+ return unwrapType(config2, type.ofType, [TypeWrapper.List, ...wrappers]);
56600
+ }
56601
+ const namedType = config2.schema.getType(type.name.value || type.name);
56602
+ if (!namedType) {
56603
+ throw new Error("Could not unwrap type: " + JSON.stringify(type));
56604
+ }
56605
+ return { type: namedType, wrappers };
56606
+ }
56607
+ function wrapType({
56608
+ type,
56609
+ wrappers
56610
+ }) {
56611
+ const head = wrappers[0];
56612
+ const tail = wrappers.slice(1);
56613
+ let kind = graphql2.Kind.NAMED_TYPE;
56614
+ if (head === TypeWrapper.List) {
56615
+ kind = graphql2.Kind.LIST_TYPE;
56616
+ } else if (head === TypeWrapper.NonNull) {
56617
+ kind = graphql2.Kind.NON_NULL_TYPE;
56618
+ }
56619
+ if (kind === "NamedType") {
56620
+ return {
56621
+ kind,
56622
+ name: {
56623
+ kind: graphql2.Kind.NAME,
56624
+ value: type.name
56625
+ }
56626
+ };
56627
+ }
56628
+ return {
56629
+ kind,
56630
+ type: wrapType({ type, wrappers: tail })
56631
+ };
56632
+ }
56633
+ var TypeWrapper = /* @__PURE__ */ ((TypeWrapper2) => {
56634
+ TypeWrapper2["Nullable"] = "Nullable";
56635
+ TypeWrapper2["List"] = "List";
56636
+ TypeWrapper2["NonNull"] = "NonNull";
56637
+ return TypeWrapper2;
56638
+ })(TypeWrapper || {});
56569
56639
 
56570
56640
  // src/lib/parse.ts
56571
56641
  var import_parser = __toESM(require_lib3(), 1);
@@ -56626,7 +56696,7 @@ async function cleanupFiles(pathFolder, listOfObj) {
56626
56696
  }
56627
56697
 
56628
56698
  // src/codegen/generators/artifacts/index.ts
56629
- var graphql12 = __toESM(require_graphql2(), 1);
56699
+ var graphql11 = __toESM(require_graphql2(), 1);
56630
56700
  var recast5 = __toESM(require_main2(), 1);
56631
56701
 
56632
56702
  // src/codegen/utils/commonjs.ts
@@ -56802,63 +56872,6 @@ var FieldCollection = class {
56802
56872
  }
56803
56873
  };
56804
56874
 
56805
- // src/codegen/utils/graphql.ts
56806
- var graphql3 = __toESM(require_graphql2(), 1);
56807
- function unwrapType(config2, type, wrappers = []) {
56808
- if (type.kind === "NonNullType") {
56809
- return unwrapType(config2, type.type, [TypeWrapper.NonNull, ...wrappers]);
56810
- }
56811
- if (type instanceof graphql3.GraphQLNonNull) {
56812
- return unwrapType(config2, type.ofType, [TypeWrapper.NonNull, ...wrappers]);
56813
- }
56814
- if (wrappers[0] !== TypeWrapper.NonNull) {
56815
- wrappers.unshift(TypeWrapper.Nullable);
56816
- }
56817
- if (type.kind === "ListType") {
56818
- return unwrapType(config2, type.type, [TypeWrapper.List, ...wrappers]);
56819
- }
56820
- if (type instanceof graphql3.GraphQLList) {
56821
- return unwrapType(config2, type.ofType, [TypeWrapper.List, ...wrappers]);
56822
- }
56823
- const namedType = config2.schema.getType(type.name.value || type.name);
56824
- if (!namedType) {
56825
- throw new Error("Could not unwrap type: " + JSON.stringify(type));
56826
- }
56827
- return { type: namedType, wrappers };
56828
- }
56829
- function wrapType({
56830
- type,
56831
- wrappers
56832
- }) {
56833
- const head = wrappers[0];
56834
- const tail = wrappers.slice(1);
56835
- let kind = graphql3.Kind.NAMED_TYPE;
56836
- if (head === TypeWrapper.List) {
56837
- kind = graphql3.Kind.LIST_TYPE;
56838
- } else if (head === TypeWrapper.NonNull) {
56839
- kind = graphql3.Kind.NON_NULL_TYPE;
56840
- }
56841
- if (kind === "NamedType") {
56842
- return {
56843
- kind,
56844
- name: {
56845
- kind: graphql3.Kind.NAME,
56846
- value: type.name
56847
- }
56848
- };
56849
- }
56850
- return {
56851
- kind,
56852
- type: wrapType({ type, wrappers: tail })
56853
- };
56854
- }
56855
- var TypeWrapper = /* @__PURE__ */ ((TypeWrapper2) => {
56856
- TypeWrapper2["Nullable"] = "Nullable";
56857
- TypeWrapper2["List"] = "List";
56858
- TypeWrapper2["NonNull"] = "NonNull";
56859
- return TypeWrapper2;
56860
- })(TypeWrapper || {});
56861
-
56862
56875
  // src/codegen/utils/moduleExport.ts
56863
56876
  var recast2 = __toESM(require_main2(), 1);
56864
56877
  var AST2 = recast2.types.builders;
@@ -56945,7 +56958,7 @@ ${exportDefaultFrom(`./${doc.name}`, doc.name)}`,
56945
56958
  }
56946
56959
 
56947
56960
  // src/codegen/generators/artifacts/inputs.ts
56948
- var graphql4 = __toESM(require_graphql2(), 1);
56961
+ var graphql3 = __toESM(require_graphql2(), 1);
56949
56962
  var recast3 = __toESM(require_main2(), 1);
56950
56963
  var AST3 = recast3.types.builders;
56951
56964
  function inputObject(config2, inputs) {
@@ -56970,10 +56983,10 @@ function walkInputs(config2, visitedTypes, inputObj, rootType) {
56970
56983
  if (visitedTypes.has(type.name)) {
56971
56984
  return;
56972
56985
  }
56973
- if (graphql4.isEnumType(type) || graphql4.isScalarType(type)) {
56986
+ if (graphql3.isEnumType(type) || graphql3.isScalarType(type)) {
56974
56987
  return;
56975
56988
  }
56976
- if (graphql4.isUnionType(type)) {
56989
+ if (graphql3.isUnionType(type)) {
56977
56990
  return;
56978
56991
  }
56979
56992
  visitedTypes.add(type.name);
@@ -56991,10 +57004,10 @@ function walkInputs(config2, visitedTypes, inputObj, rootType) {
56991
57004
  }
56992
57005
 
56993
57006
  // src/codegen/generators/artifacts/operations.ts
56994
- var graphql6 = __toESM(require_graphql2(), 1);
57007
+ var graphql5 = __toESM(require_graphql2(), 1);
56995
57008
 
56996
57009
  // src/codegen/generators/artifacts/utils.ts
56997
- var graphql5 = __toESM(require_graphql2(), 1);
57010
+ var graphql4 = __toESM(require_graphql2(), 1);
56998
57011
  var recast4 = __toESM(require_main2(), 1);
56999
57012
  var AST4 = recast4.types.builders;
57000
57013
  function serializeValue(value) {
@@ -57046,19 +57059,19 @@ function deepMerge(filepath, ...targets) {
57046
57059
  function convertValue(config2, val) {
57047
57060
  let value;
57048
57061
  let kind;
57049
- if (val.kind === graphql5.Kind.INT) {
57062
+ if (val.kind === graphql4.Kind.INT) {
57050
57063
  value = parseInt(val.value, 10);
57051
57064
  kind = "Int";
57052
- } else if (val.kind === graphql5.Kind.FLOAT) {
57065
+ } else if (val.kind === graphql4.Kind.FLOAT) {
57053
57066
  value = parseFloat(val.value);
57054
57067
  kind = "Float";
57055
- } else if (val.kind === graphql5.Kind.BOOLEAN) {
57068
+ } else if (val.kind === graphql4.Kind.BOOLEAN) {
57056
57069
  value = val.value;
57057
57070
  kind = "Boolean";
57058
- } else if (val.kind === graphql5.Kind.VARIABLE) {
57071
+ } else if (val.kind === graphql4.Kind.VARIABLE) {
57059
57072
  value = val.name.value;
57060
57073
  kind = "Variable";
57061
- } else if (val.kind === graphql5.Kind.STRING) {
57074
+ } else if (val.kind === graphql4.Kind.STRING) {
57062
57075
  value = val.value;
57063
57076
  kind = "String";
57064
57077
  }
@@ -57071,7 +57084,7 @@ function operationsByPath(config2, filepath, definition, filterTypes) {
57071
57084
  return {};
57072
57085
  }
57073
57086
  const pathOperations = {};
57074
- graphql6.visit(definition, {
57087
+ graphql5.visit(definition, {
57075
57088
  FragmentSpread(node, _, __, ___, ancestors) {
57076
57089
  if (!config2.isListFragment(node.name.value)) {
57077
57090
  return;
@@ -57230,7 +57243,7 @@ function ancestorKey(ancestors) {
57230
57243
  }
57231
57244
 
57232
57245
  // src/codegen/generators/artifacts/selection.ts
57233
- var graphql11 = __toESM(require_graphql2(), 1);
57246
+ var graphql10 = __toESM(require_graphql2(), 1);
57234
57247
 
57235
57248
  // ../../node_modules/.pnpm/@kitql+helper@0.5.0/node_modules/@kitql/helper/index.mjs
57236
57249
  var config = {
@@ -57270,16 +57283,16 @@ function logYellow(str) {
57270
57283
  }
57271
57284
 
57272
57285
  // src/codegen/transforms/list.ts
57273
- var graphql9 = __toESM(require_graphql2(), 1);
57286
+ var graphql8 = __toESM(require_graphql2(), 1);
57274
57287
 
57275
57288
  // src/codegen/utils/objectIdentificationSelection.ts
57276
- var graphql7 = __toESM(require_graphql2(), 1);
57289
+ var graphql6 = __toESM(require_graphql2(), 1);
57277
57290
  var objectIdentificationSelection = (config2, type) => {
57278
57291
  return config2.keyFieldsForType(type.name).map((key) => {
57279
57292
  return {
57280
- kind: graphql7.Kind.FIELD,
57293
+ kind: graphql6.Kind.FIELD,
57281
57294
  name: {
57282
- kind: graphql7.Kind.NAME,
57295
+ kind: graphql6.Kind.NAME,
57283
57296
  value: key
57284
57297
  }
57285
57298
  };
@@ -57287,7 +57300,7 @@ var objectIdentificationSelection = (config2, type) => {
57287
57300
  };
57288
57301
 
57289
57302
  // src/codegen/transforms/paginate.ts
57290
- var graphql8 = __toESM(require_graphql2(), 1);
57303
+ var graphql7 = __toESM(require_graphql2(), 1);
57291
57304
  async function paginate(config2, documents) {
57292
57305
  const newDocs = [];
57293
57306
  for (const doc of documents) {
@@ -57320,7 +57333,7 @@ async function paginate(config2, documents) {
57320
57333
  };
57321
57334
  let cursorType = "String";
57322
57335
  let paginationPath = [];
57323
- doc.document = graphql8.visit(doc.document, {
57336
+ doc.document = graphql7.visit(doc.document, {
57324
57337
  Field(node, _, __, ___, ancestors) {
57325
57338
  const paginateDirective = node.directives?.find(
57326
57339
  (directive) => directive.name.value === config2.paginateDirective
@@ -57347,7 +57360,7 @@ async function paginate(config2, documents) {
57347
57360
  flags.offset.enabled = offsetPagination;
57348
57361
  flags.limit.enabled = offsetPagination;
57349
57362
  paginationPath = ancestors.filter(
57350
- (ancestor) => !Array.isArray(ancestor) && ancestor.kind === graphql8.Kind.FIELD
57363
+ (ancestor) => !Array.isArray(ancestor) && ancestor.kind === graphql7.Kind.FIELD
57351
57364
  ).concat(node).map((field) => field.alias?.value || field.name.value);
57352
57365
  return {
57353
57366
  ...node,
@@ -57368,7 +57381,7 @@ async function paginate(config2, documents) {
57368
57381
  refetchUpdate = "prepend" /* prepend */;
57369
57382
  }
57370
57383
  let fragment = "";
57371
- doc.document = graphql8.visit(doc.document, {
57384
+ doc.document = graphql7.visit(doc.document, {
57372
57385
  OperationDefinition(node) {
57373
57386
  if (node.operation !== "query") {
57374
57387
  throw new HoudiniError({
@@ -57422,9 +57435,9 @@ async function paginate(config2, documents) {
57422
57435
  directives: [
57423
57436
  ...node.directives || [],
57424
57437
  {
57425
- kind: graphql8.Kind.DIRECTIVE,
57438
+ kind: graphql7.Kind.DIRECTIVE,
57426
57439
  name: {
57427
- kind: graphql8.Kind.NAME,
57440
+ kind: graphql7.Kind.NAME,
57428
57441
  value: config2.argumentsDirective
57429
57442
  }
57430
57443
  }
@@ -57487,16 +57500,16 @@ async function paginate(config2, documents) {
57487
57500
  const paginationArgs = Object.entries(flags).filter(([_, { enabled }]) => enabled).map(([key, value]) => ({ name: key, ...value }));
57488
57501
  const fragmentSpreadSelection = [
57489
57502
  {
57490
- kind: graphql8.Kind.FRAGMENT_SPREAD,
57503
+ kind: graphql7.Kind.FRAGMENT_SPREAD,
57491
57504
  name: {
57492
- kind: graphql8.Kind.NAME,
57505
+ kind: graphql7.Kind.NAME,
57493
57506
  value: fragmentName
57494
57507
  },
57495
57508
  directives: [
57496
57509
  {
57497
- kind: graphql8.Kind.DIRECTIVE,
57510
+ kind: graphql7.Kind.DIRECTIVE,
57498
57511
  name: {
57499
- kind: graphql8.Kind.NAME,
57512
+ kind: graphql7.Kind.NAME,
57500
57513
  value: config2.withDirective
57501
57514
  },
57502
57515
  ["arguments"]: paginationArgs.map(
@@ -57524,29 +57537,29 @@ async function paginate(config2, documents) {
57524
57537
  });
57525
57538
  const typeConfig = config2.typeConfig?.[fragment];
57526
57539
  const queryDoc = {
57527
- kind: graphql8.Kind.DOCUMENT,
57540
+ kind: graphql7.Kind.DOCUMENT,
57528
57541
  definitions: [
57529
57542
  {
57530
- kind: graphql8.Kind.OPERATION_DEFINITION,
57543
+ kind: graphql7.Kind.OPERATION_DEFINITION,
57531
57544
  name: {
57532
- kind: graphql8.Kind.NAME,
57545
+ kind: graphql7.Kind.NAME,
57533
57546
  value: refetchQueryName
57534
57547
  },
57535
57548
  operation: "query",
57536
57549
  variableDefinitions: paginationArgs.map(
57537
57550
  (arg) => ({
57538
- kind: graphql8.Kind.VARIABLE_DEFINITION,
57551
+ kind: graphql7.Kind.VARIABLE_DEFINITION,
57539
57552
  type: {
57540
- kind: graphql8.Kind.NAMED_TYPE,
57553
+ kind: graphql7.Kind.NAMED_TYPE,
57541
57554
  name: {
57542
- kind: graphql8.Kind.NAME,
57555
+ kind: graphql7.Kind.NAME,
57543
57556
  value: arg.type
57544
57557
  }
57545
57558
  },
57546
57559
  variable: {
57547
- kind: graphql8.Kind.VARIABLE,
57560
+ kind: graphql7.Kind.VARIABLE,
57548
57561
  name: {
57549
- kind: graphql8.Kind.NAME,
57562
+ kind: graphql7.Kind.NAME,
57550
57563
  value: arg.name
57551
57564
  }
57552
57565
  },
@@ -57558,12 +57571,12 @@ async function paginate(config2, documents) {
57558
57571
  ).concat(
57559
57572
  !nodeQuery ? [] : keys.map(
57560
57573
  (key) => ({
57561
- kind: graphql8.Kind.VARIABLE_DEFINITION,
57574
+ kind: graphql7.Kind.VARIABLE_DEFINITION,
57562
57575
  type: key.type,
57563
57576
  variable: {
57564
- kind: graphql8.Kind.VARIABLE,
57577
+ kind: graphql7.Kind.VARIABLE,
57565
57578
  name: {
57566
- kind: graphql8.Kind.NAME,
57579
+ kind: graphql7.Kind.NAME,
57567
57580
  value: key.name
57568
57581
  }
57569
57582
  }
@@ -57571,42 +57584,42 @@ async function paginate(config2, documents) {
57571
57584
  )
57572
57585
  ),
57573
57586
  selectionSet: {
57574
- kind: graphql8.Kind.SELECTION_SET,
57587
+ kind: graphql7.Kind.SELECTION_SET,
57575
57588
  selections: !nodeQuery ? fragmentSpreadSelection : [
57576
57589
  {
57577
- kind: graphql8.Kind.FIELD,
57590
+ kind: graphql7.Kind.FIELD,
57578
57591
  name: {
57579
- kind: graphql8.Kind.NAME,
57592
+ kind: graphql7.Kind.NAME,
57580
57593
  value: typeConfig?.resolve?.queryField || "node"
57581
57594
  },
57582
57595
  ["arguments"]: keys.map((key) => ({
57583
- kind: graphql8.Kind.ARGUMENT,
57596
+ kind: graphql7.Kind.ARGUMENT,
57584
57597
  name: {
57585
- kind: graphql8.Kind.NAME,
57598
+ kind: graphql7.Kind.NAME,
57586
57599
  value: key.name
57587
57600
  },
57588
57601
  value: {
57589
- kind: graphql8.Kind.VARIABLE,
57602
+ kind: graphql7.Kind.VARIABLE,
57590
57603
  name: {
57591
- kind: graphql8.Kind.NAME,
57604
+ kind: graphql7.Kind.NAME,
57592
57605
  value: key.name
57593
57606
  }
57594
57607
  }
57595
57608
  })),
57596
57609
  selectionSet: {
57597
- kind: graphql8.Kind.SELECTION_SET,
57610
+ kind: graphql7.Kind.SELECTION_SET,
57598
57611
  selections: [
57599
57612
  {
57600
- kind: graphql8.Kind.FIELD,
57613
+ kind: graphql7.Kind.FIELD,
57601
57614
  name: {
57602
- kind: graphql8.Kind.NAME,
57615
+ kind: graphql7.Kind.NAME,
57603
57616
  value: "__typename"
57604
57617
  }
57605
57618
  },
57606
57619
  ...(typeConfig?.keys || ["id"]).map((key) => ({
57607
- kind: graphql8.Kind.FIELD,
57620
+ kind: graphql7.Kind.FIELD,
57608
57621
  name: {
57609
- kind: graphql8.Kind.NAME,
57622
+ kind: graphql7.Kind.NAME,
57610
57623
  value: key
57611
57624
  }
57612
57625
  })),
@@ -57668,15 +57681,15 @@ function replaceArgumentsWithVariables(args, flags) {
57668
57681
  }
57669
57682
  function variableAsArgument(name2, variable) {
57670
57683
  return {
57671
- kind: graphql8.Kind.ARGUMENT,
57684
+ kind: graphql7.Kind.ARGUMENT,
57672
57685
  name: {
57673
- kind: graphql8.Kind.NAME,
57686
+ kind: graphql7.Kind.NAME,
57674
57687
  value: name2
57675
57688
  },
57676
57689
  value: {
57677
- kind: graphql8.Kind.VARIABLE,
57690
+ kind: graphql7.Kind.VARIABLE,
57678
57691
  name: {
57679
- kind: graphql8.Kind.NAME,
57692
+ kind: graphql7.Kind.NAME,
57680
57693
  value: variable ?? name2
57681
57694
  }
57682
57695
  }
@@ -57684,18 +57697,18 @@ function variableAsArgument(name2, variable) {
57684
57697
  }
57685
57698
  function staticVariableDefinition(name2, type, defaultValue, variableName) {
57686
57699
  return {
57687
- kind: graphql8.Kind.VARIABLE_DEFINITION,
57700
+ kind: graphql7.Kind.VARIABLE_DEFINITION,
57688
57701
  type: {
57689
- kind: graphql8.Kind.NAMED_TYPE,
57702
+ kind: graphql7.Kind.NAMED_TYPE,
57690
57703
  name: {
57691
- kind: graphql8.Kind.NAME,
57704
+ kind: graphql7.Kind.NAME,
57692
57705
  value: type
57693
57706
  }
57694
57707
  },
57695
57708
  variable: {
57696
- kind: graphql8.Kind.VARIABLE,
57709
+ kind: graphql7.Kind.VARIABLE,
57697
57710
  name: {
57698
- kind: graphql8.Kind.NAME,
57711
+ kind: graphql7.Kind.NAME,
57699
57712
  value: variableName ?? name2
57700
57713
  }
57701
57714
  },
@@ -57707,9 +57720,9 @@ function staticVariableDefinition(name2, type, defaultValue, variableName) {
57707
57720
  }
57708
57721
  function argumentNode(name2, value) {
57709
57722
  return {
57710
- kind: graphql8.Kind.ARGUMENT,
57723
+ kind: graphql7.Kind.ARGUMENT,
57711
57724
  name: {
57712
- kind: graphql8.Kind.NAME,
57725
+ kind: graphql7.Kind.NAME,
57713
57726
  value: name2
57714
57727
  },
57715
57728
  value: objectNode(value)
@@ -57717,16 +57730,16 @@ function argumentNode(name2, value) {
57717
57730
  }
57718
57731
  function objectNode([type, defaultValue]) {
57719
57732
  const node = {
57720
- kind: graphql8.Kind.OBJECT,
57733
+ kind: graphql7.Kind.OBJECT,
57721
57734
  fields: [
57722
57735
  {
57723
- kind: graphql8.Kind.OBJECT_FIELD,
57736
+ kind: graphql7.Kind.OBJECT_FIELD,
57724
57737
  name: {
57725
- kind: graphql8.Kind.NAME,
57738
+ kind: graphql7.Kind.NAME,
57726
57739
  value: "type"
57727
57740
  },
57728
57741
  value: {
57729
- kind: graphql8.Kind.STRING,
57742
+ kind: graphql7.Kind.STRING,
57730
57743
  value: type
57731
57744
  }
57732
57745
  }
@@ -57734,8 +57747,8 @@ function objectNode([type, defaultValue]) {
57734
57747
  };
57735
57748
  if (defaultValue) {
57736
57749
  node.fields.push({
57737
- kind: graphql8.Kind.OBJECT_FIELD,
57738
- name: { kind: graphql8.Kind.NAME, value: "default" },
57750
+ kind: graphql7.Kind.OBJECT_FIELD,
57751
+ name: { kind: graphql7.Kind.NAME, value: "default" },
57739
57752
  value: {
57740
57753
  kind: typeof defaultValue === "number" ? "IntValue" : "StringValue",
57741
57754
  value: defaultValue.toString()
@@ -57746,34 +57759,34 @@ function objectNode([type, defaultValue]) {
57746
57759
  }
57747
57760
  var pageInfoSelection = [
57748
57761
  {
57749
- kind: graphql8.Kind.FIELD,
57762
+ kind: graphql7.Kind.FIELD,
57750
57763
  name: {
57751
- kind: graphql8.Kind.NAME,
57764
+ kind: graphql7.Kind.NAME,
57752
57765
  value: "edges"
57753
57766
  },
57754
57767
  selectionSet: {
57755
- kind: graphql8.Kind.SELECTION_SET,
57768
+ kind: graphql7.Kind.SELECTION_SET,
57756
57769
  selections: [
57757
57770
  {
57758
- kind: graphql8.Kind.FIELD,
57771
+ kind: graphql7.Kind.FIELD,
57759
57772
  name: {
57760
- kind: graphql8.Kind.NAME,
57773
+ kind: graphql7.Kind.NAME,
57761
57774
  value: "cursor"
57762
57775
  }
57763
57776
  },
57764
57777
  {
57765
- kind: graphql8.Kind.FIELD,
57778
+ kind: graphql7.Kind.FIELD,
57766
57779
  name: {
57767
- kind: graphql8.Kind.NAME,
57780
+ kind: graphql7.Kind.NAME,
57768
57781
  value: "node"
57769
57782
  },
57770
57783
  selectionSet: {
57771
- kind: graphql8.Kind.SELECTION_SET,
57784
+ kind: graphql7.Kind.SELECTION_SET,
57772
57785
  selections: [
57773
57786
  {
57774
- kind: graphql8.Kind.FIELD,
57787
+ kind: graphql7.Kind.FIELD,
57775
57788
  name: {
57776
- kind: graphql8.Kind.NAME,
57789
+ kind: graphql7.Kind.NAME,
57777
57790
  value: "__typename"
57778
57791
  }
57779
57792
  }
@@ -57784,39 +57797,39 @@ var pageInfoSelection = [
57784
57797
  }
57785
57798
  },
57786
57799
  {
57787
- kind: graphql8.Kind.FIELD,
57800
+ kind: graphql7.Kind.FIELD,
57788
57801
  name: {
57789
- kind: graphql8.Kind.NAME,
57802
+ kind: graphql7.Kind.NAME,
57790
57803
  value: "pageInfo"
57791
57804
  },
57792
57805
  selectionSet: {
57793
- kind: graphql8.Kind.SELECTION_SET,
57806
+ kind: graphql7.Kind.SELECTION_SET,
57794
57807
  selections: [
57795
57808
  {
57796
- kind: graphql8.Kind.FIELD,
57809
+ kind: graphql7.Kind.FIELD,
57797
57810
  name: {
57798
- kind: graphql8.Kind.NAME,
57811
+ kind: graphql7.Kind.NAME,
57799
57812
  value: "hasPreviousPage"
57800
57813
  }
57801
57814
  },
57802
57815
  {
57803
- kind: graphql8.Kind.FIELD,
57816
+ kind: graphql7.Kind.FIELD,
57804
57817
  name: {
57805
- kind: graphql8.Kind.NAME,
57818
+ kind: graphql7.Kind.NAME,
57806
57819
  value: "hasNextPage"
57807
57820
  }
57808
57821
  },
57809
57822
  {
57810
- kind: graphql8.Kind.FIELD,
57823
+ kind: graphql7.Kind.FIELD,
57811
57824
  name: {
57812
- kind: graphql8.Kind.NAME,
57825
+ kind: graphql7.Kind.NAME,
57813
57826
  value: "startCursor"
57814
57827
  }
57815
57828
  },
57816
57829
  {
57817
- kind: graphql8.Kind.FIELD,
57830
+ kind: graphql7.Kind.FIELD,
57818
57831
  name: {
57819
- kind: graphql8.Kind.NAME,
57832
+ kind: graphql7.Kind.NAME,
57820
57833
  value: "endCursor"
57821
57834
  }
57822
57835
  }
@@ -57830,15 +57843,15 @@ async function addListFragments(config2, documents) {
57830
57843
  const lists = {};
57831
57844
  const errors = [];
57832
57845
  for (const doc of documents) {
57833
- doc.document = graphql9.visit(doc.document, {
57846
+ doc.document = graphql8.visit(doc.document, {
57834
57847
  Directive(node, key, parent, path2, ancestors) {
57835
57848
  if ([config2.listDirective, config2.paginateDirective].includes(node.name.value)) {
57836
57849
  const nameArg = node.arguments?.find((arg) => arg.name.value === "name");
57837
57850
  let error = {
57838
- ...new graphql9.GraphQLError(
57851
+ ...new graphql8.GraphQLError(
57839
57852
  "",
57840
57853
  node,
57841
- new graphql9.Source(""),
57854
+ new graphql8.Source(""),
57842
57855
  node.loc ? [node.loc.start, node.loc.end] : null,
57843
57856
  path2
57844
57857
  ),
@@ -57890,7 +57903,7 @@ async function addListFragments(config2, documents) {
57890
57903
  {
57891
57904
  kind: "Argument",
57892
57905
  name: {
57893
- kind: graphql9.Kind.NAME,
57906
+ kind: graphql8.Kind.NAME,
57894
57907
  value: "connection"
57895
57908
  },
57896
57909
  value: {
@@ -57940,7 +57953,7 @@ async function addListFragments(config2, documents) {
57940
57953
  const validDeletes = [
57941
57954
  ...new Set(
57942
57955
  Object.values(lists).map(({ type }) => {
57943
- if (!(type instanceof graphql9.GraphQLObjectType)) {
57956
+ if (!(type instanceof graphql8.GraphQLObjectType)) {
57944
57957
  return "";
57945
57958
  }
57946
57959
  if (config2.keyFieldsForType(type.name).length !== 1) {
@@ -57954,7 +57967,7 @@ async function addListFragments(config2, documents) {
57954
57967
  return;
57955
57968
  }
57956
57969
  const generatedDoc = {
57957
- kind: graphql9.Kind.DOCUMENT,
57970
+ kind: graphql8.Kind.DOCUMENT,
57958
57971
  definitions: Object.entries(lists).flatMap(
57959
57972
  ([name2, { selection: selection2, type }]) => {
57960
57973
  const schemaType = config2.schema.getType(type.name);
@@ -57962,7 +57975,7 @@ async function addListFragments(config2, documents) {
57962
57975
  throw new HoudiniError({ message: "Lists must have a selection" });
57963
57976
  }
57964
57977
  const fragmentSelection = {
57965
- kind: graphql9.Kind.SELECTION_SET,
57978
+ kind: graphql8.Kind.SELECTION_SET,
57966
57979
  selections: [...selection2.selections]
57967
57980
  };
57968
57981
  if (schemaType && fragmentSelection && !fragmentSelection?.selections.find(
@@ -57977,14 +57990,14 @@ async function addListFragments(config2, documents) {
57977
57990
  {
57978
57991
  name: {
57979
57992
  value: config2.listInsertFragment(name2),
57980
- kind: graphql9.Kind.NAME
57993
+ kind: graphql8.Kind.NAME
57981
57994
  },
57982
- kind: graphql9.Kind.FRAGMENT_DEFINITION,
57995
+ kind: graphql8.Kind.FRAGMENT_DEFINITION,
57983
57996
  selectionSet: fragmentSelection,
57984
57997
  typeCondition: {
57985
- kind: graphql9.Kind.NAMED_TYPE,
57998
+ kind: graphql8.Kind.NAMED_TYPE,
57986
57999
  name: {
57987
- kind: graphql9.Kind.NAME,
58000
+ kind: graphql8.Kind.NAME,
57988
58001
  value: type.name
57989
58002
  }
57990
58003
  }
@@ -57992,32 +58005,32 @@ async function addListFragments(config2, documents) {
57992
58005
  {
57993
58006
  name: {
57994
58007
  value: config2.listToggleFragment(name2),
57995
- kind: graphql9.Kind.NAME
58008
+ kind: graphql8.Kind.NAME
57996
58009
  },
57997
- kind: graphql9.Kind.FRAGMENT_DEFINITION,
58010
+ kind: graphql8.Kind.FRAGMENT_DEFINITION,
57998
58011
  selectionSet: fragmentSelection,
57999
58012
  typeCondition: {
58000
- kind: graphql9.Kind.NAMED_TYPE,
58013
+ kind: graphql8.Kind.NAMED_TYPE,
58001
58014
  name: {
58002
- kind: graphql9.Kind.NAME,
58015
+ kind: graphql8.Kind.NAME,
58003
58016
  value: type.name
58004
58017
  }
58005
58018
  }
58006
58019
  },
58007
58020
  {
58008
- kind: graphql9.Kind.FRAGMENT_DEFINITION,
58021
+ kind: graphql8.Kind.FRAGMENT_DEFINITION,
58009
58022
  name: {
58010
58023
  value: config2.listRemoveFragment(name2),
58011
- kind: graphql9.Kind.NAME
58024
+ kind: graphql8.Kind.NAME
58012
58025
  },
58013
58026
  selectionSet: {
58014
- kind: graphql9.Kind.SELECTION_SET,
58027
+ kind: graphql8.Kind.SELECTION_SET,
58015
58028
  selections: [...objectIdentificationSelection(config2, type)]
58016
58029
  },
58017
58030
  typeCondition: {
58018
- kind: graphql9.Kind.NAMED_TYPE,
58031
+ kind: graphql8.Kind.NAMED_TYPE,
58019
58032
  name: {
58020
- kind: graphql9.Kind.NAME,
58033
+ kind: graphql8.Kind.NAME,
58021
58034
  value: type.name
58022
58035
  }
58023
58036
  }
@@ -58026,14 +58039,14 @@ async function addListFragments(config2, documents) {
58026
58039
  }
58027
58040
  ).concat(
58028
58041
  ...validDeletes.map((typeName) => ({
58029
- kind: graphql9.Kind.DIRECTIVE_DEFINITION,
58042
+ kind: graphql8.Kind.DIRECTIVE_DEFINITION,
58030
58043
  name: {
58031
- kind: graphql9.Kind.NAME,
58044
+ kind: graphql8.Kind.NAME,
58032
58045
  value: config2.listDeleteDirective(typeName)
58033
58046
  },
58034
58047
  locations: [
58035
58048
  {
58036
- kind: graphql9.Kind.NAME,
58049
+ kind: graphql8.Kind.NAME,
58037
58050
  value: "FIELD"
58038
58051
  }
58039
58052
  ],
@@ -58041,8 +58054,8 @@ async function addListFragments(config2, documents) {
58041
58054
  }))
58042
58055
  )
58043
58056
  };
58044
- config2.newSchema += "\n" + generatedDoc.definitions.filter((c) => c.kind !== "FragmentDefinition").map(graphql9.print).join("\n\n");
58045
- config2.newDocuments += "\n" + generatedDoc.definitions.filter((c) => c.kind === "FragmentDefinition").map(graphql9.print).join("\n\n");
58057
+ config2.newSchema += "\n" + generatedDoc.definitions.filter((c) => c.kind !== "FragmentDefinition").map(graphql8.print).join("\n\n");
58058
+ config2.newDocuments += "\n" + generatedDoc.definitions.filter((c) => c.kind === "FragmentDefinition").map(graphql8.print).join("\n\n");
58046
58059
  documents.push({
58047
58060
  name: "generated::lists",
58048
58061
  kind: "HoudiniFragment" /* Fragment */,
@@ -58127,11 +58140,11 @@ var nodeNotDefinedMessage = (config2) => `Looks like you are trying to use the $
58127
58140
  For more information, visit this link: ${siteURL}/guides/pagination`;
58128
58141
 
58129
58142
  // src/codegen/generators/artifacts/fieldKey.ts
58130
- var graphql10 = __toESM(require_graphql2(), 1);
58143
+ var graphql9 = __toESM(require_graphql2(), 1);
58131
58144
  function fieldKey(config2, field) {
58132
58145
  const attributeName = field.alias?.value || field.name.value;
58133
- const printed = graphql10.print(field);
58134
- const secondParse = graphql10.parse(`{${printed}}`).definitions[0].selectionSet.selections[0];
58146
+ const printed = graphql9.print(field);
58147
+ const secondParse = graphql9.parse(`{${printed}}`).definitions[0].selectionSet.selections[0];
58135
58148
  const paginated = !!field.directives?.find(
58136
58149
  (directive) => directive.name.value === config2.paginateDirective
58137
58150
  );
@@ -58226,8 +58239,8 @@ function selection({
58226
58239
  const typeConditionName = field.typeCondition.name.value;
58227
58240
  const typeCondition = config2.schema.getType(typeConditionName);
58228
58241
  const possibleTypes = [];
58229
- if (!graphql11.isAbstractType(typeCondition)) {
58230
- } else if (graphql11.isAbstractType(parentType)) {
58242
+ if (!graphql10.isAbstractType(typeCondition)) {
58243
+ } else if (graphql10.isAbstractType(parentType)) {
58231
58244
  const possibleParentTypes = config2.schema.getPossibleTypes(parentType).map((type) => type.name);
58232
58245
  for (const possible of config2.schema.getPossibleTypes(typeCondition)) {
58233
58246
  if (possibleParentTypes.includes(possible.name)) {
@@ -58275,7 +58288,7 @@ function selection({
58275
58288
  } else {
58276
58289
  let typeRef = type.getFields()[field.name.value].type;
58277
58290
  fieldType = getRootType(typeRef);
58278
- nullable = !graphql11.isNonNullType(typeRef);
58291
+ nullable = !graphql10.isNonNullType(typeRef);
58279
58292
  }
58280
58293
  const typeName = fieldType.toString();
58281
58294
  const pathSoFar = path2.concat(attributeName);
@@ -58340,7 +58353,7 @@ function selection({
58340
58353
  {}
58341
58354
  );
58342
58355
  }
58343
- if (graphql11.isInterfaceType(fieldType) || graphql11.isUnionType(fieldType)) {
58356
+ if (graphql10.isInterfaceType(fieldType) || graphql10.isUnionType(fieldType)) {
58344
58357
  fieldObj.abstract = true;
58345
58358
  }
58346
58359
  object.fields = {
@@ -58397,7 +58410,7 @@ function artifactGenerator(stats) {
58397
58410
  return async function(config2, docs) {
58398
58411
  const filterTypes = {};
58399
58412
  for (const doc of docs) {
58400
- graphql12.visit(doc.document, {
58413
+ graphql11.visit(doc.document, {
58401
58414
  Directive(node, _, __, ___, ancestors) {
58402
58415
  if (node.name.value !== config2.listDirective) {
58403
58416
  return;
@@ -58456,7 +58469,7 @@ function artifactGenerator(stats) {
58456
58469
  return;
58457
58470
  }
58458
58471
  const usedVariableNames = /* @__PURE__ */ new Set();
58459
- let documentWithoutInternalDirectives = graphql12.visit(document, {
58472
+ let documentWithoutInternalDirectives = graphql11.visit(document, {
58460
58473
  Directive(node) {
58461
58474
  if (config2.isInternalDirective(node)) {
58462
58475
  return null;
@@ -58469,7 +58482,7 @@ function artifactGenerator(stats) {
58469
58482
  }
58470
58483
  }
58471
58484
  });
58472
- let documentWithoutExtraVariables = graphql12.visit(
58485
+ let documentWithoutExtraVariables = graphql11.visit(
58473
58486
  documentWithoutInternalDirectives,
58474
58487
  {
58475
58488
  VariableDefinition(variableDefinitionNode) {
@@ -58480,13 +58493,13 @@ function artifactGenerator(stats) {
58480
58493
  }
58481
58494
  }
58482
58495
  );
58483
- let rawString = graphql12.print(documentWithoutExtraVariables);
58496
+ let rawString = graphql11.print(documentWithoutExtraVariables);
58484
58497
  let docKind = doc.kind;
58485
58498
  const operations = document.definitions.filter(
58486
- ({ kind }) => kind === graphql12.Kind.OPERATION_DEFINITION
58499
+ ({ kind }) => kind === graphql11.Kind.OPERATION_DEFINITION
58487
58500
  );
58488
58501
  const fragments = document.definitions.filter(
58489
- ({ kind }) => kind === graphql12.Kind.FRAGMENT_DEFINITION
58502
+ ({ kind }) => kind === graphql11.Kind.FRAGMENT_DEFINITION
58490
58503
  );
58491
58504
  let rootType = "";
58492
58505
  let selectionSet;
@@ -58728,15 +58741,15 @@ async function generatePluginRuntime(config2, plugin) {
58728
58741
  var recast12 = __toESM(require_main2(), 1);
58729
58742
 
58730
58743
  // src/codegen/generators/typescript/addReferencedInputTypes.ts
58731
- var graphql15 = __toESM(require_graphql2(), 1);
58744
+ var graphql14 = __toESM(require_graphql2(), 1);
58732
58745
  var recast9 = __toESM(require_main2(), 1);
58733
58746
 
58734
58747
  // src/codegen/generators/typescript/typeReference.ts
58735
- var graphql14 = __toESM(require_graphql2(), 1);
58748
+ var graphql13 = __toESM(require_graphql2(), 1);
58736
58749
  var recast8 = __toESM(require_main2(), 1);
58737
58750
 
58738
58751
  // src/codegen/generators/typescript/types.ts
58739
- var graphql13 = __toESM(require_graphql2(), 1);
58752
+ var graphql12 = __toESM(require_graphql2(), 1);
58740
58753
  var recast7 = __toESM(require_main2(), 1);
58741
58754
  var AST7 = recast7.types.builders;
58742
58755
  function readonlyProperty(prop, enable = true) {
@@ -58770,7 +58783,7 @@ function scalarPropertyValue(config2, missingScalars, target) {
58770
58783
  return AST7.tsStringKeyword();
58771
58784
  }
58772
58785
  default: {
58773
- if (graphql13.isNonNullType(target) && "ofType" in target) {
58786
+ if (graphql12.isNonNullType(target) && "ofType" in target) {
58774
58787
  return scalarPropertyValue(
58775
58788
  config2,
58776
58789
  missingScalars,
@@ -58791,7 +58804,7 @@ var AST8 = recast8.types.builders;
58791
58804
  function tsTypeReference(config2, missingScalars, definition) {
58792
58805
  const { type, wrappers } = unwrapType(config2, definition.type);
58793
58806
  let result;
58794
- if (graphql14.isScalarType(type)) {
58807
+ if (graphql13.isScalarType(type)) {
58795
58808
  result = scalarPropertyValue(config2, missingScalars, type);
58796
58809
  } else {
58797
58810
  result = AST8.tsTypeReference(AST8.identifier(type.name));
@@ -58812,17 +58825,17 @@ function tsTypeReference(config2, missingScalars, definition) {
58812
58825
  var AST9 = recast9.types.builders;
58813
58826
  function addReferencedInputTypes(config2, filepath, body, visitedTypes, missingScalars, rootType) {
58814
58827
  const { type } = unwrapType(config2, rootType);
58815
- if (graphql15.isScalarType(type)) {
58828
+ if (graphql14.isScalarType(type)) {
58816
58829
  return;
58817
58830
  }
58818
58831
  if (visitedTypes.has(type.name)) {
58819
58832
  return;
58820
58833
  }
58821
- if (graphql15.isUnionType(type)) {
58834
+ if (graphql14.isUnionType(type)) {
58822
58835
  throw new HoudiniError({ filepath, message: "Input Unions are not supported yet. Sorry!" });
58823
58836
  }
58824
58837
  visitedTypes.add(type.name);
58825
- if (graphql15.isEnumType(type)) {
58838
+ if (graphql14.isEnumType(type)) {
58826
58839
  ensureImports({
58827
58840
  config: config2,
58828
58841
  body,
@@ -58839,7 +58852,7 @@ function addReferencedInputTypes(config2, filepath, body, visitedTypes, missingS
58839
58852
  AST9.tsPropertySignature(
58840
58853
  AST9.identifier(field.name),
58841
58854
  AST9.tsTypeAnnotation(tsTypeReference(config2, missingScalars, field)),
58842
- graphql15.isNullableType(field.type)
58855
+ graphql14.isNullableType(field.type)
58843
58856
  )
58844
58857
  );
58845
58858
  }
@@ -58847,7 +58860,7 @@ function addReferencedInputTypes(config2, filepath, body, visitedTypes, missingS
58847
58860
  }
58848
58861
 
58849
58862
  // src/codegen/generators/typescript/imperativeCache.ts
58850
- var graphql16 = __toESM(require_graphql2(), 1);
58863
+ var graphql15 = __toESM(require_graphql2(), 1);
58851
58864
  var recast10 = __toESM(require_main2(), 1);
58852
58865
  var AST10 = recast10.types.builders;
58853
58866
  async function imperativeCacheTypef(config2, docs) {
@@ -58883,7 +58896,7 @@ function typeDefinitions(config2, body) {
58883
58896
  const operationTypes = [config2.schema.getMutationType(), config2.schema.getSubscriptionType()].filter(Boolean).map((type) => type?.name);
58884
58897
  const visitedTypes = /* @__PURE__ */ new Set();
58885
58898
  const types14 = Object.values(config2.schema.getTypeMap()).filter(
58886
- (type) => !graphql16.isAbstractType(type) && !graphql16.isScalarType(type) && !graphql16.isEnumType(type) && !graphql16.isInputObjectType(type) && !type.name.startsWith("__") && !operationTypes.includes(type.name)
58899
+ (type) => !graphql15.isAbstractType(type) && !graphql15.isScalarType(type) && !graphql15.isEnumType(type) && !graphql15.isInputObjectType(type) && !type.name.startsWith("__") && !operationTypes.includes(type.name)
58887
58900
  );
58888
58901
  return AST10.tsTypeLiteral(
58889
58902
  types14.map((type) => {
@@ -58893,7 +58906,7 @@ function typeDefinitions(config2, body) {
58893
58906
  }
58894
58907
  let idFields = AST10.tsNeverKeyword();
58895
58908
  const keys = keyFieldsForType(config2.configFile, type.name);
58896
- if (graphql16.isObjectType(type) && keys.length > 0 && keys.every((key) => type.getFields()[key])) {
58909
+ if (graphql15.isObjectType(type) && keys.length > 0 && keys.every((key) => type.getFields()[key])) {
58897
58910
  idFields = AST10.tsTypeLiteral(
58898
58911
  keys.map((key) => {
58899
58912
  const fieldType = type.getFields()[key];
@@ -58910,21 +58923,21 @@ function typeDefinitions(config2, body) {
58910
58923
  idFields = AST10.tsTypeLiteral([]);
58911
58924
  }
58912
58925
  let fields = AST10.tsTypeLiteral([]);
58913
- if (graphql16.isObjectType(type)) {
58926
+ if (graphql15.isObjectType(type)) {
58914
58927
  fields = AST10.tsTypeLiteral(
58915
58928
  Object.entries(type.getFields()).map(
58916
58929
  ([key, fieldType]) => {
58917
58930
  const unwrapped = unwrapType(config2, fieldType.type);
58918
58931
  let typeOptions = AST10.tsUnionType([]);
58919
- if (graphql16.isScalarType(unwrapped.type)) {
58932
+ if (graphql15.isScalarType(unwrapped.type)) {
58920
58933
  typeOptions.types.push(
58921
58934
  scalarPropertyValue(config2, /* @__PURE__ */ new Set(), unwrapped.type)
58922
58935
  );
58923
- } else if (graphql16.isEnumType(unwrapped.type)) {
58936
+ } else if (graphql15.isEnumType(unwrapped.type)) {
58924
58937
  typeOptions.types.push(
58925
58938
  AST10.tsTypeReference(AST10.identifier(unwrapped.type.name))
58926
58939
  );
58927
- } else if (!graphql16.isAbstractType(unwrapped.type)) {
58940
+ } else if (!graphql15.isAbstractType(unwrapped.type)) {
58928
58941
  typeOptions.types.push(record(unwrapped.type.name));
58929
58942
  } else {
58930
58943
  typeOptions.types.push(
@@ -59010,7 +59023,7 @@ function listDefinitions(config2, docs) {
59010
59023
  const lists = [];
59011
59024
  const visitedLists = /* @__PURE__ */ new Set();
59012
59025
  for (const doc of docs) {
59013
- graphql16.visit(doc.document, {
59026
+ graphql15.visit(doc.document, {
59014
59027
  Directive(node, key, parent, path2, ancestors) {
59015
59028
  if (![config2.listDirective, config2.paginateDirective].includes(node.name.value)) {
59016
59029
  return;
@@ -59030,7 +59043,7 @@ function listDefinitions(config2, docs) {
59030
59043
  const targetFieldDefinition = parentType.getFields()[targetField.name.value];
59031
59044
  const { type: listType } = unwrapType(config2, targetFieldDefinition.type);
59032
59045
  const possibleTypes = [];
59033
- if (graphql16.isAbstractType(listType)) {
59046
+ if (graphql15.isAbstractType(listType)) {
59034
59047
  possibleTypes.push(
59035
59048
  ...config2.schema.getPossibleTypes(listType).map((possible) => possible.name)
59036
59049
  );
@@ -59094,7 +59107,7 @@ function record(name2) {
59094
59107
  }
59095
59108
 
59096
59109
  // src/codegen/generators/typescript/inlineType.ts
59097
- var graphql17 = __toESM(require_graphql2(), 1);
59110
+ var graphql16 = __toESM(require_graphql2(), 1);
59098
59111
  var recast11 = __toESM(require_main2(), 1);
59099
59112
  var AST11 = recast11.types.builders;
59100
59113
  var fragmentKey = "$fragments";
@@ -59113,9 +59126,9 @@ function inlineType({
59113
59126
  }) {
59114
59127
  const { type, wrappers } = unwrapType(config2, rootType);
59115
59128
  let result;
59116
- if (graphql17.isScalarType(type)) {
59129
+ if (graphql16.isScalarType(type)) {
59117
59130
  result = scalarPropertyValue(config2, missingScalars, type);
59118
- } else if (graphql17.isEnumType(type)) {
59131
+ } else if (graphql16.isEnumType(type)) {
59119
59132
  if (!visitedTypes.has(type.name)) {
59120
59133
  ensureImports({
59121
59134
  config: config2,
@@ -59133,11 +59146,11 @@ function inlineType({
59133
59146
  for (const selection2 of selections) {
59134
59147
  if (selection2.kind === "InlineFragment" && selection2.typeCondition) {
59135
59148
  const fragmentType = config2.schema.getType(selection2.typeCondition.name.value);
59136
- if (!graphql17.isInterfaceType(type) && !graphql17.isUnionType(type)) {
59149
+ if (!graphql16.isInterfaceType(type) && !graphql16.isUnionType(type)) {
59137
59150
  selectedFields.push(...selection2.selectionSet.selections);
59138
59151
  continue;
59139
59152
  }
59140
- if (!graphql17.isInterfaceType(fragmentType) && !graphql17.isUnionType(fragmentType)) {
59153
+ if (!graphql16.isInterfaceType(fragmentType) && !graphql16.isUnionType(fragmentType)) {
59141
59154
  if (!inlineFragments[fragmentType.name]) {
59142
59155
  inlineFragments[fragmentType.name] = [];
59143
59156
  }
@@ -59257,7 +59270,7 @@ function inlineType({
59257
59270
  }
59258
59271
  }
59259
59272
  }
59260
- if (objectType.type === "TSTypeLiteral" && !graphql17.isInterfaceType(fragmentRootType) && !graphql17.isUnionType(fragmentRootType)) {
59273
+ if (objectType.type === "TSTypeLiteral" && !graphql16.isInterfaceType(fragmentRootType) && !graphql16.isUnionType(fragmentRootType)) {
59261
59274
  const existingTypenameIndex = objectType.members.findIndex(
59262
59275
  (member) => member.type === "TSPropertySignature" && member.key.type === "Identifier" && member.key.name === "__typename"
59263
59276
  );
@@ -59324,7 +59337,7 @@ function selectionTypeInfo(schema, filepath, rootType, selection2) {
59324
59337
  },
59325
59338
  type: schema.getType("String")
59326
59339
  };
59327
- } else if (graphql17.isNonNullType(rootType) && "getFields" in rootType.ofType) {
59340
+ } else if (graphql16.isNonNullType(rootType) && "getFields" in rootType.ofType) {
59328
59341
  fields = rootType.ofType.getFields();
59329
59342
  } else {
59330
59343
  fields = rootType.getFields();
@@ -59336,7 +59349,7 @@ function selectionTypeInfo(schema, filepath, rootType, selection2) {
59336
59349
  message: `Could not find type information for field ${rootType.toString()}.${selectionName} ${field}`
59337
59350
  });
59338
59351
  }
59339
- const fieldType = graphql17.getNamedType(field.type);
59352
+ const fieldType = graphql16.getNamedType(field.type);
59340
59353
  if (!fieldType) {
59341
59354
  throw new HoudiniError({
59342
59355
  filepath,
@@ -59657,7 +59670,7 @@ async function generateFragmentTypeDefs(config2, filepath, body, selections, def
59657
59670
  }
59658
59671
 
59659
59672
  // src/codegen/generators/persistedQueries/index.ts
59660
- var graphql18 = __toESM(require_graphql2(), 1);
59673
+ var graphql17 = __toESM(require_graphql2(), 1);
59661
59674
  async function persistOutputGenerator(config2, docs) {
59662
59675
  if (typeof config2.persistedQueryPath !== "string" || config2.persistedQueryPath.length === 0)
59663
59676
  return;
@@ -59669,8 +59682,8 @@ async function persistOutputGenerator(config2, docs) {
59669
59682
  if (!generateArtifact) {
59670
59683
  return acc;
59671
59684
  }
59672
- let rawString = graphql18.print(
59673
- graphql18.visit(document, {
59685
+ let rawString = graphql17.print(
59686
+ graphql17.visit(document, {
59674
59687
  Directive(node) {
59675
59688
  if (config2.isInternalDirective(node)) {
59676
59689
  return null;
@@ -59679,7 +59692,7 @@ async function persistOutputGenerator(config2, docs) {
59679
59692
  })
59680
59693
  );
59681
59694
  const operations = document.definitions.filter(
59682
- ({ kind }) => kind === graphql18.Kind.OPERATION_DEFINITION
59695
+ ({ kind }) => kind === graphql17.Kind.OPERATION_DEFINITION
59683
59696
  );
59684
59697
  if (operations.length > 0 && operations[0].kind === "OperationDefinition") {
59685
59698
  acc[hashDocument(rawString)] = rawString;
@@ -59692,11 +59705,11 @@ async function persistOutputGenerator(config2, docs) {
59692
59705
  }
59693
59706
 
59694
59707
  // src/codegen/generators/definitions/enums.ts
59695
- var graphql19 = __toESM(require_graphql2(), 1);
59708
+ var graphql18 = __toESM(require_graphql2(), 1);
59696
59709
  var recast13 = __toESM(require_main2(), 1);
59697
59710
  var AST13 = recast13.types.builders;
59698
59711
  async function definitionsGenerator(config2) {
59699
- const enums = graphql19.parse(graphql19.printSchema(config2.schema)).definitions.filter(
59712
+ const enums = graphql18.parse(graphql18.printSchema(config2.schema)).definitions.filter(
59700
59713
  (definition) => definition.kind === "EnumTypeDefinition"
59701
59714
  ).filter((def) => !config2.isInternalEnum(def));
59702
59715
  const runtimeDefinitions = recast13.print(
@@ -59869,7 +59882,7 @@ function flattenFragments(filepath, operation, fragments) {
59869
59882
  }
59870
59883
 
59871
59884
  // src/codegen/transforms/schema.ts
59872
- var graphql21 = __toESM(require_graphql2(), 1);
59885
+ var graphql20 = __toESM(require_graphql2(), 1);
59873
59886
  async function graphqlExtensions(config2, documents) {
59874
59887
  const internalSchema = `
59875
59888
  enum CachePolicy {
@@ -59947,19 +59960,19 @@ directive @${config2.maskEnableDirective} on FRAGMENT_SPREAD
59947
59960
  """
59948
59961
  directive @${config2.maskDisableDirective} on FRAGMENT_SPREAD
59949
59962
  `;
59950
- let currentSchema = graphql21.printSchema(config2.schema);
59963
+ let currentSchema = graphql20.printSchema(config2.schema);
59951
59964
  if (!currentSchema.includes(`directive @${config2.listDirective}`)) {
59952
59965
  currentSchema += internalSchema;
59953
59966
  }
59954
59967
  config2.newSchema += internalSchema;
59955
- config2.schema = graphql21.buildSchema(currentSchema);
59968
+ config2.schema = graphql20.buildSchema(currentSchema);
59956
59969
  }
59957
59970
 
59958
59971
  // src/codegen/transforms/typename.ts
59959
- var graphql22 = __toESM(require_graphql2(), 1);
59972
+ var graphql21 = __toESM(require_graphql2(), 1);
59960
59973
  async function addTypename(config2, documents) {
59961
59974
  for (const doc of documents) {
59962
- doc.document = graphql22.visit(doc.document, {
59975
+ doc.document = graphql21.visit(doc.document, {
59963
59976
  Field(node, key, parent, path2, ancestors) {
59964
59977
  if (!node.selectionSet) {
59965
59978
  return;
@@ -59971,7 +59984,7 @@ async function addTypename(config2, documents) {
59971
59984
  );
59972
59985
  const field = type.getFields()[node.name.value];
59973
59986
  const fieldType = unwrapType(config2, field.type).type;
59974
- if (graphql22.isInterfaceType(fieldType) || graphql22.isUnionType(fieldType)) {
59987
+ if (graphql21.isInterfaceType(fieldType) || graphql21.isUnionType(fieldType)) {
59975
59988
  return {
59976
59989
  ...node,
59977
59990
  selectionSet: {
@@ -59979,9 +59992,9 @@ async function addTypename(config2, documents) {
59979
59992
  selections: [
59980
59993
  ...node.selectionSet.selections,
59981
59994
  {
59982
- kind: graphql22.Kind.FIELD,
59995
+ kind: graphql21.Kind.FIELD,
59983
59996
  name: {
59984
- kind: graphql22.Kind.NAME,
59997
+ kind: graphql21.Kind.NAME,
59985
59998
  value: "__typename"
59986
59999
  }
59987
60000
  }
@@ -59995,10 +60008,10 @@ async function addTypename(config2, documents) {
59995
60008
  }
59996
60009
 
59997
60010
  // src/codegen/transforms/addID.ts
59998
- var graphql23 = __toESM(require_graphql2(), 1);
60011
+ var graphql22 = __toESM(require_graphql2(), 1);
59999
60012
  async function addID(config2, documents) {
60000
60013
  for (const doc of documents) {
60001
- doc.document = graphql23.visit(doc.document, {
60014
+ doc.document = graphql22.visit(doc.document, {
60002
60015
  Field(node, key, parent, path2, ancestors) {
60003
60016
  if (!node.selectionSet) {
60004
60017
  return;
@@ -60011,7 +60024,7 @@ async function addID(config2, documents) {
60011
60024
  const field = type.getFields()[node.name.value];
60012
60025
  const fieldType = unwrapType(config2, field.type).type;
60013
60026
  if (node.selectionSet?.selections.length > 0) {
60014
- if (!graphql23.isObjectType(fieldType) && !graphql23.isInterfaceType(fieldType)) {
60027
+ if (!graphql22.isObjectType(fieldType) && !graphql22.isInterfaceType(fieldType)) {
60015
60028
  return;
60016
60029
  }
60017
60030
  const keyFields = config2.keyFieldsForType(fieldType.name);
@@ -60026,9 +60039,9 @@ async function addID(config2, documents) {
60026
60039
  continue;
60027
60040
  }
60028
60041
  selections.push({
60029
- kind: graphql23.Kind.FIELD,
60042
+ kind: graphql22.Kind.FIELD,
60030
60043
  name: {
60031
- kind: graphql23.Kind.NAME,
60044
+ kind: graphql22.Kind.NAME,
60032
60045
  value: keyField
60033
60046
  }
60034
60047
  });
@@ -60047,8 +60060,8 @@ async function addID(config2, documents) {
60047
60060
  }
60048
60061
 
60049
60062
  // src/codegen/transforms/fragmentVariables.ts
60050
- var graphql24 = __toESM(require_graphql2(), 1);
60051
- var GraphqlKinds2 = graphql24.Kind;
60063
+ var graphql23 = __toESM(require_graphql2(), 1);
60064
+ var GraphqlKinds2 = graphql23.Kind;
60052
60065
  async function fragmentVariables(config2, documents) {
60053
60066
  const fragments = collectFragments(config2, documents);
60054
60067
  const generatedFragments = {};
@@ -60071,7 +60084,7 @@ async function fragmentVariables(config2, documents) {
60071
60084
  });
60072
60085
  }
60073
60086
  const doc = {
60074
- kind: graphql24.Kind.DOCUMENT,
60087
+ kind: graphql23.Kind.DOCUMENT,
60075
60088
  definitions: Object.values(generatedFragments)
60076
60089
  };
60077
60090
  documents.push({
@@ -60107,7 +60120,7 @@ function inlineFragmentArgs({
60107
60120
  filepath,
60108
60121
  document
60109
60122
  ).reduce((acc, arg) => ({ ...acc, [arg.name]: arg }), {});
60110
- const result = graphql24.visit(document, {
60123
+ const result = graphql23.visit(document, {
60111
60124
  FragmentSpread(node) {
60112
60125
  const { definition } = fragmentDefinitions[node.name.value];
60113
60126
  let { args, hash } = collectWithArguments(config2, filepath, node, scope);
@@ -60195,7 +60208,7 @@ function inlineFragmentArgs({
60195
60208
  });
60196
60209
  if (newName) {
60197
60210
  result.name = {
60198
- kind: graphql24.Kind.NAME,
60211
+ kind: graphql23.Kind.NAME,
60199
60212
  value: newName
60200
60213
  };
60201
60214
  }
@@ -60307,7 +60320,7 @@ function operationScope(operation) {
60307
60320
  }
60308
60321
 
60309
60322
  // src/codegen/validators/typeCheck.ts
60310
- var graphql25 = __toESM(require_graphql2(), 1);
60323
+ var graphql24 = __toESM(require_graphql2(), 1);
60311
60324
  async function typeCheck(config2, docs) {
60312
60325
  const errors = [];
60313
60326
  const freeLists = [];
@@ -60315,11 +60328,11 @@ async function typeCheck(config2, docs) {
60315
60328
  const listTypes = [];
60316
60329
  const fragments = {};
60317
60330
  for (const { document: parsed, filename } of docs) {
60318
- graphql25.visit(parsed, {
60319
- [graphql25.Kind.FRAGMENT_DEFINITION](definition) {
60331
+ graphql24.visit(parsed, {
60332
+ [graphql24.Kind.FRAGMENT_DEFINITION](definition) {
60320
60333
  fragments[definition.name.value] = definition;
60321
60334
  },
60322
- [graphql25.Kind.DIRECTIVE](directive, _, parent, __, ancestors) {
60335
+ [graphql24.Kind.DIRECTIVE](directive, _, parent, __, ancestors) {
60323
60336
  if (![config2.listDirective, config2.paginateDirective].includes(directive.name.value)) {
60324
60337
  return;
60325
60338
  }
@@ -60365,14 +60378,14 @@ async function typeCheck(config2, docs) {
60365
60378
  );
60366
60379
  return;
60367
60380
  }
60368
- if (graphql25.isListType(rootType) || graphql25.isNonNullType(rootType) && graphql25.isListType(rootType.ofType)) {
60381
+ if (graphql24.isListType(rootType) || graphql24.isNonNullType(rootType) && graphql24.isListType(rootType.ofType)) {
60369
60382
  needsParent = true;
60370
60383
  break;
60371
60384
  }
60372
- if (graphql25.isNonNullType(rootType) && "ofType" in rootType) {
60385
+ if (graphql24.isNonNullType(rootType) && "ofType" in rootType) {
60373
60386
  rootType = rootType.ofType;
60374
60387
  }
60375
- if (graphql25.isScalarType(rootType)) {
60388
+ if (graphql24.isScalarType(rootType)) {
60376
60389
  break;
60377
60390
  }
60378
60391
  rootType = rootType?.getFields()[parent2.name.value]?.type;
@@ -60448,9 +60461,9 @@ async function typeCheck(config2, docs) {
60448
60461
  );
60449
60462
  }
60450
60463
  let targetTypes = [type];
60451
- if (graphql25.isUnionType(type)) {
60464
+ if (graphql24.isUnionType(type)) {
60452
60465
  targetTypes = config2.schema.getPossibleTypes(type);
60453
- } else if (graphql25.isInterfaceType(type)) {
60466
+ } else if (graphql24.isInterfaceType(type)) {
60454
60467
  try {
60455
60468
  for (const key of config2.keyFieldsForType(type.name)) {
60456
60469
  if (!type.getFields()[key]) {
@@ -60488,13 +60501,13 @@ async function typeCheck(config2, docs) {
60488
60501
  if (errors.length > 0) {
60489
60502
  throw errors;
60490
60503
  }
60491
- const rules = (filepath) => [...graphql25.specifiedRules].filter(
60504
+ const rules = (filepath) => [...graphql24.specifiedRules].filter(
60492
60505
  (rule) => ![
60493
- graphql25.NoUnusedFragmentsRule,
60494
- graphql25.KnownFragmentNamesRule,
60495
- graphql25.ExecutableDefinitionsRule,
60496
- graphql25.KnownDirectivesRule,
60497
- graphql25.KnownArgumentNamesRule
60506
+ graphql24.NoUnusedFragmentsRule,
60507
+ graphql24.KnownFragmentNamesRule,
60508
+ graphql24.ExecutableDefinitionsRule,
60509
+ graphql24.KnownDirectivesRule,
60510
+ graphql24.KnownArgumentNamesRule
60498
60511
  ].includes(rule)
60499
60512
  ).concat(
60500
60513
  validateLists({
@@ -60513,7 +60526,7 @@ async function typeCheck(config2, docs) {
60513
60526
  noUnusedFragmentArguments(config2)
60514
60527
  );
60515
60528
  for (const { filename, document: parsed } of docs) {
60516
- for (const error of graphql25.validate(config2.schema, parsed, rules(filename))) {
60529
+ for (const error of graphql24.validate(config2.schema, parsed, rules(filename))) {
60517
60530
  errors.push(
60518
60531
  new HoudiniError({
60519
60532
  filepath: filename,
@@ -60539,7 +60552,7 @@ var validateLists = ({
60539
60552
  if (!config2.isListFragment(node.name.value)) {
60540
60553
  if (!fragments[node.name.value]) {
60541
60554
  ctx.reportError(
60542
- new graphql25.GraphQLError(
60555
+ new graphql24.GraphQLError(
60543
60556
  "Encountered unknown fragment: " + node.name.value
60544
60557
  )
60545
60558
  );
@@ -60549,7 +60562,7 @@ var validateLists = ({
60549
60562
  const listName = config2.listNameFromFragment(node.name.value);
60550
60563
  if (!lists.includes(listName)) {
60551
60564
  ctx.reportError(
60552
- new graphql25.GraphQLError(
60565
+ new graphql24.GraphQLError(
60553
60566
  "Encountered fragment referencing unknown list: " + listName
60554
60567
  )
60555
60568
  );
@@ -60574,7 +60587,7 @@ var validateLists = ({
60574
60587
  );
60575
60588
  if (parentArg) {
60576
60589
  ctx.reportError(
60577
- new graphql25.GraphQLError(
60590
+ new graphql24.GraphQLError(
60578
60591
  `@${config2.deprecatedlistDirectiveParentIDArg} should be defined only in it's own directive now`
60579
60592
  )
60580
60593
  );
@@ -60590,7 +60603,7 @@ var validateLists = ({
60590
60603
  return;
60591
60604
  }
60592
60605
  ctx.reportError(
60593
- new graphql25.GraphQLError(
60606
+ new graphql24.GraphQLError(
60594
60607
  `For this list fragment, you need to add or @${config2.listParentDirective} or @${config2.listAllListsDirective} directive to specify the behavior`
60595
60608
  )
60596
60609
  );
@@ -60600,7 +60613,7 @@ var validateLists = ({
60600
60613
  const directiveName = node.name.value;
60601
60614
  if (directiveName === "connection") {
60602
60615
  ctx.reportError(
60603
- new graphql25.GraphQLError(
60616
+ new graphql24.GraphQLError(
60604
60617
  "@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."
60605
60618
  )
60606
60619
  );
@@ -60609,7 +60622,7 @@ var validateLists = ({
60609
60622
  if (!config2.isInternalDirective(node)) {
60610
60623
  if (!config2.schema.getDirective(directiveName)) {
60611
60624
  ctx.reportError(
60612
- new graphql25.GraphQLError(
60625
+ new graphql24.GraphQLError(
60613
60626
  "Encountered unknown directive: " + directiveName
60614
60627
  )
60615
60628
  );
@@ -60618,7 +60631,7 @@ var validateLists = ({
60618
60631
  }
60619
60632
  if (config2.isListOperationDirective(directiveName) && !listTypes.includes(config2.listNameFromDirective(directiveName))) {
60620
60633
  ctx.reportError(
60621
- new graphql25.GraphQLError(
60634
+ new graphql24.GraphQLError(
60622
60635
  "Encountered directive referencing unknown list: " + directiveName
60623
60636
  )
60624
60637
  );
@@ -60629,7 +60642,7 @@ var validateLists = ({
60629
60642
  };
60630
60643
  function knownArguments(config2) {
60631
60644
  return function(ctx) {
60632
- const nativeValidator = graphql25.KnownArgumentNamesRule(ctx);
60645
+ const nativeValidator = graphql24.KnownArgumentNamesRule(ctx);
60633
60646
  return {
60634
60647
  ...nativeValidator,
60635
60648
  Directive(directiveNode) {
@@ -60662,7 +60675,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
60662
60675
  for (const arg of node.arguments || []) {
60663
60676
  if (arg.value.kind !== "ObjectValue") {
60664
60677
  ctx.reportError(
60665
- new graphql25.GraphQLError("values in @arguments must be an object")
60678
+ new graphql24.GraphQLError("values in @arguments must be an object")
60666
60679
  );
60667
60680
  return;
60668
60681
  }
@@ -60672,13 +60685,13 @@ function validateFragmentArguments(config2, filepath, fragments) {
60672
60685
  );
60673
60686
  if (!typeArg) {
60674
60687
  ctx.reportError(
60675
- new graphql25.GraphQLError("missing type field for @arguments directive")
60688
+ new graphql24.GraphQLError("missing type field for @arguments directive")
60676
60689
  );
60677
60690
  return;
60678
60691
  }
60679
- if (typeArg.value.kind !== graphql25.Kind.STRING) {
60692
+ if (typeArg.value.kind !== graphql24.Kind.STRING) {
60680
60693
  ctx.reportError(
60681
- new graphql25.GraphQLError("type field to @arguments must be a string")
60694
+ new graphql24.GraphQLError("type field to @arguments must be a string")
60682
60695
  );
60683
60696
  return;
60684
60697
  }
@@ -60691,7 +60704,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
60691
60704
  );
60692
60705
  if (typeArg.value.value !== defaultValueType) {
60693
60706
  ctx.reportError(
60694
- new graphql25.GraphQLError(
60707
+ new graphql24.GraphQLError(
60695
60708
  `Invalid default value provided for ${arg.name.value}. Expected ${typeArg.value.value}, found ${defaultValueType}`
60696
60709
  )
60697
60710
  );
@@ -60709,7 +60722,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
60709
60722
  try {
60710
60723
  args = fragmentArguments(config2, filepath, fragments[fragmentName]);
60711
60724
  } catch (e) {
60712
- ctx.reportError(new graphql25.GraphQLError(e.message));
60725
+ ctx.reportError(new graphql24.GraphQLError(e.message));
60713
60726
  return;
60714
60727
  }
60715
60728
  fragmentArguments2[fragmentName] = args;
@@ -60732,7 +60745,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
60732
60745
  );
60733
60746
  if (missing.length > 0) {
60734
60747
  ctx.reportError(
60735
- new graphql25.GraphQLError(
60748
+ new graphql24.GraphQLError(
60736
60749
  "The following arguments are missing from this fragment: " + JSON.stringify(missing)
60737
60750
  )
60738
60751
  );
@@ -60743,7 +60756,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
60743
60756
  );
60744
60757
  if (unknown.length > 0) {
60745
60758
  ctx.reportError(
60746
- new graphql25.GraphQLError(
60759
+ new graphql24.GraphQLError(
60747
60760
  "Encountered unknown arguments: " + JSON.stringify(unknown)
60748
60761
  )
60749
60762
  );
@@ -60755,7 +60768,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
60755
60768
  ]
60756
60769
  );
60757
60770
  for (const [applied, target] of zipped) {
60758
- if (applied.value.kind === graphql25.Kind.VARIABLE || applied.value.kind === graphql25.Kind.LIST || applied.value.kind === graphql25.Kind.OBJECT) {
60771
+ if (applied.value.kind === graphql24.Kind.VARIABLE || applied.value.kind === graphql24.Kind.LIST || applied.value.kind === graphql24.Kind.OBJECT) {
60759
60772
  continue;
60760
60773
  }
60761
60774
  const appliedType = applied.value.kind.substring(
@@ -60764,7 +60777,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
60764
60777
  );
60765
60778
  if (appliedType !== target) {
60766
60779
  ctx.reportError(
60767
- new graphql25.GraphQLError(
60780
+ new graphql24.GraphQLError(
60768
60781
  `Invalid argument type. Expected ${target}, found ${appliedType}`
60769
60782
  )
60770
60783
  );
@@ -60785,7 +60798,7 @@ function paginateArgs(config2, filepath) {
60785
60798
  }
60786
60799
  if (alreadyPaginated) {
60787
60800
  ctx.reportError(
60788
- new graphql25.GraphQLError(
60801
+ new graphql24.GraphQLError(
60789
60802
  `@${config2.paginateDirective} can only appear in a document once.`
60790
60803
  )
60791
60804
  );
@@ -60800,7 +60813,7 @@ function paginateArgs(config2, filepath) {
60800
60813
  const hasRequiredArgs = definitionArgs.find((arg) => arg.required);
60801
60814
  if (hasRequiredArgs) {
60802
60815
  ctx.reportError(
60803
- new graphql25.GraphQLError(
60816
+ new graphql24.GraphQLError(
60804
60817
  "@paginate cannot appear on a document with required args"
60805
60818
  )
60806
60819
  );
@@ -60832,14 +60845,14 @@ function paginateArgs(config2, filepath) {
60832
60845
  const backwards = appliedArgs.has("last");
60833
60846
  if (!forward && !backwards) {
60834
60847
  ctx.reportError(
60835
- new graphql25.GraphQLError(
60848
+ new graphql24.GraphQLError(
60836
60849
  "A field with cursor-based pagination must have a first or last argument"
60837
60850
  )
60838
60851
  );
60839
60852
  }
60840
60853
  if (forward && backwards) {
60841
60854
  ctx.reportError(
60842
- new graphql25.GraphQLError(
60855
+ new graphql24.GraphQLError(
60843
60856
  `A field with cursor pagination cannot go forwards an backwards simultaneously`
60844
60857
  )
60845
60858
  );
@@ -60853,7 +60866,7 @@ function paginateArgs(config2, filepath) {
60853
60866
  );
60854
60867
  if (!appliedLimitArg) {
60855
60868
  ctx.reportError(
60856
- new graphql25.GraphQLError(
60869
+ new graphql24.GraphQLError(
60857
60870
  "A field with offset-based pagination must have a limit argument"
60858
60871
  )
60859
60872
  );
@@ -60869,20 +60882,20 @@ function noUnusedFragmentArguments(config2) {
60869
60882
  const args = /* @__PURE__ */ new Set();
60870
60883
  return {
60871
60884
  enter(node) {
60872
- if (node.kind === graphql25.Kind.FRAGMENT_DEFINITION) {
60885
+ if (node.kind === graphql24.Kind.FRAGMENT_DEFINITION) {
60873
60886
  const definitionArguments = node.directives?.filter((directive) => directive.name.value === config2.argumentsDirective).flatMap((directive) => directive.arguments);
60874
60887
  for (const arg of definitionArguments?.map((arg2) => arg2?.name.value) || []) {
60875
60888
  args.add(arg);
60876
60889
  }
60877
- } else if (node.kind === graphql25.Kind.VARIABLE) {
60890
+ } else if (node.kind === graphql24.Kind.VARIABLE) {
60878
60891
  args.delete(node.name.value);
60879
60892
  }
60880
60893
  },
60881
60894
  leave(node) {
60882
- if (node.kind === graphql25.Kind.FRAGMENT_DEFINITION) {
60895
+ if (node.kind === graphql24.Kind.FRAGMENT_DEFINITION) {
60883
60896
  if (args.size > 0) {
60884
60897
  ctx.reportError(
60885
- new graphql25.GraphQLError(
60898
+ new graphql24.GraphQLError(
60886
60899
  "Encountered unused fragment arguments: " + [...args].join(",")
60887
60900
  )
60888
60901
  );
@@ -60918,7 +60931,7 @@ function nodeDirectives(config2, directives) {
60918
60931
  if (definition.kind === "OperationDefinition") {
60919
60932
  if (definition.operation !== "query") {
60920
60933
  ctx.reportError(
60921
- new graphql25.GraphQLError(
60934
+ new graphql24.GraphQLError(
60922
60935
  `@${node.name.value} must fall on a fragment or query document`
60923
60936
  )
60924
60937
  );
@@ -60930,7 +60943,7 @@ function nodeDirectives(config2, directives) {
60930
60943
  }
60931
60944
  if (!possibleNodes.includes(definitionType)) {
60932
60945
  ctx.reportError(
60933
- new graphql25.GraphQLError(paginateOnNonNodeMessage(config2, node.name.value))
60946
+ new graphql24.GraphQLError(paginateOnNonNodeMessage(config2, node.name.value))
60934
60947
  );
60935
60948
  }
60936
60949
  }
@@ -60949,7 +60962,7 @@ function checkMutationOperation(config2) {
60949
60962
  );
60950
60963
  if (append && prepend) {
60951
60964
  ctx.reportError(
60952
- new graphql25.GraphQLError(
60965
+ new graphql24.GraphQLError(
60953
60966
  `You can't apply both @${config2.listPrependDirective} and @${config2.listAppendDirective} at the same time`
60954
60967
  )
60955
60968
  );
@@ -60963,7 +60976,7 @@ function checkMutationOperation(config2) {
60963
60976
  );
60964
60977
  if (parentId && allLists) {
60965
60978
  ctx.reportError(
60966
- new graphql25.GraphQLError(
60979
+ new graphql24.GraphQLError(
60967
60980
  `You can't apply both @${config2.listParentDirective} and @${config2.listAllListsDirective} at the same time`
60968
60981
  )
60969
60982
  );
@@ -60985,7 +60998,7 @@ function checkMaskDirective(config2) {
60985
60998
  );
60986
60999
  if (maskEnableDirective && maskDisableDirective) {
60987
61000
  ctx.reportError(
60988
- new graphql25.GraphQLError(
61001
+ new graphql24.GraphQLError(
60989
61002
  `You can't apply both @${config2.maskEnableDirective} and @${config2.maskDisableDirective} at the same time`
60990
61003
  )
60991
61004
  );
@@ -61001,7 +61014,7 @@ function getAndVerifyNodeInterface(config2) {
61001
61014
  if (!nodeInterface) {
61002
61015
  return null;
61003
61016
  }
61004
- if (!graphql25.isInterfaceType(nodeInterface)) {
61017
+ if (!graphql24.isInterfaceType(nodeInterface)) {
61005
61018
  displayInvalidNodeFieldMessage(config2.logLevel);
61006
61019
  return null;
61007
61020
  }
@@ -61099,11 +61112,11 @@ async function uniqueDocumentNames(config2, docs) {
61099
61112
  }
61100
61113
 
61101
61114
  // src/codegen/validators/noIDAlias.ts
61102
- var graphql26 = __toESM(require_graphql2(), 1);
61115
+ var graphql25 = __toESM(require_graphql2(), 1);
61103
61116
  async function noIDAlias(config2, docs) {
61104
61117
  const errors = [];
61105
61118
  for (const { filename, document } of docs) {
61106
- graphql26.visit(document, {
61119
+ graphql25.visit(document, {
61107
61120
  Field(node, _, __, ___, ancestors) {
61108
61121
  const fieldType = parentTypeFromAncestors(config2.schema, filename, ancestors).name;
61109
61122
  if (config2.keyFieldsForType(fieldType).includes(node.alias?.value || "")) {
@@ -61533,7 +61546,7 @@ function pipelineTest(config2, documents, shouldPass, testBody) {
61533
61546
  };
61534
61547
  }
61535
61548
  function mockCollectedDoc(query) {
61536
- const parsed = graphql27.parse(query);
61549
+ const parsed = graphql26.parse(query);
61537
61550
  const name2 = parsed.definitions[0].name.value;
61538
61551
  const operations = parsed.definitions;
61539
61552
  let kind = "HoudiniFragment" /* Fragment */;