houdini 0.19.4 → 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.
@@ -11507,7 +11507,7 @@ var require_graphql = __commonJS({
11507
11507
  Object.defineProperty(exports, "__esModule", {
11508
11508
  value: true
11509
11509
  });
11510
- exports.graphql = graphql30;
11510
+ exports.graphql = graphql29;
11511
11511
  exports.graphqlSync = graphqlSync;
11512
11512
  var _isPromise = _interopRequireDefault(require_isPromise());
11513
11513
  var _parser = require_parser();
@@ -11517,7 +11517,7 @@ var require_graphql = __commonJS({
11517
11517
  function _interopRequireDefault(obj) {
11518
11518
  return obj && obj.__esModule ? obj : { default: obj };
11519
11519
  }
11520
- function graphql30(argsOrSchema, source, rootValue, contextValue, variableValues, operationName, fieldResolver, typeResolver) {
11520
+ function graphql29(argsOrSchema, source, rootValue, contextValue, variableValues, operationName, fieldResolver, typeResolver) {
11521
11521
  var _arguments = arguments;
11522
11522
  return new Promise(function(resolve2) {
11523
11523
  return resolve2(
@@ -16462,9 +16462,9 @@ var require_graphql2 = __commonJS({
16462
16462
  }
16463
16463
  });
16464
16464
 
16465
- // ../../node_modules/.pnpm/minimatch@5.1.1/node_modules/minimatch/lib/path.js
16465
+ // ../../node_modules/.pnpm/minimatch@5.1.2/node_modules/minimatch/lib/path.js
16466
16466
  var require_path = __commonJS({
16467
- "../../node_modules/.pnpm/minimatch@5.1.1/node_modules/minimatch/lib/path.js"(exports, module2) {
16467
+ "../../node_modules/.pnpm/minimatch@5.1.2/node_modules/minimatch/lib/path.js"(exports, module2) {
16468
16468
  var isWindows = typeof process === "object" && process && process.platform === "win32";
16469
16469
  module2.exports = isWindows ? { sep: "\\" } : { sep: "/" };
16470
16470
  }
@@ -16681,9 +16681,9 @@ var require_brace_expansion = __commonJS({
16681
16681
  }
16682
16682
  });
16683
16683
 
16684
- // ../../node_modules/.pnpm/minimatch@5.1.1/node_modules/minimatch/minimatch.js
16684
+ // ../../node_modules/.pnpm/minimatch@5.1.2/node_modules/minimatch/minimatch.js
16685
16685
  var require_minimatch = __commonJS({
16686
- "../../node_modules/.pnpm/minimatch@5.1.1/node_modules/minimatch/minimatch.js"(exports, module2) {
16686
+ "../../node_modules/.pnpm/minimatch@5.1.2/node_modules/minimatch/minimatch.js"(exports, module2) {
16687
16687
  var minimatch2 = module2.exports = (p, pattern, options = {}) => {
16688
16688
  assertValidPattern(pattern);
16689
16689
  if (!options.nocomment && pattern.charAt(0) === "#") {
@@ -16769,7 +16769,9 @@ var require_minimatch = __commonJS({
16769
16769
  return list;
16770
16770
  };
16771
16771
  var globUnescape = (s2) => s2.replace(/\\(.)/g, "$1");
16772
+ var charUnescape = (s2) => s2.replace(/\\([^-\]])/g, "$1");
16772
16773
  var regExpEscape = (s2) => s2.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
16774
+ var braExpEscape = (s2) => s2.replace(/[[\]\\]/g, "\\$&");
16773
16775
  var Minimatch = class {
16774
16776
  constructor(pattern, options) {
16775
16777
  assertValidPattern(pattern);
@@ -16961,6 +16963,10 @@ var require_minimatch = __commonJS({
16961
16963
  return false;
16962
16964
  }
16963
16965
  case "\\":
16966
+ if (inClass && pattern.charAt(i2 + 1) === "-") {
16967
+ re += c;
16968
+ continue;
16969
+ }
16964
16970
  clearStateChar();
16965
16971
  escaping = true;
16966
16972
  continue;
@@ -17043,17 +17049,13 @@ var require_minimatch = __commonJS({
17043
17049
  }
17044
17050
  cs = pattern.substring(classStart + 1, i2);
17045
17051
  try {
17046
- RegExp("[" + cs + "]");
17052
+ RegExp("[" + braExpEscape(charUnescape(cs)) + "]");
17053
+ re += c;
17047
17054
  } catch (er) {
17048
- sp = this.parse(cs, SUBPARSE);
17049
- re = re.substring(0, reClassStart) + "\\[" + sp[0] + "\\]";
17050
- hasMagic = hasMagic || sp[1];
17051
- inClass = false;
17052
- continue;
17055
+ re = re.substring(0, reClassStart) + "(?:$.)";
17053
17056
  }
17054
17057
  hasMagic = true;
17055
17058
  inClass = false;
17056
- re += c;
17057
17059
  continue;
17058
17060
  default:
17059
17061
  clearStateChar();
@@ -29229,9 +29231,9 @@ var init_multipart_parser = __esm({
29229
29231
  }
29230
29232
  });
29231
29233
 
29232
- // ../../node_modules/.pnpm/@babel+parser@7.20.5/node_modules/@babel/parser/lib/index.js
29234
+ // ../../node_modules/.pnpm/@babel+parser@7.20.7/node_modules/@babel/parser/lib/index.js
29233
29235
  var require_lib3 = __commonJS({
29234
- "../../node_modules/.pnpm/@babel+parser@7.20.5/node_modules/@babel/parser/lib/index.js"(exports) {
29236
+ "../../node_modules/.pnpm/@babel+parser@7.20.7/node_modules/@babel/parser/lib/index.js"(exports) {
29235
29237
  "use strict";
29236
29238
  Object.defineProperty(exports, "__esModule", { value: true });
29237
29239
  function _objectWithoutPropertiesLoose(source, excluded) {
@@ -29347,9 +29349,9 @@ var require_lib3 = __commonJS({
29347
29349
  AwaitExpressionFormalParameter: "'await' is not allowed in async function parameters.",
29348
29350
  AwaitNotInAsyncContext: "'await' is only allowed within async functions and at the top levels of modules.",
29349
29351
  AwaitNotInAsyncFunction: "'await' is only allowed within async functions.",
29350
- BadGetterArity: "A 'get' accesor must not have any formal parameters.",
29351
- BadSetterArity: "A 'set' accesor must have exactly one formal parameter.",
29352
- BadSetterRestParameter: "A 'set' accesor function argument must not be a rest parameter.",
29352
+ BadGetterArity: "A 'get' accessor must not have any formal parameters.",
29353
+ BadSetterArity: "A 'set' accessor must have exactly one formal parameter.",
29354
+ BadSetterRestParameter: "A 'set' accessor function argument must not be a rest parameter.",
29353
29355
  ConstructorClassField: "Classes may not have a field named 'constructor'.",
29354
29356
  ConstructorClassPrivateField: "Classes may not have a private field named '#constructor'.",
29355
29357
  ConstructorIsAccessor: "Class constructor may not be an accessor.",
@@ -32783,7 +32785,7 @@ var require_lib3 = __commonJS({
32783
32785
  }
32784
32786
  this.parser.raise(toParseError, origin);
32785
32787
  }
32786
- recordArrowParemeterBindingError(error, {
32788
+ recordArrowParameterBindingError(error, {
32787
32789
  at: node
32788
32790
  }) {
32789
32791
  const {
@@ -36542,6 +36544,7 @@ var require_lib3 = __commonJS({
36542
36544
  }) => `Property '${propertyName}' cannot have an initializer because it is marked abstract.`,
36543
36545
  AccesorCannotDeclareThisParameter: "'get' and 'set' accessors cannot declare 'this' parameters.",
36544
36546
  AccesorCannotHaveTypeParameters: "An accessor cannot have type parameters.",
36547
+ AccessorCannotBeOptional: "An 'accessor' property cannot be declared optional.",
36545
36548
  ClassMethodHasDeclare: "Class methods cannot have the 'declare' modifier.",
36546
36549
  ClassMethodHasReadonly: "Class methods cannot have the 'readonly' modifier.",
36547
36550
  ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference: "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",
@@ -38504,8 +38507,12 @@ var require_lib3 = __commonJS({
38504
38507
  node.typeParameters = typeParameters;
38505
38508
  }
38506
38509
  parseClassPropertyAnnotation(node) {
38507
- if (!node.optional && this.eat(35)) {
38508
- node.definite = true;
38510
+ if (!node.optional) {
38511
+ if (this.eat(35)) {
38512
+ node.definite = true;
38513
+ } else if (this.eat(17)) {
38514
+ node.optional = true;
38515
+ }
38509
38516
  }
38510
38517
  const type = this.tsTryParseTypeAnnotation();
38511
38518
  if (type)
@@ -38544,6 +38551,15 @@ var require_lib3 = __commonJS({
38544
38551
  this.parseClassPropertyAnnotation(node);
38545
38552
  return super.parseClassPrivateProperty(node);
38546
38553
  }
38554
+ parseClassAccessorProperty(node) {
38555
+ this.parseClassPropertyAnnotation(node);
38556
+ if (node.optional) {
38557
+ this.raise(TSErrors.AccessorCannotBeOptional, {
38558
+ at: node
38559
+ });
38560
+ }
38561
+ return super.parseClassAccessorProperty(node);
38562
+ }
38547
38563
  pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
38548
38564
  const typeParameters = this.tsTryParseTypeParameters();
38549
38565
  if (typeParameters && isConstructor) {
@@ -38754,7 +38770,7 @@ var require_lib3 = __commonJS({
38754
38770
  case "TSNonNullExpression":
38755
38771
  case "TSTypeAssertion":
38756
38772
  if (isLHS) {
38757
- this.expressionScope.recordArrowParemeterBindingError(TSErrors.UnexpectedTypeCastInParameter, {
38773
+ this.expressionScope.recordArrowParameterBindingError(TSErrors.UnexpectedTypeCastInParameter, {
38758
38774
  at: node
38759
38775
  });
38760
38776
  } else {
@@ -39461,7 +39477,7 @@ var require_lib3 = __commonJS({
39461
39477
  parenthesized = unwrapParenthesizedExpression(node);
39462
39478
  if (isLHS) {
39463
39479
  if (parenthesized.type === "Identifier") {
39464
- this.expressionScope.recordArrowParemeterBindingError(Errors.InvalidParenthesizedAssignment, {
39480
+ this.expressionScope.recordArrowParameterBindingError(Errors.InvalidParenthesizedAssignment, {
39465
39481
  at: node
39466
39482
  });
39467
39483
  } else if (parenthesized.type !== "MemberExpression") {
@@ -72247,6 +72263,60 @@ function formatErrors(e2, afterError) {
72247
72263
  afterError?.(e2);
72248
72264
  }
72249
72265
  }
72266
+ function unwrapType(config2, type, wrappers = []) {
72267
+ if (type.kind === "NonNullType") {
72268
+ return unwrapType(config2, type.type, [TypeWrapper.NonNull, ...wrappers]);
72269
+ }
72270
+ if (type instanceof graphql3.GraphQLNonNull) {
72271
+ return unwrapType(config2, type.ofType, [TypeWrapper.NonNull, ...wrappers]);
72272
+ }
72273
+ if (wrappers[0] !== TypeWrapper.NonNull) {
72274
+ wrappers.unshift(TypeWrapper.Nullable);
72275
+ }
72276
+ if (type.kind === "ListType") {
72277
+ return unwrapType(config2, type.type, [TypeWrapper.List, ...wrappers]);
72278
+ }
72279
+ if (type instanceof graphql3.GraphQLList) {
72280
+ return unwrapType(config2, type.ofType, [TypeWrapper.List, ...wrappers]);
72281
+ }
72282
+ const namedType = config2.schema.getType(type.name.value || type.name);
72283
+ if (!namedType) {
72284
+ throw new Error("Could not unwrap type: " + JSON.stringify(type));
72285
+ }
72286
+ return { type: namedType, wrappers };
72287
+ }
72288
+ function wrapType({
72289
+ type,
72290
+ wrappers
72291
+ }) {
72292
+ const head = wrappers[0];
72293
+ const tail = wrappers.slice(1);
72294
+ let kind = graphql3.Kind.NAMED_TYPE;
72295
+ if (head === TypeWrapper.List) {
72296
+ kind = graphql3.Kind.LIST_TYPE;
72297
+ } else if (head === TypeWrapper.NonNull) {
72298
+ kind = graphql3.Kind.NON_NULL_TYPE;
72299
+ }
72300
+ if (kind === "NamedType") {
72301
+ return {
72302
+ kind,
72303
+ name: {
72304
+ kind: graphql3.Kind.NAME,
72305
+ value: type.name
72306
+ }
72307
+ };
72308
+ }
72309
+ return {
72310
+ kind,
72311
+ type: wrapType({ type, wrappers: tail })
72312
+ };
72313
+ }
72314
+ var TypeWrapper = /* @__PURE__ */ ((TypeWrapper2) => {
72315
+ TypeWrapper2["Nullable"] = "Nullable";
72316
+ TypeWrapper2["List"] = "List";
72317
+ TypeWrapper2["NonNull"] = "NonNull";
72318
+ return TypeWrapper2;
72319
+ })(TypeWrapper || {});
72250
72320
 
72251
72321
  // src/lib/parse.ts
72252
72322
  var import_parser = __toESM(require_lib3(), 1);
@@ -72495,10 +72565,10 @@ async function find_graphql(config2, parsedScript, walker) {
72495
72565
  }
72496
72566
 
72497
72567
  // src/codegen/index.ts
72498
- var graphql29 = __toESM(require_graphql2(), 1);
72568
+ var graphql28 = __toESM(require_graphql2(), 1);
72499
72569
 
72500
72570
  // src/codegen/generators/artifacts/index.ts
72501
- var graphql14 = __toESM(require_graphql2(), 1);
72571
+ var graphql13 = __toESM(require_graphql2(), 1);
72502
72572
  var recast5 = __toESM(require_main2(), 1);
72503
72573
 
72504
72574
  // src/codegen/utils/commonjs.ts
@@ -72674,63 +72744,6 @@ var FieldCollection = class {
72674
72744
  }
72675
72745
  };
72676
72746
 
72677
- // src/codegen/utils/graphql.ts
72678
- var graphql5 = __toESM(require_graphql2(), 1);
72679
- function unwrapType(config2, type, wrappers = []) {
72680
- if (type.kind === "NonNullType") {
72681
- return unwrapType(config2, type.type, [TypeWrapper.NonNull, ...wrappers]);
72682
- }
72683
- if (type instanceof graphql5.GraphQLNonNull) {
72684
- return unwrapType(config2, type.ofType, [TypeWrapper.NonNull, ...wrappers]);
72685
- }
72686
- if (wrappers[0] !== TypeWrapper.NonNull) {
72687
- wrappers.unshift(TypeWrapper.Nullable);
72688
- }
72689
- if (type.kind === "ListType") {
72690
- return unwrapType(config2, type.type, [TypeWrapper.List, ...wrappers]);
72691
- }
72692
- if (type instanceof graphql5.GraphQLList) {
72693
- return unwrapType(config2, type.ofType, [TypeWrapper.List, ...wrappers]);
72694
- }
72695
- const namedType = config2.schema.getType(type.name.value || type.name);
72696
- if (!namedType) {
72697
- throw new Error("Could not unwrap type: " + JSON.stringify(type));
72698
- }
72699
- return { type: namedType, wrappers };
72700
- }
72701
- function wrapType({
72702
- type,
72703
- wrappers
72704
- }) {
72705
- const head = wrappers[0];
72706
- const tail = wrappers.slice(1);
72707
- let kind = graphql5.Kind.NAMED_TYPE;
72708
- if (head === TypeWrapper.List) {
72709
- kind = graphql5.Kind.LIST_TYPE;
72710
- } else if (head === TypeWrapper.NonNull) {
72711
- kind = graphql5.Kind.NON_NULL_TYPE;
72712
- }
72713
- if (kind === "NamedType") {
72714
- return {
72715
- kind,
72716
- name: {
72717
- kind: graphql5.Kind.NAME,
72718
- value: type.name
72719
- }
72720
- };
72721
- }
72722
- return {
72723
- kind,
72724
- type: wrapType({ type, wrappers: tail })
72725
- };
72726
- }
72727
- var TypeWrapper = /* @__PURE__ */ ((TypeWrapper2) => {
72728
- TypeWrapper2["Nullable"] = "Nullable";
72729
- TypeWrapper2["List"] = "List";
72730
- TypeWrapper2["NonNull"] = "NonNull";
72731
- return TypeWrapper2;
72732
- })(TypeWrapper || {});
72733
-
72734
72747
  // src/codegen/utils/moduleExport.ts
72735
72748
  var recast2 = __toESM(require_main2(), 1);
72736
72749
  var AST2 = recast2.types.builders;
@@ -72817,7 +72830,7 @@ ${exportDefaultFrom(`./${doc.name}`, doc.name)}`,
72817
72830
  }
72818
72831
 
72819
72832
  // src/codegen/generators/artifacts/inputs.ts
72820
- var graphql6 = __toESM(require_graphql2(), 1);
72833
+ var graphql5 = __toESM(require_graphql2(), 1);
72821
72834
  var recast3 = __toESM(require_main2(), 1);
72822
72835
  var AST3 = recast3.types.builders;
72823
72836
  function inputObject(config2, inputs) {
@@ -72842,10 +72855,10 @@ function walkInputs(config2, visitedTypes, inputObj, rootType) {
72842
72855
  if (visitedTypes.has(type.name)) {
72843
72856
  return;
72844
72857
  }
72845
- if (graphql6.isEnumType(type) || graphql6.isScalarType(type)) {
72858
+ if (graphql5.isEnumType(type) || graphql5.isScalarType(type)) {
72846
72859
  return;
72847
72860
  }
72848
- if (graphql6.isUnionType(type)) {
72861
+ if (graphql5.isUnionType(type)) {
72849
72862
  return;
72850
72863
  }
72851
72864
  visitedTypes.add(type.name);
@@ -72863,10 +72876,10 @@ function walkInputs(config2, visitedTypes, inputObj, rootType) {
72863
72876
  }
72864
72877
 
72865
72878
  // src/codegen/generators/artifacts/operations.ts
72866
- var graphql8 = __toESM(require_graphql2(), 1);
72879
+ var graphql7 = __toESM(require_graphql2(), 1);
72867
72880
 
72868
72881
  // src/codegen/generators/artifacts/utils.ts
72869
- var graphql7 = __toESM(require_graphql2(), 1);
72882
+ var graphql6 = __toESM(require_graphql2(), 1);
72870
72883
  var recast4 = __toESM(require_main2(), 1);
72871
72884
  var AST4 = recast4.types.builders;
72872
72885
  function serializeValue(value) {
@@ -72918,19 +72931,19 @@ function deepMerge(filepath, ...targets) {
72918
72931
  function convertValue(config2, val) {
72919
72932
  let value;
72920
72933
  let kind;
72921
- if (val.kind === graphql7.Kind.INT) {
72934
+ if (val.kind === graphql6.Kind.INT) {
72922
72935
  value = parseInt(val.value, 10);
72923
72936
  kind = "Int";
72924
- } else if (val.kind === graphql7.Kind.FLOAT) {
72937
+ } else if (val.kind === graphql6.Kind.FLOAT) {
72925
72938
  value = parseFloat(val.value);
72926
72939
  kind = "Float";
72927
- } else if (val.kind === graphql7.Kind.BOOLEAN) {
72940
+ } else if (val.kind === graphql6.Kind.BOOLEAN) {
72928
72941
  value = val.value;
72929
72942
  kind = "Boolean";
72930
- } else if (val.kind === graphql7.Kind.VARIABLE) {
72943
+ } else if (val.kind === graphql6.Kind.VARIABLE) {
72931
72944
  value = val.name.value;
72932
72945
  kind = "Variable";
72933
- } else if (val.kind === graphql7.Kind.STRING) {
72946
+ } else if (val.kind === graphql6.Kind.STRING) {
72934
72947
  value = val.value;
72935
72948
  kind = "String";
72936
72949
  }
@@ -72943,7 +72956,7 @@ function operationsByPath(config2, filepath, definition, filterTypes) {
72943
72956
  return {};
72944
72957
  }
72945
72958
  const pathOperations = {};
72946
- graphql8.visit(definition, {
72959
+ graphql7.visit(definition, {
72947
72960
  FragmentSpread(node, _, __, ___, ancestors) {
72948
72961
  if (!config2.isListFragment(node.name.value)) {
72949
72962
  return;
@@ -73102,7 +73115,7 @@ function ancestorKey(ancestors) {
73102
73115
  }
73103
73116
 
73104
73117
  // src/codegen/generators/artifacts/selection.ts
73105
- var graphql13 = __toESM(require_graphql2(), 1);
73118
+ var graphql12 = __toESM(require_graphql2(), 1);
73106
73119
 
73107
73120
  // ../../node_modules/.pnpm/@kitql+helper@0.5.0/node_modules/@kitql/helper/index.mjs
73108
73121
  var config = {
@@ -73142,16 +73155,16 @@ function logYellow(str) {
73142
73155
  }
73143
73156
 
73144
73157
  // src/codegen/transforms/list.ts
73145
- var graphql11 = __toESM(require_graphql2(), 1);
73158
+ var graphql10 = __toESM(require_graphql2(), 1);
73146
73159
 
73147
73160
  // src/codegen/utils/objectIdentificationSelection.ts
73148
- var graphql9 = __toESM(require_graphql2(), 1);
73161
+ var graphql8 = __toESM(require_graphql2(), 1);
73149
73162
  var objectIdentificationSelection = (config2, type) => {
73150
73163
  return config2.keyFieldsForType(type.name).map((key) => {
73151
73164
  return {
73152
- kind: graphql9.Kind.FIELD,
73165
+ kind: graphql8.Kind.FIELD,
73153
73166
  name: {
73154
- kind: graphql9.Kind.NAME,
73167
+ kind: graphql8.Kind.NAME,
73155
73168
  value: key
73156
73169
  }
73157
73170
  };
@@ -73159,7 +73172,7 @@ var objectIdentificationSelection = (config2, type) => {
73159
73172
  };
73160
73173
 
73161
73174
  // src/codegen/transforms/paginate.ts
73162
- var graphql10 = __toESM(require_graphql2(), 1);
73175
+ var graphql9 = __toESM(require_graphql2(), 1);
73163
73176
  async function paginate(config2, documents) {
73164
73177
  const newDocs = [];
73165
73178
  for (const doc of documents) {
@@ -73192,7 +73205,7 @@ async function paginate(config2, documents) {
73192
73205
  };
73193
73206
  let cursorType = "String";
73194
73207
  let paginationPath = [];
73195
- doc.document = graphql10.visit(doc.document, {
73208
+ doc.document = graphql9.visit(doc.document, {
73196
73209
  Field(node, _, __, ___, ancestors) {
73197
73210
  const paginateDirective = node.directives?.find(
73198
73211
  (directive) => directive.name.value === config2.paginateDirective
@@ -73219,7 +73232,7 @@ async function paginate(config2, documents) {
73219
73232
  flags.offset.enabled = offsetPagination;
73220
73233
  flags.limit.enabled = offsetPagination;
73221
73234
  paginationPath = ancestors.filter(
73222
- (ancestor) => !Array.isArray(ancestor) && ancestor.kind === graphql10.Kind.FIELD
73235
+ (ancestor) => !Array.isArray(ancestor) && ancestor.kind === graphql9.Kind.FIELD
73223
73236
  ).concat(node).map((field) => field.alias?.value || field.name.value);
73224
73237
  return {
73225
73238
  ...node,
@@ -73240,7 +73253,7 @@ async function paginate(config2, documents) {
73240
73253
  refetchUpdate = "prepend" /* prepend */;
73241
73254
  }
73242
73255
  let fragment = "";
73243
- doc.document = graphql10.visit(doc.document, {
73256
+ doc.document = graphql9.visit(doc.document, {
73244
73257
  OperationDefinition(node) {
73245
73258
  if (node.operation !== "query") {
73246
73259
  throw new HoudiniError({
@@ -73294,9 +73307,9 @@ async function paginate(config2, documents) {
73294
73307
  directives: [
73295
73308
  ...node.directives || [],
73296
73309
  {
73297
- kind: graphql10.Kind.DIRECTIVE,
73310
+ kind: graphql9.Kind.DIRECTIVE,
73298
73311
  name: {
73299
- kind: graphql10.Kind.NAME,
73312
+ kind: graphql9.Kind.NAME,
73300
73313
  value: config2.argumentsDirective
73301
73314
  }
73302
73315
  }
@@ -73359,16 +73372,16 @@ async function paginate(config2, documents) {
73359
73372
  const paginationArgs = Object.entries(flags).filter(([_, { enabled }]) => enabled).map(([key, value]) => ({ name: key, ...value }));
73360
73373
  const fragmentSpreadSelection = [
73361
73374
  {
73362
- kind: graphql10.Kind.FRAGMENT_SPREAD,
73375
+ kind: graphql9.Kind.FRAGMENT_SPREAD,
73363
73376
  name: {
73364
- kind: graphql10.Kind.NAME,
73377
+ kind: graphql9.Kind.NAME,
73365
73378
  value: fragmentName
73366
73379
  },
73367
73380
  directives: [
73368
73381
  {
73369
- kind: graphql10.Kind.DIRECTIVE,
73382
+ kind: graphql9.Kind.DIRECTIVE,
73370
73383
  name: {
73371
- kind: graphql10.Kind.NAME,
73384
+ kind: graphql9.Kind.NAME,
73372
73385
  value: config2.withDirective
73373
73386
  },
73374
73387
  ["arguments"]: paginationArgs.map(
@@ -73396,29 +73409,29 @@ async function paginate(config2, documents) {
73396
73409
  });
73397
73410
  const typeConfig = config2.typeConfig?.[fragment];
73398
73411
  const queryDoc = {
73399
- kind: graphql10.Kind.DOCUMENT,
73412
+ kind: graphql9.Kind.DOCUMENT,
73400
73413
  definitions: [
73401
73414
  {
73402
- kind: graphql10.Kind.OPERATION_DEFINITION,
73415
+ kind: graphql9.Kind.OPERATION_DEFINITION,
73403
73416
  name: {
73404
- kind: graphql10.Kind.NAME,
73417
+ kind: graphql9.Kind.NAME,
73405
73418
  value: refetchQueryName
73406
73419
  },
73407
73420
  operation: "query",
73408
73421
  variableDefinitions: paginationArgs.map(
73409
73422
  (arg) => ({
73410
- kind: graphql10.Kind.VARIABLE_DEFINITION,
73423
+ kind: graphql9.Kind.VARIABLE_DEFINITION,
73411
73424
  type: {
73412
- kind: graphql10.Kind.NAMED_TYPE,
73425
+ kind: graphql9.Kind.NAMED_TYPE,
73413
73426
  name: {
73414
- kind: graphql10.Kind.NAME,
73427
+ kind: graphql9.Kind.NAME,
73415
73428
  value: arg.type
73416
73429
  }
73417
73430
  },
73418
73431
  variable: {
73419
- kind: graphql10.Kind.VARIABLE,
73432
+ kind: graphql9.Kind.VARIABLE,
73420
73433
  name: {
73421
- kind: graphql10.Kind.NAME,
73434
+ kind: graphql9.Kind.NAME,
73422
73435
  value: arg.name
73423
73436
  }
73424
73437
  },
@@ -73430,12 +73443,12 @@ async function paginate(config2, documents) {
73430
73443
  ).concat(
73431
73444
  !nodeQuery ? [] : keys.map(
73432
73445
  (key) => ({
73433
- kind: graphql10.Kind.VARIABLE_DEFINITION,
73446
+ kind: graphql9.Kind.VARIABLE_DEFINITION,
73434
73447
  type: key.type,
73435
73448
  variable: {
73436
- kind: graphql10.Kind.VARIABLE,
73449
+ kind: graphql9.Kind.VARIABLE,
73437
73450
  name: {
73438
- kind: graphql10.Kind.NAME,
73451
+ kind: graphql9.Kind.NAME,
73439
73452
  value: key.name
73440
73453
  }
73441
73454
  }
@@ -73443,42 +73456,42 @@ async function paginate(config2, documents) {
73443
73456
  )
73444
73457
  ),
73445
73458
  selectionSet: {
73446
- kind: graphql10.Kind.SELECTION_SET,
73459
+ kind: graphql9.Kind.SELECTION_SET,
73447
73460
  selections: !nodeQuery ? fragmentSpreadSelection : [
73448
73461
  {
73449
- kind: graphql10.Kind.FIELD,
73462
+ kind: graphql9.Kind.FIELD,
73450
73463
  name: {
73451
- kind: graphql10.Kind.NAME,
73464
+ kind: graphql9.Kind.NAME,
73452
73465
  value: typeConfig?.resolve?.queryField || "node"
73453
73466
  },
73454
73467
  ["arguments"]: keys.map((key) => ({
73455
- kind: graphql10.Kind.ARGUMENT,
73468
+ kind: graphql9.Kind.ARGUMENT,
73456
73469
  name: {
73457
- kind: graphql10.Kind.NAME,
73470
+ kind: graphql9.Kind.NAME,
73458
73471
  value: key.name
73459
73472
  },
73460
73473
  value: {
73461
- kind: graphql10.Kind.VARIABLE,
73474
+ kind: graphql9.Kind.VARIABLE,
73462
73475
  name: {
73463
- kind: graphql10.Kind.NAME,
73476
+ kind: graphql9.Kind.NAME,
73464
73477
  value: key.name
73465
73478
  }
73466
73479
  }
73467
73480
  })),
73468
73481
  selectionSet: {
73469
- kind: graphql10.Kind.SELECTION_SET,
73482
+ kind: graphql9.Kind.SELECTION_SET,
73470
73483
  selections: [
73471
73484
  {
73472
- kind: graphql10.Kind.FIELD,
73485
+ kind: graphql9.Kind.FIELD,
73473
73486
  name: {
73474
- kind: graphql10.Kind.NAME,
73487
+ kind: graphql9.Kind.NAME,
73475
73488
  value: "__typename"
73476
73489
  }
73477
73490
  },
73478
73491
  ...(typeConfig?.keys || ["id"]).map((key) => ({
73479
- kind: graphql10.Kind.FIELD,
73492
+ kind: graphql9.Kind.FIELD,
73480
73493
  name: {
73481
- kind: graphql10.Kind.NAME,
73494
+ kind: graphql9.Kind.NAME,
73482
73495
  value: key
73483
73496
  }
73484
73497
  })),
@@ -73540,15 +73553,15 @@ function replaceArgumentsWithVariables(args, flags) {
73540
73553
  }
73541
73554
  function variableAsArgument(name2, variable) {
73542
73555
  return {
73543
- kind: graphql10.Kind.ARGUMENT,
73556
+ kind: graphql9.Kind.ARGUMENT,
73544
73557
  name: {
73545
- kind: graphql10.Kind.NAME,
73558
+ kind: graphql9.Kind.NAME,
73546
73559
  value: name2
73547
73560
  },
73548
73561
  value: {
73549
- kind: graphql10.Kind.VARIABLE,
73562
+ kind: graphql9.Kind.VARIABLE,
73550
73563
  name: {
73551
- kind: graphql10.Kind.NAME,
73564
+ kind: graphql9.Kind.NAME,
73552
73565
  value: variable ?? name2
73553
73566
  }
73554
73567
  }
@@ -73556,18 +73569,18 @@ function variableAsArgument(name2, variable) {
73556
73569
  }
73557
73570
  function staticVariableDefinition(name2, type, defaultValue, variableName) {
73558
73571
  return {
73559
- kind: graphql10.Kind.VARIABLE_DEFINITION,
73572
+ kind: graphql9.Kind.VARIABLE_DEFINITION,
73560
73573
  type: {
73561
- kind: graphql10.Kind.NAMED_TYPE,
73574
+ kind: graphql9.Kind.NAMED_TYPE,
73562
73575
  name: {
73563
- kind: graphql10.Kind.NAME,
73576
+ kind: graphql9.Kind.NAME,
73564
73577
  value: type
73565
73578
  }
73566
73579
  },
73567
73580
  variable: {
73568
- kind: graphql10.Kind.VARIABLE,
73581
+ kind: graphql9.Kind.VARIABLE,
73569
73582
  name: {
73570
- kind: graphql10.Kind.NAME,
73583
+ kind: graphql9.Kind.NAME,
73571
73584
  value: variableName ?? name2
73572
73585
  }
73573
73586
  },
@@ -73579,9 +73592,9 @@ function staticVariableDefinition(name2, type, defaultValue, variableName) {
73579
73592
  }
73580
73593
  function argumentNode(name2, value) {
73581
73594
  return {
73582
- kind: graphql10.Kind.ARGUMENT,
73595
+ kind: graphql9.Kind.ARGUMENT,
73583
73596
  name: {
73584
- kind: graphql10.Kind.NAME,
73597
+ kind: graphql9.Kind.NAME,
73585
73598
  value: name2
73586
73599
  },
73587
73600
  value: objectNode(value)
@@ -73589,16 +73602,16 @@ function argumentNode(name2, value) {
73589
73602
  }
73590
73603
  function objectNode([type, defaultValue]) {
73591
73604
  const node = {
73592
- kind: graphql10.Kind.OBJECT,
73605
+ kind: graphql9.Kind.OBJECT,
73593
73606
  fields: [
73594
73607
  {
73595
- kind: graphql10.Kind.OBJECT_FIELD,
73608
+ kind: graphql9.Kind.OBJECT_FIELD,
73596
73609
  name: {
73597
- kind: graphql10.Kind.NAME,
73610
+ kind: graphql9.Kind.NAME,
73598
73611
  value: "type"
73599
73612
  },
73600
73613
  value: {
73601
- kind: graphql10.Kind.STRING,
73614
+ kind: graphql9.Kind.STRING,
73602
73615
  value: type
73603
73616
  }
73604
73617
  }
@@ -73606,8 +73619,8 @@ function objectNode([type, defaultValue]) {
73606
73619
  };
73607
73620
  if (defaultValue) {
73608
73621
  node.fields.push({
73609
- kind: graphql10.Kind.OBJECT_FIELD,
73610
- name: { kind: graphql10.Kind.NAME, value: "default" },
73622
+ kind: graphql9.Kind.OBJECT_FIELD,
73623
+ name: { kind: graphql9.Kind.NAME, value: "default" },
73611
73624
  value: {
73612
73625
  kind: typeof defaultValue === "number" ? "IntValue" : "StringValue",
73613
73626
  value: defaultValue.toString()
@@ -73618,34 +73631,34 @@ function objectNode([type, defaultValue]) {
73618
73631
  }
73619
73632
  var pageInfoSelection = [
73620
73633
  {
73621
- kind: graphql10.Kind.FIELD,
73634
+ kind: graphql9.Kind.FIELD,
73622
73635
  name: {
73623
- kind: graphql10.Kind.NAME,
73636
+ kind: graphql9.Kind.NAME,
73624
73637
  value: "edges"
73625
73638
  },
73626
73639
  selectionSet: {
73627
- kind: graphql10.Kind.SELECTION_SET,
73640
+ kind: graphql9.Kind.SELECTION_SET,
73628
73641
  selections: [
73629
73642
  {
73630
- kind: graphql10.Kind.FIELD,
73643
+ kind: graphql9.Kind.FIELD,
73631
73644
  name: {
73632
- kind: graphql10.Kind.NAME,
73645
+ kind: graphql9.Kind.NAME,
73633
73646
  value: "cursor"
73634
73647
  }
73635
73648
  },
73636
73649
  {
73637
- kind: graphql10.Kind.FIELD,
73650
+ kind: graphql9.Kind.FIELD,
73638
73651
  name: {
73639
- kind: graphql10.Kind.NAME,
73652
+ kind: graphql9.Kind.NAME,
73640
73653
  value: "node"
73641
73654
  },
73642
73655
  selectionSet: {
73643
- kind: graphql10.Kind.SELECTION_SET,
73656
+ kind: graphql9.Kind.SELECTION_SET,
73644
73657
  selections: [
73645
73658
  {
73646
- kind: graphql10.Kind.FIELD,
73659
+ kind: graphql9.Kind.FIELD,
73647
73660
  name: {
73648
- kind: graphql10.Kind.NAME,
73661
+ kind: graphql9.Kind.NAME,
73649
73662
  value: "__typename"
73650
73663
  }
73651
73664
  }
@@ -73656,39 +73669,39 @@ var pageInfoSelection = [
73656
73669
  }
73657
73670
  },
73658
73671
  {
73659
- kind: graphql10.Kind.FIELD,
73672
+ kind: graphql9.Kind.FIELD,
73660
73673
  name: {
73661
- kind: graphql10.Kind.NAME,
73674
+ kind: graphql9.Kind.NAME,
73662
73675
  value: "pageInfo"
73663
73676
  },
73664
73677
  selectionSet: {
73665
- kind: graphql10.Kind.SELECTION_SET,
73678
+ kind: graphql9.Kind.SELECTION_SET,
73666
73679
  selections: [
73667
73680
  {
73668
- kind: graphql10.Kind.FIELD,
73681
+ kind: graphql9.Kind.FIELD,
73669
73682
  name: {
73670
- kind: graphql10.Kind.NAME,
73683
+ kind: graphql9.Kind.NAME,
73671
73684
  value: "hasPreviousPage"
73672
73685
  }
73673
73686
  },
73674
73687
  {
73675
- kind: graphql10.Kind.FIELD,
73688
+ kind: graphql9.Kind.FIELD,
73676
73689
  name: {
73677
- kind: graphql10.Kind.NAME,
73690
+ kind: graphql9.Kind.NAME,
73678
73691
  value: "hasNextPage"
73679
73692
  }
73680
73693
  },
73681
73694
  {
73682
- kind: graphql10.Kind.FIELD,
73695
+ kind: graphql9.Kind.FIELD,
73683
73696
  name: {
73684
- kind: graphql10.Kind.NAME,
73697
+ kind: graphql9.Kind.NAME,
73685
73698
  value: "startCursor"
73686
73699
  }
73687
73700
  },
73688
73701
  {
73689
- kind: graphql10.Kind.FIELD,
73702
+ kind: graphql9.Kind.FIELD,
73690
73703
  name: {
73691
- kind: graphql10.Kind.NAME,
73704
+ kind: graphql9.Kind.NAME,
73692
73705
  value: "endCursor"
73693
73706
  }
73694
73707
  }
@@ -73702,15 +73715,15 @@ async function addListFragments(config2, documents) {
73702
73715
  const lists = {};
73703
73716
  const errors = [];
73704
73717
  for (const doc of documents) {
73705
- doc.document = graphql11.visit(doc.document, {
73718
+ doc.document = graphql10.visit(doc.document, {
73706
73719
  Directive(node, key, parent, path2, ancestors) {
73707
73720
  if ([config2.listDirective, config2.paginateDirective].includes(node.name.value)) {
73708
73721
  const nameArg = node.arguments?.find((arg) => arg.name.value === "name");
73709
73722
  let error = {
73710
- ...new graphql11.GraphQLError(
73723
+ ...new graphql10.GraphQLError(
73711
73724
  "",
73712
73725
  node,
73713
- new graphql11.Source(""),
73726
+ new graphql10.Source(""),
73714
73727
  node.loc ? [node.loc.start, node.loc.end] : null,
73715
73728
  path2
73716
73729
  ),
@@ -73762,7 +73775,7 @@ async function addListFragments(config2, documents) {
73762
73775
  {
73763
73776
  kind: "Argument",
73764
73777
  name: {
73765
- kind: graphql11.Kind.NAME,
73778
+ kind: graphql10.Kind.NAME,
73766
73779
  value: "connection"
73767
73780
  },
73768
73781
  value: {
@@ -73812,7 +73825,7 @@ async function addListFragments(config2, documents) {
73812
73825
  const validDeletes = [
73813
73826
  ...new Set(
73814
73827
  Object.values(lists).map(({ type }) => {
73815
- if (!(type instanceof graphql11.GraphQLObjectType)) {
73828
+ if (!(type instanceof graphql10.GraphQLObjectType)) {
73816
73829
  return "";
73817
73830
  }
73818
73831
  if (config2.keyFieldsForType(type.name).length !== 1) {
@@ -73826,7 +73839,7 @@ async function addListFragments(config2, documents) {
73826
73839
  return;
73827
73840
  }
73828
73841
  const generatedDoc = {
73829
- kind: graphql11.Kind.DOCUMENT,
73842
+ kind: graphql10.Kind.DOCUMENT,
73830
73843
  definitions: Object.entries(lists).flatMap(
73831
73844
  ([name2, { selection: selection2, type }]) => {
73832
73845
  const schemaType = config2.schema.getType(type.name);
@@ -73834,7 +73847,7 @@ async function addListFragments(config2, documents) {
73834
73847
  throw new HoudiniError({ message: "Lists must have a selection" });
73835
73848
  }
73836
73849
  const fragmentSelection = {
73837
- kind: graphql11.Kind.SELECTION_SET,
73850
+ kind: graphql10.Kind.SELECTION_SET,
73838
73851
  selections: [...selection2.selections]
73839
73852
  };
73840
73853
  if (schemaType && fragmentSelection && !fragmentSelection?.selections.find(
@@ -73849,14 +73862,14 @@ async function addListFragments(config2, documents) {
73849
73862
  {
73850
73863
  name: {
73851
73864
  value: config2.listInsertFragment(name2),
73852
- kind: graphql11.Kind.NAME
73865
+ kind: graphql10.Kind.NAME
73853
73866
  },
73854
- kind: graphql11.Kind.FRAGMENT_DEFINITION,
73867
+ kind: graphql10.Kind.FRAGMENT_DEFINITION,
73855
73868
  selectionSet: fragmentSelection,
73856
73869
  typeCondition: {
73857
- kind: graphql11.Kind.NAMED_TYPE,
73870
+ kind: graphql10.Kind.NAMED_TYPE,
73858
73871
  name: {
73859
- kind: graphql11.Kind.NAME,
73872
+ kind: graphql10.Kind.NAME,
73860
73873
  value: type.name
73861
73874
  }
73862
73875
  }
@@ -73864,32 +73877,32 @@ async function addListFragments(config2, documents) {
73864
73877
  {
73865
73878
  name: {
73866
73879
  value: config2.listToggleFragment(name2),
73867
- kind: graphql11.Kind.NAME
73880
+ kind: graphql10.Kind.NAME
73868
73881
  },
73869
- kind: graphql11.Kind.FRAGMENT_DEFINITION,
73882
+ kind: graphql10.Kind.FRAGMENT_DEFINITION,
73870
73883
  selectionSet: fragmentSelection,
73871
73884
  typeCondition: {
73872
- kind: graphql11.Kind.NAMED_TYPE,
73885
+ kind: graphql10.Kind.NAMED_TYPE,
73873
73886
  name: {
73874
- kind: graphql11.Kind.NAME,
73887
+ kind: graphql10.Kind.NAME,
73875
73888
  value: type.name
73876
73889
  }
73877
73890
  }
73878
73891
  },
73879
73892
  {
73880
- kind: graphql11.Kind.FRAGMENT_DEFINITION,
73893
+ kind: graphql10.Kind.FRAGMENT_DEFINITION,
73881
73894
  name: {
73882
73895
  value: config2.listRemoveFragment(name2),
73883
- kind: graphql11.Kind.NAME
73896
+ kind: graphql10.Kind.NAME
73884
73897
  },
73885
73898
  selectionSet: {
73886
- kind: graphql11.Kind.SELECTION_SET,
73899
+ kind: graphql10.Kind.SELECTION_SET,
73887
73900
  selections: [...objectIdentificationSelection(config2, type)]
73888
73901
  },
73889
73902
  typeCondition: {
73890
- kind: graphql11.Kind.NAMED_TYPE,
73903
+ kind: graphql10.Kind.NAMED_TYPE,
73891
73904
  name: {
73892
- kind: graphql11.Kind.NAME,
73905
+ kind: graphql10.Kind.NAME,
73893
73906
  value: type.name
73894
73907
  }
73895
73908
  }
@@ -73898,14 +73911,14 @@ async function addListFragments(config2, documents) {
73898
73911
  }
73899
73912
  ).concat(
73900
73913
  ...validDeletes.map((typeName) => ({
73901
- kind: graphql11.Kind.DIRECTIVE_DEFINITION,
73914
+ kind: graphql10.Kind.DIRECTIVE_DEFINITION,
73902
73915
  name: {
73903
- kind: graphql11.Kind.NAME,
73916
+ kind: graphql10.Kind.NAME,
73904
73917
  value: config2.listDeleteDirective(typeName)
73905
73918
  },
73906
73919
  locations: [
73907
73920
  {
73908
- kind: graphql11.Kind.NAME,
73921
+ kind: graphql10.Kind.NAME,
73909
73922
  value: "FIELD"
73910
73923
  }
73911
73924
  ],
@@ -73913,8 +73926,8 @@ async function addListFragments(config2, documents) {
73913
73926
  }))
73914
73927
  )
73915
73928
  };
73916
- config2.newSchema += "\n" + generatedDoc.definitions.filter((c) => c.kind !== "FragmentDefinition").map(graphql11.print).join("\n\n");
73917
- config2.newDocuments += "\n" + generatedDoc.definitions.filter((c) => c.kind === "FragmentDefinition").map(graphql11.print).join("\n\n");
73929
+ config2.newSchema += "\n" + generatedDoc.definitions.filter((c) => c.kind !== "FragmentDefinition").map(graphql10.print).join("\n\n");
73930
+ config2.newDocuments += "\n" + generatedDoc.definitions.filter((c) => c.kind === "FragmentDefinition").map(graphql10.print).join("\n\n");
73918
73931
  documents.push({
73919
73932
  name: "generated::lists",
73920
73933
  kind: "HoudiniFragment" /* Fragment */,
@@ -73999,11 +74012,11 @@ var nodeNotDefinedMessage = (config2) => `Looks like you are trying to use the $
73999
74012
  For more information, visit this link: ${siteURL}/guides/pagination`;
74000
74013
 
74001
74014
  // src/codegen/generators/artifacts/fieldKey.ts
74002
- var graphql12 = __toESM(require_graphql2(), 1);
74015
+ var graphql11 = __toESM(require_graphql2(), 1);
74003
74016
  function fieldKey(config2, field) {
74004
74017
  const attributeName = field.alias?.value || field.name.value;
74005
- const printed = graphql12.print(field);
74006
- const secondParse = graphql12.parse(`{${printed}}`).definitions[0].selectionSet.selections[0];
74018
+ const printed = graphql11.print(field);
74019
+ const secondParse = graphql11.parse(`{${printed}}`).definitions[0].selectionSet.selections[0];
74007
74020
  const paginated = !!field.directives?.find(
74008
74021
  (directive) => directive.name.value === config2.paginateDirective
74009
74022
  );
@@ -74098,8 +74111,8 @@ function selection({
74098
74111
  const typeConditionName = field.typeCondition.name.value;
74099
74112
  const typeCondition = config2.schema.getType(typeConditionName);
74100
74113
  const possibleTypes = [];
74101
- if (!graphql13.isAbstractType(typeCondition)) {
74102
- } else if (graphql13.isAbstractType(parentType)) {
74114
+ if (!graphql12.isAbstractType(typeCondition)) {
74115
+ } else if (graphql12.isAbstractType(parentType)) {
74103
74116
  const possibleParentTypes = config2.schema.getPossibleTypes(parentType).map((type) => type.name);
74104
74117
  for (const possible of config2.schema.getPossibleTypes(typeCondition)) {
74105
74118
  if (possibleParentTypes.includes(possible.name)) {
@@ -74147,7 +74160,7 @@ function selection({
74147
74160
  } else {
74148
74161
  let typeRef = type.getFields()[field.name.value].type;
74149
74162
  fieldType = getRootType(typeRef);
74150
- nullable = !graphql13.isNonNullType(typeRef);
74163
+ nullable = !graphql12.isNonNullType(typeRef);
74151
74164
  }
74152
74165
  const typeName = fieldType.toString();
74153
74166
  const pathSoFar = path2.concat(attributeName);
@@ -74212,7 +74225,7 @@ function selection({
74212
74225
  {}
74213
74226
  );
74214
74227
  }
74215
- if (graphql13.isInterfaceType(fieldType) || graphql13.isUnionType(fieldType)) {
74228
+ if (graphql12.isInterfaceType(fieldType) || graphql12.isUnionType(fieldType)) {
74216
74229
  fieldObj.abstract = true;
74217
74230
  }
74218
74231
  object.fields = {
@@ -74269,7 +74282,7 @@ function artifactGenerator(stats) {
74269
74282
  return async function(config2, docs) {
74270
74283
  const filterTypes = {};
74271
74284
  for (const doc of docs) {
74272
- graphql14.visit(doc.document, {
74285
+ graphql13.visit(doc.document, {
74273
74286
  Directive(node, _, __, ___, ancestors) {
74274
74287
  if (node.name.value !== config2.listDirective) {
74275
74288
  return;
@@ -74328,7 +74341,7 @@ function artifactGenerator(stats) {
74328
74341
  return;
74329
74342
  }
74330
74343
  const usedVariableNames = /* @__PURE__ */ new Set();
74331
- let documentWithoutInternalDirectives = graphql14.visit(document, {
74344
+ let documentWithoutInternalDirectives = graphql13.visit(document, {
74332
74345
  Directive(node) {
74333
74346
  if (config2.isInternalDirective(node)) {
74334
74347
  return null;
@@ -74341,7 +74354,7 @@ function artifactGenerator(stats) {
74341
74354
  }
74342
74355
  }
74343
74356
  });
74344
- let documentWithoutExtraVariables = graphql14.visit(
74357
+ let documentWithoutExtraVariables = graphql13.visit(
74345
74358
  documentWithoutInternalDirectives,
74346
74359
  {
74347
74360
  VariableDefinition(variableDefinitionNode) {
@@ -74352,13 +74365,13 @@ function artifactGenerator(stats) {
74352
74365
  }
74353
74366
  }
74354
74367
  );
74355
- let rawString = graphql14.print(documentWithoutExtraVariables);
74368
+ let rawString = graphql13.print(documentWithoutExtraVariables);
74356
74369
  let docKind = doc.kind;
74357
74370
  const operations = document.definitions.filter(
74358
- ({ kind }) => kind === graphql14.Kind.OPERATION_DEFINITION
74371
+ ({ kind }) => kind === graphql13.Kind.OPERATION_DEFINITION
74359
74372
  );
74360
74373
  const fragments = document.definitions.filter(
74361
- ({ kind }) => kind === graphql14.Kind.FRAGMENT_DEFINITION
74374
+ ({ kind }) => kind === graphql13.Kind.FRAGMENT_DEFINITION
74362
74375
  );
74363
74376
  let rootType = "";
74364
74377
  let selectionSet;
@@ -74600,15 +74613,15 @@ async function generatePluginRuntime(config2, plugin) {
74600
74613
  var recast12 = __toESM(require_main2(), 1);
74601
74614
 
74602
74615
  // src/codegen/generators/typescript/addReferencedInputTypes.ts
74603
- var graphql17 = __toESM(require_graphql2(), 1);
74616
+ var graphql16 = __toESM(require_graphql2(), 1);
74604
74617
  var recast9 = __toESM(require_main2(), 1);
74605
74618
 
74606
74619
  // src/codegen/generators/typescript/typeReference.ts
74607
- var graphql16 = __toESM(require_graphql2(), 1);
74620
+ var graphql15 = __toESM(require_graphql2(), 1);
74608
74621
  var recast8 = __toESM(require_main2(), 1);
74609
74622
 
74610
74623
  // src/codegen/generators/typescript/types.ts
74611
- var graphql15 = __toESM(require_graphql2(), 1);
74624
+ var graphql14 = __toESM(require_graphql2(), 1);
74612
74625
  var recast7 = __toESM(require_main2(), 1);
74613
74626
  var AST7 = recast7.types.builders;
74614
74627
  function readonlyProperty(prop, enable = true) {
@@ -74642,7 +74655,7 @@ function scalarPropertyValue(config2, missingScalars, target) {
74642
74655
  return AST7.tsStringKeyword();
74643
74656
  }
74644
74657
  default: {
74645
- if (graphql15.isNonNullType(target) && "ofType" in target) {
74658
+ if (graphql14.isNonNullType(target) && "ofType" in target) {
74646
74659
  return scalarPropertyValue(
74647
74660
  config2,
74648
74661
  missingScalars,
@@ -74663,7 +74676,7 @@ var AST8 = recast8.types.builders;
74663
74676
  function tsTypeReference(config2, missingScalars, definition) {
74664
74677
  const { type, wrappers } = unwrapType(config2, definition.type);
74665
74678
  let result;
74666
- if (graphql16.isScalarType(type)) {
74679
+ if (graphql15.isScalarType(type)) {
74667
74680
  result = scalarPropertyValue(config2, missingScalars, type);
74668
74681
  } else {
74669
74682
  result = AST8.tsTypeReference(AST8.identifier(type.name));
@@ -74684,17 +74697,17 @@ function tsTypeReference(config2, missingScalars, definition) {
74684
74697
  var AST9 = recast9.types.builders;
74685
74698
  function addReferencedInputTypes(config2, filepath, body, visitedTypes, missingScalars, rootType) {
74686
74699
  const { type } = unwrapType(config2, rootType);
74687
- if (graphql17.isScalarType(type)) {
74700
+ if (graphql16.isScalarType(type)) {
74688
74701
  return;
74689
74702
  }
74690
74703
  if (visitedTypes.has(type.name)) {
74691
74704
  return;
74692
74705
  }
74693
- if (graphql17.isUnionType(type)) {
74706
+ if (graphql16.isUnionType(type)) {
74694
74707
  throw new HoudiniError({ filepath, message: "Input Unions are not supported yet. Sorry!" });
74695
74708
  }
74696
74709
  visitedTypes.add(type.name);
74697
- if (graphql17.isEnumType(type)) {
74710
+ if (graphql16.isEnumType(type)) {
74698
74711
  ensureImports({
74699
74712
  config: config2,
74700
74713
  body,
@@ -74711,7 +74724,7 @@ function addReferencedInputTypes(config2, filepath, body, visitedTypes, missingS
74711
74724
  AST9.tsPropertySignature(
74712
74725
  AST9.identifier(field.name),
74713
74726
  AST9.tsTypeAnnotation(tsTypeReference(config2, missingScalars, field)),
74714
- graphql17.isNullableType(field.type)
74727
+ graphql16.isNullableType(field.type)
74715
74728
  )
74716
74729
  );
74717
74730
  }
@@ -74719,7 +74732,7 @@ function addReferencedInputTypes(config2, filepath, body, visitedTypes, missingS
74719
74732
  }
74720
74733
 
74721
74734
  // src/codegen/generators/typescript/imperativeCache.ts
74722
- var graphql18 = __toESM(require_graphql2(), 1);
74735
+ var graphql17 = __toESM(require_graphql2(), 1);
74723
74736
  var recast10 = __toESM(require_main2(), 1);
74724
74737
  var AST10 = recast10.types.builders;
74725
74738
  async function imperativeCacheTypef(config2, docs) {
@@ -74755,7 +74768,7 @@ function typeDefinitions(config2, body) {
74755
74768
  const operationTypes = [config2.schema.getMutationType(), config2.schema.getSubscriptionType()].filter(Boolean).map((type) => type?.name);
74756
74769
  const visitedTypes = /* @__PURE__ */ new Set();
74757
74770
  const types16 = Object.values(config2.schema.getTypeMap()).filter(
74758
- (type) => !graphql18.isAbstractType(type) && !graphql18.isScalarType(type) && !graphql18.isEnumType(type) && !graphql18.isInputObjectType(type) && !type.name.startsWith("__") && !operationTypes.includes(type.name)
74771
+ (type) => !graphql17.isAbstractType(type) && !graphql17.isScalarType(type) && !graphql17.isEnumType(type) && !graphql17.isInputObjectType(type) && !type.name.startsWith("__") && !operationTypes.includes(type.name)
74759
74772
  );
74760
74773
  return AST10.tsTypeLiteral(
74761
74774
  types16.map((type) => {
@@ -74765,7 +74778,7 @@ function typeDefinitions(config2, body) {
74765
74778
  }
74766
74779
  let idFields = AST10.tsNeverKeyword();
74767
74780
  const keys = keyFieldsForType(config2.configFile, type.name);
74768
- if (graphql18.isObjectType(type) && keys.length > 0 && keys.every((key) => type.getFields()[key])) {
74781
+ if (graphql17.isObjectType(type) && keys.length > 0 && keys.every((key) => type.getFields()[key])) {
74769
74782
  idFields = AST10.tsTypeLiteral(
74770
74783
  keys.map((key) => {
74771
74784
  const fieldType = type.getFields()[key];
@@ -74782,21 +74795,21 @@ function typeDefinitions(config2, body) {
74782
74795
  idFields = AST10.tsTypeLiteral([]);
74783
74796
  }
74784
74797
  let fields = AST10.tsTypeLiteral([]);
74785
- if (graphql18.isObjectType(type)) {
74798
+ if (graphql17.isObjectType(type)) {
74786
74799
  fields = AST10.tsTypeLiteral(
74787
74800
  Object.entries(type.getFields()).map(
74788
74801
  ([key, fieldType]) => {
74789
74802
  const unwrapped = unwrapType(config2, fieldType.type);
74790
74803
  let typeOptions = AST10.tsUnionType([]);
74791
- if (graphql18.isScalarType(unwrapped.type)) {
74804
+ if (graphql17.isScalarType(unwrapped.type)) {
74792
74805
  typeOptions.types.push(
74793
74806
  scalarPropertyValue(config2, /* @__PURE__ */ new Set(), unwrapped.type)
74794
74807
  );
74795
- } else if (graphql18.isEnumType(unwrapped.type)) {
74808
+ } else if (graphql17.isEnumType(unwrapped.type)) {
74796
74809
  typeOptions.types.push(
74797
74810
  AST10.tsTypeReference(AST10.identifier(unwrapped.type.name))
74798
74811
  );
74799
- } else if (!graphql18.isAbstractType(unwrapped.type)) {
74812
+ } else if (!graphql17.isAbstractType(unwrapped.type)) {
74800
74813
  typeOptions.types.push(record(unwrapped.type.name));
74801
74814
  } else {
74802
74815
  typeOptions.types.push(
@@ -74882,7 +74895,7 @@ function listDefinitions(config2, docs) {
74882
74895
  const lists = [];
74883
74896
  const visitedLists = /* @__PURE__ */ new Set();
74884
74897
  for (const doc of docs) {
74885
- graphql18.visit(doc.document, {
74898
+ graphql17.visit(doc.document, {
74886
74899
  Directive(node, key, parent, path2, ancestors) {
74887
74900
  if (![config2.listDirective, config2.paginateDirective].includes(node.name.value)) {
74888
74901
  return;
@@ -74902,7 +74915,7 @@ function listDefinitions(config2, docs) {
74902
74915
  const targetFieldDefinition = parentType.getFields()[targetField.name.value];
74903
74916
  const { type: listType } = unwrapType(config2, targetFieldDefinition.type);
74904
74917
  const possibleTypes = [];
74905
- if (graphql18.isAbstractType(listType)) {
74918
+ if (graphql17.isAbstractType(listType)) {
74906
74919
  possibleTypes.push(
74907
74920
  ...config2.schema.getPossibleTypes(listType).map((possible) => possible.name)
74908
74921
  );
@@ -74966,7 +74979,7 @@ function record(name2) {
74966
74979
  }
74967
74980
 
74968
74981
  // src/codegen/generators/typescript/inlineType.ts
74969
- var graphql19 = __toESM(require_graphql2(), 1);
74982
+ var graphql18 = __toESM(require_graphql2(), 1);
74970
74983
  var recast11 = __toESM(require_main2(), 1);
74971
74984
  var AST11 = recast11.types.builders;
74972
74985
  var fragmentKey = "$fragments";
@@ -74985,9 +74998,9 @@ function inlineType({
74985
74998
  }) {
74986
74999
  const { type, wrappers } = unwrapType(config2, rootType);
74987
75000
  let result;
74988
- if (graphql19.isScalarType(type)) {
75001
+ if (graphql18.isScalarType(type)) {
74989
75002
  result = scalarPropertyValue(config2, missingScalars, type);
74990
- } else if (graphql19.isEnumType(type)) {
75003
+ } else if (graphql18.isEnumType(type)) {
74991
75004
  if (!visitedTypes.has(type.name)) {
74992
75005
  ensureImports({
74993
75006
  config: config2,
@@ -75005,11 +75018,11 @@ function inlineType({
75005
75018
  for (const selection2 of selections) {
75006
75019
  if (selection2.kind === "InlineFragment" && selection2.typeCondition) {
75007
75020
  const fragmentType = config2.schema.getType(selection2.typeCondition.name.value);
75008
- if (!graphql19.isInterfaceType(type) && !graphql19.isUnionType(type)) {
75021
+ if (!graphql18.isInterfaceType(type) && !graphql18.isUnionType(type)) {
75009
75022
  selectedFields.push(...selection2.selectionSet.selections);
75010
75023
  continue;
75011
75024
  }
75012
- if (!graphql19.isInterfaceType(fragmentType) && !graphql19.isUnionType(fragmentType)) {
75025
+ if (!graphql18.isInterfaceType(fragmentType) && !graphql18.isUnionType(fragmentType)) {
75013
75026
  if (!inlineFragments[fragmentType.name]) {
75014
75027
  inlineFragments[fragmentType.name] = [];
75015
75028
  }
@@ -75129,7 +75142,7 @@ function inlineType({
75129
75142
  }
75130
75143
  }
75131
75144
  }
75132
- if (objectType.type === "TSTypeLiteral" && !graphql19.isInterfaceType(fragmentRootType) && !graphql19.isUnionType(fragmentRootType)) {
75145
+ if (objectType.type === "TSTypeLiteral" && !graphql18.isInterfaceType(fragmentRootType) && !graphql18.isUnionType(fragmentRootType)) {
75133
75146
  const existingTypenameIndex = objectType.members.findIndex(
75134
75147
  (member) => member.type === "TSPropertySignature" && member.key.type === "Identifier" && member.key.name === "__typename"
75135
75148
  );
@@ -75196,7 +75209,7 @@ function selectionTypeInfo(schema, filepath, rootType, selection2) {
75196
75209
  },
75197
75210
  type: schema.getType("String")
75198
75211
  };
75199
- } else if (graphql19.isNonNullType(rootType) && "getFields" in rootType.ofType) {
75212
+ } else if (graphql18.isNonNullType(rootType) && "getFields" in rootType.ofType) {
75200
75213
  fields = rootType.ofType.getFields();
75201
75214
  } else {
75202
75215
  fields = rootType.getFields();
@@ -75208,7 +75221,7 @@ function selectionTypeInfo(schema, filepath, rootType, selection2) {
75208
75221
  message: `Could not find type information for field ${rootType.toString()}.${selectionName} ${field}`
75209
75222
  });
75210
75223
  }
75211
- const fieldType = graphql19.getNamedType(field.type);
75224
+ const fieldType = graphql18.getNamedType(field.type);
75212
75225
  if (!fieldType) {
75213
75226
  throw new HoudiniError({
75214
75227
  filepath,
@@ -75529,7 +75542,7 @@ async function generateFragmentTypeDefs(config2, filepath, body, selections, def
75529
75542
  }
75530
75543
 
75531
75544
  // src/codegen/generators/persistedQueries/index.ts
75532
- var graphql20 = __toESM(require_graphql2(), 1);
75545
+ var graphql19 = __toESM(require_graphql2(), 1);
75533
75546
  async function persistOutputGenerator(config2, docs) {
75534
75547
  if (typeof config2.persistedQueryPath !== "string" || config2.persistedQueryPath.length === 0)
75535
75548
  return;
@@ -75541,8 +75554,8 @@ async function persistOutputGenerator(config2, docs) {
75541
75554
  if (!generateArtifact) {
75542
75555
  return acc;
75543
75556
  }
75544
- let rawString = graphql20.print(
75545
- graphql20.visit(document, {
75557
+ let rawString = graphql19.print(
75558
+ graphql19.visit(document, {
75546
75559
  Directive(node) {
75547
75560
  if (config2.isInternalDirective(node)) {
75548
75561
  return null;
@@ -75551,7 +75564,7 @@ async function persistOutputGenerator(config2, docs) {
75551
75564
  })
75552
75565
  );
75553
75566
  const operations = document.definitions.filter(
75554
- ({ kind }) => kind === graphql20.Kind.OPERATION_DEFINITION
75567
+ ({ kind }) => kind === graphql19.Kind.OPERATION_DEFINITION
75555
75568
  );
75556
75569
  if (operations.length > 0 && operations[0].kind === "OperationDefinition") {
75557
75570
  acc[hashDocument(rawString)] = rawString;
@@ -75564,11 +75577,11 @@ async function persistOutputGenerator(config2, docs) {
75564
75577
  }
75565
75578
 
75566
75579
  // src/codegen/generators/definitions/enums.ts
75567
- var graphql21 = __toESM(require_graphql2(), 1);
75580
+ var graphql20 = __toESM(require_graphql2(), 1);
75568
75581
  var recast13 = __toESM(require_main2(), 1);
75569
75582
  var AST13 = recast13.types.builders;
75570
75583
  async function definitionsGenerator(config2) {
75571
- const enums = graphql21.parse(graphql21.printSchema(config2.schema)).definitions.filter(
75584
+ const enums = graphql20.parse(graphql20.printSchema(config2.schema)).definitions.filter(
75572
75585
  (definition) => definition.kind === "EnumTypeDefinition"
75573
75586
  ).filter((def) => !config2.isInternalEnum(def));
75574
75587
  const runtimeDefinitions = recast13.print(
@@ -75741,7 +75754,7 @@ function flattenFragments(filepath, operation, fragments) {
75741
75754
  }
75742
75755
 
75743
75756
  // src/codegen/transforms/schema.ts
75744
- var graphql23 = __toESM(require_graphql2(), 1);
75757
+ var graphql22 = __toESM(require_graphql2(), 1);
75745
75758
  async function graphqlExtensions(config2, documents) {
75746
75759
  const internalSchema = `
75747
75760
  enum CachePolicy {
@@ -75819,19 +75832,19 @@ directive @${config2.maskEnableDirective} on FRAGMENT_SPREAD
75819
75832
  """
75820
75833
  directive @${config2.maskDisableDirective} on FRAGMENT_SPREAD
75821
75834
  `;
75822
- let currentSchema = graphql23.printSchema(config2.schema);
75835
+ let currentSchema = graphql22.printSchema(config2.schema);
75823
75836
  if (!currentSchema.includes(`directive @${config2.listDirective}`)) {
75824
75837
  currentSchema += internalSchema;
75825
75838
  }
75826
75839
  config2.newSchema += internalSchema;
75827
- config2.schema = graphql23.buildSchema(currentSchema);
75840
+ config2.schema = graphql22.buildSchema(currentSchema);
75828
75841
  }
75829
75842
 
75830
75843
  // src/codegen/transforms/typename.ts
75831
- var graphql24 = __toESM(require_graphql2(), 1);
75844
+ var graphql23 = __toESM(require_graphql2(), 1);
75832
75845
  async function addTypename(config2, documents) {
75833
75846
  for (const doc of documents) {
75834
- doc.document = graphql24.visit(doc.document, {
75847
+ doc.document = graphql23.visit(doc.document, {
75835
75848
  Field(node, key, parent, path2, ancestors) {
75836
75849
  if (!node.selectionSet) {
75837
75850
  return;
@@ -75843,7 +75856,7 @@ async function addTypename(config2, documents) {
75843
75856
  );
75844
75857
  const field = type.getFields()[node.name.value];
75845
75858
  const fieldType = unwrapType(config2, field.type).type;
75846
- if (graphql24.isInterfaceType(fieldType) || graphql24.isUnionType(fieldType)) {
75859
+ if (graphql23.isInterfaceType(fieldType) || graphql23.isUnionType(fieldType)) {
75847
75860
  return {
75848
75861
  ...node,
75849
75862
  selectionSet: {
@@ -75851,9 +75864,9 @@ async function addTypename(config2, documents) {
75851
75864
  selections: [
75852
75865
  ...node.selectionSet.selections,
75853
75866
  {
75854
- kind: graphql24.Kind.FIELD,
75867
+ kind: graphql23.Kind.FIELD,
75855
75868
  name: {
75856
- kind: graphql24.Kind.NAME,
75869
+ kind: graphql23.Kind.NAME,
75857
75870
  value: "__typename"
75858
75871
  }
75859
75872
  }
@@ -75867,10 +75880,10 @@ async function addTypename(config2, documents) {
75867
75880
  }
75868
75881
 
75869
75882
  // src/codegen/transforms/addID.ts
75870
- var graphql25 = __toESM(require_graphql2(), 1);
75883
+ var graphql24 = __toESM(require_graphql2(), 1);
75871
75884
  async function addID(config2, documents) {
75872
75885
  for (const doc of documents) {
75873
- doc.document = graphql25.visit(doc.document, {
75886
+ doc.document = graphql24.visit(doc.document, {
75874
75887
  Field(node, key, parent, path2, ancestors) {
75875
75888
  if (!node.selectionSet) {
75876
75889
  return;
@@ -75883,7 +75896,7 @@ async function addID(config2, documents) {
75883
75896
  const field = type.getFields()[node.name.value];
75884
75897
  const fieldType = unwrapType(config2, field.type).type;
75885
75898
  if (node.selectionSet?.selections.length > 0) {
75886
- if (!graphql25.isObjectType(fieldType) && !graphql25.isInterfaceType(fieldType)) {
75899
+ if (!graphql24.isObjectType(fieldType) && !graphql24.isInterfaceType(fieldType)) {
75887
75900
  return;
75888
75901
  }
75889
75902
  const keyFields = config2.keyFieldsForType(fieldType.name);
@@ -75898,9 +75911,9 @@ async function addID(config2, documents) {
75898
75911
  continue;
75899
75912
  }
75900
75913
  selections.push({
75901
- kind: graphql25.Kind.FIELD,
75914
+ kind: graphql24.Kind.FIELD,
75902
75915
  name: {
75903
- kind: graphql25.Kind.NAME,
75916
+ kind: graphql24.Kind.NAME,
75904
75917
  value: keyField
75905
75918
  }
75906
75919
  });
@@ -75919,8 +75932,8 @@ async function addID(config2, documents) {
75919
75932
  }
75920
75933
 
75921
75934
  // src/codegen/transforms/fragmentVariables.ts
75922
- var graphql26 = __toESM(require_graphql2(), 1);
75923
- var GraphqlKinds2 = graphql26.Kind;
75935
+ var graphql25 = __toESM(require_graphql2(), 1);
75936
+ var GraphqlKinds2 = graphql25.Kind;
75924
75937
  async function fragmentVariables(config2, documents) {
75925
75938
  const fragments = collectFragments(config2, documents);
75926
75939
  const generatedFragments = {};
@@ -75943,7 +75956,7 @@ async function fragmentVariables(config2, documents) {
75943
75956
  });
75944
75957
  }
75945
75958
  const doc = {
75946
- kind: graphql26.Kind.DOCUMENT,
75959
+ kind: graphql25.Kind.DOCUMENT,
75947
75960
  definitions: Object.values(generatedFragments)
75948
75961
  };
75949
75962
  documents.push({
@@ -75979,7 +75992,7 @@ function inlineFragmentArgs({
75979
75992
  filepath,
75980
75993
  document
75981
75994
  ).reduce((acc, arg) => ({ ...acc, [arg.name]: arg }), {});
75982
- const result = graphql26.visit(document, {
75995
+ const result = graphql25.visit(document, {
75983
75996
  FragmentSpread(node) {
75984
75997
  const { definition } = fragmentDefinitions[node.name.value];
75985
75998
  let { args, hash } = collectWithArguments(config2, filepath, node, scope);
@@ -76067,7 +76080,7 @@ function inlineFragmentArgs({
76067
76080
  });
76068
76081
  if (newName) {
76069
76082
  result.name = {
76070
- kind: graphql26.Kind.NAME,
76083
+ kind: graphql25.Kind.NAME,
76071
76084
  value: newName
76072
76085
  };
76073
76086
  }
@@ -76179,7 +76192,7 @@ function operationScope(operation) {
76179
76192
  }
76180
76193
 
76181
76194
  // src/codegen/validators/typeCheck.ts
76182
- var graphql27 = __toESM(require_graphql2(), 1);
76195
+ var graphql26 = __toESM(require_graphql2(), 1);
76183
76196
  async function typeCheck(config2, docs) {
76184
76197
  const errors = [];
76185
76198
  const freeLists = [];
@@ -76187,11 +76200,11 @@ async function typeCheck(config2, docs) {
76187
76200
  const listTypes = [];
76188
76201
  const fragments = {};
76189
76202
  for (const { document: parsed, filename } of docs) {
76190
- graphql27.visit(parsed, {
76191
- [graphql27.Kind.FRAGMENT_DEFINITION](definition) {
76203
+ graphql26.visit(parsed, {
76204
+ [graphql26.Kind.FRAGMENT_DEFINITION](definition) {
76192
76205
  fragments[definition.name.value] = definition;
76193
76206
  },
76194
- [graphql27.Kind.DIRECTIVE](directive, _, parent, __, ancestors) {
76207
+ [graphql26.Kind.DIRECTIVE](directive, _, parent, __, ancestors) {
76195
76208
  if (![config2.listDirective, config2.paginateDirective].includes(directive.name.value)) {
76196
76209
  return;
76197
76210
  }
@@ -76237,14 +76250,14 @@ async function typeCheck(config2, docs) {
76237
76250
  );
76238
76251
  return;
76239
76252
  }
76240
- if (graphql27.isListType(rootType) || graphql27.isNonNullType(rootType) && graphql27.isListType(rootType.ofType)) {
76253
+ if (graphql26.isListType(rootType) || graphql26.isNonNullType(rootType) && graphql26.isListType(rootType.ofType)) {
76241
76254
  needsParent = true;
76242
76255
  break;
76243
76256
  }
76244
- if (graphql27.isNonNullType(rootType) && "ofType" in rootType) {
76257
+ if (graphql26.isNonNullType(rootType) && "ofType" in rootType) {
76245
76258
  rootType = rootType.ofType;
76246
76259
  }
76247
- if (graphql27.isScalarType(rootType)) {
76260
+ if (graphql26.isScalarType(rootType)) {
76248
76261
  break;
76249
76262
  }
76250
76263
  rootType = rootType?.getFields()[parent2.name.value]?.type;
@@ -76320,9 +76333,9 @@ async function typeCheck(config2, docs) {
76320
76333
  );
76321
76334
  }
76322
76335
  let targetTypes = [type];
76323
- if (graphql27.isUnionType(type)) {
76336
+ if (graphql26.isUnionType(type)) {
76324
76337
  targetTypes = config2.schema.getPossibleTypes(type);
76325
- } else if (graphql27.isInterfaceType(type)) {
76338
+ } else if (graphql26.isInterfaceType(type)) {
76326
76339
  try {
76327
76340
  for (const key of config2.keyFieldsForType(type.name)) {
76328
76341
  if (!type.getFields()[key]) {
@@ -76360,13 +76373,13 @@ async function typeCheck(config2, docs) {
76360
76373
  if (errors.length > 0) {
76361
76374
  throw errors;
76362
76375
  }
76363
- const rules = (filepath) => [...graphql27.specifiedRules].filter(
76376
+ const rules = (filepath) => [...graphql26.specifiedRules].filter(
76364
76377
  (rule) => ![
76365
- graphql27.NoUnusedFragmentsRule,
76366
- graphql27.KnownFragmentNamesRule,
76367
- graphql27.ExecutableDefinitionsRule,
76368
- graphql27.KnownDirectivesRule,
76369
- graphql27.KnownArgumentNamesRule
76378
+ graphql26.NoUnusedFragmentsRule,
76379
+ graphql26.KnownFragmentNamesRule,
76380
+ graphql26.ExecutableDefinitionsRule,
76381
+ graphql26.KnownDirectivesRule,
76382
+ graphql26.KnownArgumentNamesRule
76370
76383
  ].includes(rule)
76371
76384
  ).concat(
76372
76385
  validateLists({
@@ -76385,7 +76398,7 @@ async function typeCheck(config2, docs) {
76385
76398
  noUnusedFragmentArguments(config2)
76386
76399
  );
76387
76400
  for (const { filename, document: parsed } of docs) {
76388
- for (const error of graphql27.validate(config2.schema, parsed, rules(filename))) {
76401
+ for (const error of graphql26.validate(config2.schema, parsed, rules(filename))) {
76389
76402
  errors.push(
76390
76403
  new HoudiniError({
76391
76404
  filepath: filename,
@@ -76411,7 +76424,7 @@ var validateLists = ({
76411
76424
  if (!config2.isListFragment(node.name.value)) {
76412
76425
  if (!fragments[node.name.value]) {
76413
76426
  ctx.reportError(
76414
- new graphql27.GraphQLError(
76427
+ new graphql26.GraphQLError(
76415
76428
  "Encountered unknown fragment: " + node.name.value
76416
76429
  )
76417
76430
  );
@@ -76421,7 +76434,7 @@ var validateLists = ({
76421
76434
  const listName = config2.listNameFromFragment(node.name.value);
76422
76435
  if (!lists.includes(listName)) {
76423
76436
  ctx.reportError(
76424
- new graphql27.GraphQLError(
76437
+ new graphql26.GraphQLError(
76425
76438
  "Encountered fragment referencing unknown list: " + listName
76426
76439
  )
76427
76440
  );
@@ -76446,7 +76459,7 @@ var validateLists = ({
76446
76459
  );
76447
76460
  if (parentArg) {
76448
76461
  ctx.reportError(
76449
- new graphql27.GraphQLError(
76462
+ new graphql26.GraphQLError(
76450
76463
  `@${config2.deprecatedlistDirectiveParentIDArg} should be defined only in it's own directive now`
76451
76464
  )
76452
76465
  );
@@ -76462,7 +76475,7 @@ var validateLists = ({
76462
76475
  return;
76463
76476
  }
76464
76477
  ctx.reportError(
76465
- new graphql27.GraphQLError(
76478
+ new graphql26.GraphQLError(
76466
76479
  `For this list fragment, you need to add or @${config2.listParentDirective} or @${config2.listAllListsDirective} directive to specify the behavior`
76467
76480
  )
76468
76481
  );
@@ -76472,7 +76485,7 @@ var validateLists = ({
76472
76485
  const directiveName = node.name.value;
76473
76486
  if (directiveName === "connection") {
76474
76487
  ctx.reportError(
76475
- new graphql27.GraphQLError(
76488
+ new graphql26.GraphQLError(
76476
76489
  "@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."
76477
76490
  )
76478
76491
  );
@@ -76481,7 +76494,7 @@ var validateLists = ({
76481
76494
  if (!config2.isInternalDirective(node)) {
76482
76495
  if (!config2.schema.getDirective(directiveName)) {
76483
76496
  ctx.reportError(
76484
- new graphql27.GraphQLError(
76497
+ new graphql26.GraphQLError(
76485
76498
  "Encountered unknown directive: " + directiveName
76486
76499
  )
76487
76500
  );
@@ -76490,7 +76503,7 @@ var validateLists = ({
76490
76503
  }
76491
76504
  if (config2.isListOperationDirective(directiveName) && !listTypes.includes(config2.listNameFromDirective(directiveName))) {
76492
76505
  ctx.reportError(
76493
- new graphql27.GraphQLError(
76506
+ new graphql26.GraphQLError(
76494
76507
  "Encountered directive referencing unknown list: " + directiveName
76495
76508
  )
76496
76509
  );
@@ -76501,7 +76514,7 @@ var validateLists = ({
76501
76514
  };
76502
76515
  function knownArguments(config2) {
76503
76516
  return function(ctx) {
76504
- const nativeValidator = graphql27.KnownArgumentNamesRule(ctx);
76517
+ const nativeValidator = graphql26.KnownArgumentNamesRule(ctx);
76505
76518
  return {
76506
76519
  ...nativeValidator,
76507
76520
  Directive(directiveNode) {
@@ -76534,7 +76547,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
76534
76547
  for (const arg of node.arguments || []) {
76535
76548
  if (arg.value.kind !== "ObjectValue") {
76536
76549
  ctx.reportError(
76537
- new graphql27.GraphQLError("values in @arguments must be an object")
76550
+ new graphql26.GraphQLError("values in @arguments must be an object")
76538
76551
  );
76539
76552
  return;
76540
76553
  }
@@ -76544,13 +76557,13 @@ function validateFragmentArguments(config2, filepath, fragments) {
76544
76557
  );
76545
76558
  if (!typeArg) {
76546
76559
  ctx.reportError(
76547
- new graphql27.GraphQLError("missing type field for @arguments directive")
76560
+ new graphql26.GraphQLError("missing type field for @arguments directive")
76548
76561
  );
76549
76562
  return;
76550
76563
  }
76551
- if (typeArg.value.kind !== graphql27.Kind.STRING) {
76564
+ if (typeArg.value.kind !== graphql26.Kind.STRING) {
76552
76565
  ctx.reportError(
76553
- new graphql27.GraphQLError("type field to @arguments must be a string")
76566
+ new graphql26.GraphQLError("type field to @arguments must be a string")
76554
76567
  );
76555
76568
  return;
76556
76569
  }
@@ -76563,7 +76576,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
76563
76576
  );
76564
76577
  if (typeArg.value.value !== defaultValueType) {
76565
76578
  ctx.reportError(
76566
- new graphql27.GraphQLError(
76579
+ new graphql26.GraphQLError(
76567
76580
  `Invalid default value provided for ${arg.name.value}. Expected ${typeArg.value.value}, found ${defaultValueType}`
76568
76581
  )
76569
76582
  );
@@ -76581,7 +76594,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
76581
76594
  try {
76582
76595
  args = fragmentArguments(config2, filepath, fragments[fragmentName]);
76583
76596
  } catch (e2) {
76584
- ctx.reportError(new graphql27.GraphQLError(e2.message));
76597
+ ctx.reportError(new graphql26.GraphQLError(e2.message));
76585
76598
  return;
76586
76599
  }
76587
76600
  fragmentArguments2[fragmentName] = args;
@@ -76604,7 +76617,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
76604
76617
  );
76605
76618
  if (missing.length > 0) {
76606
76619
  ctx.reportError(
76607
- new graphql27.GraphQLError(
76620
+ new graphql26.GraphQLError(
76608
76621
  "The following arguments are missing from this fragment: " + JSON.stringify(missing)
76609
76622
  )
76610
76623
  );
@@ -76615,7 +76628,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
76615
76628
  );
76616
76629
  if (unknown.length > 0) {
76617
76630
  ctx.reportError(
76618
- new graphql27.GraphQLError(
76631
+ new graphql26.GraphQLError(
76619
76632
  "Encountered unknown arguments: " + JSON.stringify(unknown)
76620
76633
  )
76621
76634
  );
@@ -76627,7 +76640,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
76627
76640
  ]
76628
76641
  );
76629
76642
  for (const [applied, target] of zipped) {
76630
- if (applied.value.kind === graphql27.Kind.VARIABLE || applied.value.kind === graphql27.Kind.LIST || applied.value.kind === graphql27.Kind.OBJECT) {
76643
+ if (applied.value.kind === graphql26.Kind.VARIABLE || applied.value.kind === graphql26.Kind.LIST || applied.value.kind === graphql26.Kind.OBJECT) {
76631
76644
  continue;
76632
76645
  }
76633
76646
  const appliedType = applied.value.kind.substring(
@@ -76636,7 +76649,7 @@ function validateFragmentArguments(config2, filepath, fragments) {
76636
76649
  );
76637
76650
  if (appliedType !== target) {
76638
76651
  ctx.reportError(
76639
- new graphql27.GraphQLError(
76652
+ new graphql26.GraphQLError(
76640
76653
  `Invalid argument type. Expected ${target}, found ${appliedType}`
76641
76654
  )
76642
76655
  );
@@ -76657,7 +76670,7 @@ function paginateArgs(config2, filepath) {
76657
76670
  }
76658
76671
  if (alreadyPaginated) {
76659
76672
  ctx.reportError(
76660
- new graphql27.GraphQLError(
76673
+ new graphql26.GraphQLError(
76661
76674
  `@${config2.paginateDirective} can only appear in a document once.`
76662
76675
  )
76663
76676
  );
@@ -76672,7 +76685,7 @@ function paginateArgs(config2, filepath) {
76672
76685
  const hasRequiredArgs = definitionArgs.find((arg) => arg.required);
76673
76686
  if (hasRequiredArgs) {
76674
76687
  ctx.reportError(
76675
- new graphql27.GraphQLError(
76688
+ new graphql26.GraphQLError(
76676
76689
  "@paginate cannot appear on a document with required args"
76677
76690
  )
76678
76691
  );
@@ -76704,14 +76717,14 @@ function paginateArgs(config2, filepath) {
76704
76717
  const backwards = appliedArgs.has("last");
76705
76718
  if (!forward && !backwards) {
76706
76719
  ctx.reportError(
76707
- new graphql27.GraphQLError(
76720
+ new graphql26.GraphQLError(
76708
76721
  "A field with cursor-based pagination must have a first or last argument"
76709
76722
  )
76710
76723
  );
76711
76724
  }
76712
76725
  if (forward && backwards) {
76713
76726
  ctx.reportError(
76714
- new graphql27.GraphQLError(
76727
+ new graphql26.GraphQLError(
76715
76728
  `A field with cursor pagination cannot go forwards an backwards simultaneously`
76716
76729
  )
76717
76730
  );
@@ -76725,7 +76738,7 @@ function paginateArgs(config2, filepath) {
76725
76738
  );
76726
76739
  if (!appliedLimitArg) {
76727
76740
  ctx.reportError(
76728
- new graphql27.GraphQLError(
76741
+ new graphql26.GraphQLError(
76729
76742
  "A field with offset-based pagination must have a limit argument"
76730
76743
  )
76731
76744
  );
@@ -76741,20 +76754,20 @@ function noUnusedFragmentArguments(config2) {
76741
76754
  const args = /* @__PURE__ */ new Set();
76742
76755
  return {
76743
76756
  enter(node) {
76744
- if (node.kind === graphql27.Kind.FRAGMENT_DEFINITION) {
76757
+ if (node.kind === graphql26.Kind.FRAGMENT_DEFINITION) {
76745
76758
  const definitionArguments = node.directives?.filter((directive) => directive.name.value === config2.argumentsDirective).flatMap((directive) => directive.arguments);
76746
76759
  for (const arg of definitionArguments?.map((arg2) => arg2?.name.value) || []) {
76747
76760
  args.add(arg);
76748
76761
  }
76749
- } else if (node.kind === graphql27.Kind.VARIABLE) {
76762
+ } else if (node.kind === graphql26.Kind.VARIABLE) {
76750
76763
  args.delete(node.name.value);
76751
76764
  }
76752
76765
  },
76753
76766
  leave(node) {
76754
- if (node.kind === graphql27.Kind.FRAGMENT_DEFINITION) {
76767
+ if (node.kind === graphql26.Kind.FRAGMENT_DEFINITION) {
76755
76768
  if (args.size > 0) {
76756
76769
  ctx.reportError(
76757
- new graphql27.GraphQLError(
76770
+ new graphql26.GraphQLError(
76758
76771
  "Encountered unused fragment arguments: " + [...args].join(",")
76759
76772
  )
76760
76773
  );
@@ -76790,7 +76803,7 @@ function nodeDirectives(config2, directives) {
76790
76803
  if (definition.kind === "OperationDefinition") {
76791
76804
  if (definition.operation !== "query") {
76792
76805
  ctx.reportError(
76793
- new graphql27.GraphQLError(
76806
+ new graphql26.GraphQLError(
76794
76807
  `@${node.name.value} must fall on a fragment or query document`
76795
76808
  )
76796
76809
  );
@@ -76802,7 +76815,7 @@ function nodeDirectives(config2, directives) {
76802
76815
  }
76803
76816
  if (!possibleNodes.includes(definitionType)) {
76804
76817
  ctx.reportError(
76805
- new graphql27.GraphQLError(paginateOnNonNodeMessage(config2, node.name.value))
76818
+ new graphql26.GraphQLError(paginateOnNonNodeMessage(config2, node.name.value))
76806
76819
  );
76807
76820
  }
76808
76821
  }
@@ -76821,7 +76834,7 @@ function checkMutationOperation(config2) {
76821
76834
  );
76822
76835
  if (append && prepend) {
76823
76836
  ctx.reportError(
76824
- new graphql27.GraphQLError(
76837
+ new graphql26.GraphQLError(
76825
76838
  `You can't apply both @${config2.listPrependDirective} and @${config2.listAppendDirective} at the same time`
76826
76839
  )
76827
76840
  );
@@ -76835,7 +76848,7 @@ function checkMutationOperation(config2) {
76835
76848
  );
76836
76849
  if (parentId && allLists) {
76837
76850
  ctx.reportError(
76838
- new graphql27.GraphQLError(
76851
+ new graphql26.GraphQLError(
76839
76852
  `You can't apply both @${config2.listParentDirective} and @${config2.listAllListsDirective} at the same time`
76840
76853
  )
76841
76854
  );
@@ -76857,7 +76870,7 @@ function checkMaskDirective(config2) {
76857
76870
  );
76858
76871
  if (maskEnableDirective && maskDisableDirective) {
76859
76872
  ctx.reportError(
76860
- new graphql27.GraphQLError(
76873
+ new graphql26.GraphQLError(
76861
76874
  `You can't apply both @${config2.maskEnableDirective} and @${config2.maskDisableDirective} at the same time`
76862
76875
  )
76863
76876
  );
@@ -76873,7 +76886,7 @@ function getAndVerifyNodeInterface(config2) {
76873
76886
  if (!nodeInterface) {
76874
76887
  return null;
76875
76888
  }
76876
- if (!graphql27.isInterfaceType(nodeInterface)) {
76889
+ if (!graphql26.isInterfaceType(nodeInterface)) {
76877
76890
  displayInvalidNodeFieldMessage(config2.logLevel);
76878
76891
  return null;
76879
76892
  }
@@ -76971,11 +76984,11 @@ async function uniqueDocumentNames(config2, docs) {
76971
76984
  }
76972
76985
 
76973
76986
  // src/codegen/validators/noIDAlias.ts
76974
- var graphql28 = __toESM(require_graphql2(), 1);
76987
+ var graphql27 = __toESM(require_graphql2(), 1);
76975
76988
  async function noIDAlias(config2, docs) {
76976
76989
  const errors = [];
76977
76990
  for (const { filename, document } of docs) {
76978
- graphql28.visit(document, {
76991
+ graphql27.visit(document, {
76979
76992
  Field(node, _, __, ___, ancestors) {
76980
76993
  const fieldType = parentTypeFromAncestors(config2.schema, filename, ancestors).name;
76981
76994
  if (config2.keyFieldsForType(fieldType).includes(node.alias?.value || "")) {
@@ -77173,12 +77186,12 @@ async function processJSFile(config2, contents) {
77173
77186
  return documents;
77174
77187
  }
77175
77188
  async function processGraphQLDocument(config2, filepath, document) {
77176
- const parsedDoc = graphql29.parse(document);
77189
+ const parsedDoc = graphql28.parse(document);
77177
77190
  const operations = parsedDoc.definitions.filter(
77178
- ({ kind: kind2 }) => kind2 === graphql29.Kind.OPERATION_DEFINITION
77191
+ ({ kind: kind2 }) => kind2 === graphql28.Kind.OPERATION_DEFINITION
77179
77192
  );
77180
77193
  const fragments = parsedDoc.definitions.filter(
77181
- ({ kind: kind2 }) => kind2 === graphql29.Kind.FRAGMENT_DEFINITION
77194
+ ({ kind: kind2 }) => kind2 === graphql28.Kind.FRAGMENT_DEFINITION
77182
77195
  );
77183
77196
  if (operations.length > 1) {
77184
77197
  throw new HoudiniError({
@@ -77733,8 +77746,8 @@ async function updatePackageJSON(targetPath) {
77733
77746
  }
77734
77747
  packageJSON.devDependencies = {
77735
77748
  ...packageJSON.devDependencies,
77736
- houdini: "^0.19.4",
77737
- "houdini-svelte": "^0.19.4",
77749
+ houdini: "^1.0.0-next.0",
77750
+ "houdini-svelte": "^1.0.0-next.0",
77738
77751
  graphql: "^15.8.0"
77739
77752
  };
77740
77753
  await fs_exports.writeFile(packagePath, JSON.stringify(packageJSON, null, 4));