houdini 2.0.0-next.4 → 2.0.0-next.6

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.
@@ -65678,10 +65678,10 @@ var AST3 = recast2.types.builders;
65678
65678
  function unwrappedTsTypeReference(config, filepath, missingScalars, {
65679
65679
  type,
65680
65680
  wrappers
65681
- }, body) {
65681
+ }, body, input) {
65682
65682
  let result;
65683
65683
  if (graphql6.isScalarType(type)) {
65684
- result = scalarPropertyValue(config, filepath, missingScalars, type, body, null);
65684
+ result = scalarPropertyValue(config, filepath, missingScalars, type, body, null, input);
65685
65685
  } else if (graphql6.isEnumType(type)) {
65686
65686
  result = enumReference(config, body, type.name);
65687
65687
  } else {
@@ -65698,14 +65698,15 @@ function unwrappedTsTypeReference(config, filepath, missingScalars, {
65698
65698
  }
65699
65699
  return result;
65700
65700
  }
65701
- function tsTypeReference(config, filepath, missingScalars, definition, body) {
65701
+ function tsTypeReference(config, filepath, missingScalars, definition, body, input) {
65702
65702
  const { type, wrappers } = unwrapType(config, definition.type);
65703
65703
  return unwrappedTsTypeReference(
65704
65704
  config,
65705
65705
  filepath,
65706
65706
  missingScalars,
65707
65707
  { type, wrappers },
65708
- body
65708
+ body,
65709
+ input
65709
65710
  );
65710
65711
  }
65711
65712
  function enumReference(config, body, name) {
@@ -65734,7 +65735,7 @@ function nullableField(inner, input = false) {
65734
65735
  }
65735
65736
  return AST3.tsUnionType(members);
65736
65737
  }
65737
- function scalarPropertyValue(config, filepath, missingScalars, target, body, field) {
65738
+ function scalarPropertyValue(config, filepath, missingScalars, target, body, field, input) {
65738
65739
  if (config.configFile.features?.componentFields && target.name === config.componentScalar) {
65739
65740
  if (!field) {
65740
65741
  return AST3.tsNeverKeyword();
@@ -65793,6 +65794,9 @@ function scalarPropertyValue(config, filepath, missingScalars, target, body, fie
65793
65794
  return AST3.tsBooleanKeyword();
65794
65795
  }
65795
65796
  case "ID": {
65797
+ if (input) {
65798
+ return AST3.tsUnionType([AST3.tsStringKeyword(), AST3.tsNumberKeyword()]);
65799
+ }
65796
65800
  return AST3.tsStringKeyword();
65797
65801
  }
65798
65802
  default: {
@@ -65803,7 +65807,8 @@ function scalarPropertyValue(config, filepath, missingScalars, target, body, fie
65803
65807
  missingScalars,
65804
65808
  target.ofType,
65805
65809
  body,
65806
- field
65810
+ field,
65811
+ input
65807
65812
  );
65808
65813
  }
65809
65814
  if (config.scalars?.[target.name]) {
@@ -68900,7 +68905,7 @@ var recast11 = __toESM(require_main2(), 1);
68900
68905
  var graphql19 = __toESM(require("graphql"), 1);
68901
68906
  var recast7 = __toESM(require_main2(), 1);
68902
68907
  var AST8 = recast7.types.builders;
68903
- function addReferencedInputTypes(config, filepath, body, visitedTypes, missingScalars, rootType) {
68908
+ function addReferencedInputTypes(config, filepath, body, visitedTypes, missingScalars, rootType, input) {
68904
68909
  const { type } = unwrapType(config, rootType);
68905
68910
  if (graphql19.isScalarType(type)) {
68906
68911
  return;
@@ -68925,12 +68930,20 @@ function addReferencedInputTypes(config, filepath, body, visitedTypes, missingSc
68925
68930
  }
68926
68931
  const members = [];
68927
68932
  for (const field of Object.values(type.getFields())) {
68928
- addReferencedInputTypes(config, filepath, body, visitedTypes, missingScalars, field.type);
68933
+ addReferencedInputTypes(
68934
+ config,
68935
+ filepath,
68936
+ body,
68937
+ visitedTypes,
68938
+ missingScalars,
68939
+ field.type,
68940
+ input
68941
+ );
68929
68942
  members.push(
68930
68943
  AST8.tsPropertySignature(
68931
68944
  AST8.identifier(field.name),
68932
68945
  AST8.tsTypeAnnotation(
68933
- tsTypeReference(config, filepath, missingScalars, field, body)
68946
+ tsTypeReference(config, filepath, missingScalars, field, body, input)
68934
68947
  ),
68935
68948
  graphql19.isNullableType(field.type)
68936
68949
  )
@@ -68973,7 +68986,8 @@ function inlineType({
68973
68986
  includeFragments,
68974
68987
  allOptional,
68975
68988
  forceNonNull,
68976
- field
68989
+ field,
68990
+ input
68977
68991
  }) {
68978
68992
  const { type, wrappers } = unwrapType(config, rootType);
68979
68993
  let result;
@@ -68985,7 +68999,8 @@ function inlineType({
68985
68999
  missingScalars,
68986
69000
  type,
68987
69001
  body,
68988
- field
69002
+ field,
69003
+ input
68989
69004
  );
68990
69005
  } else if (graphql20.isEnumType(type)) {
68991
69006
  ensureImports({
@@ -69093,7 +69108,8 @@ function inlineType({
69093
69108
  field: {
69094
69109
  field: attributeName,
69095
69110
  parent: type.name
69096
- }
69111
+ },
69112
+ input
69097
69113
  });
69098
69114
  const hasIncludeOrSkipDirective = selection.directives && selection.directives.filter(
69099
69115
  (directive) => directive.name.value === "include" || directive.name.value === "skip"
@@ -69157,7 +69173,8 @@ function inlineType({
69157
69173
  missingScalars,
69158
69174
  includeFragments,
69159
69175
  allOptional,
69160
- field: null
69176
+ field: null,
69177
+ input: false
69161
69178
  });
69162
69179
  let objectType = fragmentType;
69163
69180
  if (fragmentType.type === "TSUnionType") {
@@ -69622,7 +69639,8 @@ async function generateOperationTypeDefs(config, filepath, document, body, defin
69622
69639
  body,
69623
69640
  missingScalars,
69624
69641
  includeFragments: true,
69625
- field: null
69642
+ field: null,
69643
+ input: false
69626
69644
  });
69627
69645
  if (artifact.kind === "HoudiniQuery") {
69628
69646
  resultType = withLoadingState({
@@ -69671,7 +69689,8 @@ async function generateOperationTypeDefs(config, filepath, document, body, defin
69671
69689
  body,
69672
69690
  visitedTypes,
69673
69691
  missingScalars,
69674
- variableDefinition.type
69692
+ variableDefinition.type,
69693
+ true
69675
69694
  );
69676
69695
  }
69677
69696
  body.push(
@@ -69689,7 +69708,8 @@ async function generateOperationTypeDefs(config, filepath, document, body, defin
69689
69708
  filepath,
69690
69709
  missingScalars,
69691
69710
  definition2,
69692
- body
69711
+ body,
69712
+ true
69693
69713
  )
69694
69714
  ),
69695
69715
  definition2.type.kind !== "NonNullType"
@@ -69724,7 +69744,8 @@ async function generateOperationTypeDefs(config, filepath, document, body, defin
69724
69744
  missingScalars,
69725
69745
  includeFragments: false,
69726
69746
  allOptional: true,
69727
- field: null
69747
+ field: null,
69748
+ input: false
69728
69749
  })
69729
69750
  )
69730
69751
  )
@@ -69757,7 +69778,8 @@ async function generateFragmentTypeDefs(config, filepath, body, selections, defi
69757
69778
  filepath,
69758
69779
  missingScalars,
69759
69780
  definition2,
69760
- body
69781
+ body,
69782
+ false
69761
69783
  )
69762
69784
  ),
69763
69785
  definition2.type.kind !== "NonNullType"
@@ -69820,7 +69842,8 @@ async function generateFragmentTypeDefs(config, filepath, body, selections, defi
69820
69842
  visitedTypes,
69821
69843
  missingScalars,
69822
69844
  includeFragments: true,
69823
- field: null
69845
+ field: null,
69846
+ input: false
69824
69847
  })
69825
69848
  })
69826
69849
  )
@@ -69916,7 +69939,8 @@ function typeDefinitions(config, filepath, body, docs, returnType) {
69916
69939
  {
69917
69940
  field: key,
69918
69941
  parent: type.name
69919
- }
69942
+ },
69943
+ false
69920
69944
  )
69921
69945
  )
69922
69946
  );
@@ -69943,7 +69967,8 @@ function typeDefinitions(config, filepath, body, docs, returnType) {
69943
69967
  {
69944
69968
  field: key,
69945
69969
  parent: type.name
69946
- }
69970
+ },
69971
+ false
69947
69972
  )
69948
69973
  );
69949
69974
  } else if (graphql21.isEnumType(unwrapped.type)) {
@@ -69981,7 +70006,8 @@ function typeDefinitions(config, filepath, body, docs, returnType) {
69981
70006
  body,
69982
70007
  visitedTypes,
69983
70008
  /* @__PURE__ */ new Set(),
69984
- arg.type
70009
+ arg.type,
70010
+ true
69985
70011
  );
69986
70012
  const prop = AST13.tsPropertySignature(
69987
70013
  AST13.identifier(arg.name),
@@ -69991,7 +70017,8 @@ function typeDefinitions(config, filepath, body, docs, returnType) {
69991
70017
  filepath,
69992
70018
  /* @__PURE__ */ new Set(),
69993
70019
  arg,
69994
- body
70020
+ body,
70021
+ graphql21.isInputType(arg.type)
69995
70022
  )
69996
70023
  )
69997
70024
  );
@@ -70103,7 +70130,8 @@ function listDefinitions(config, filepath, body, docs) {
70103
70130
  filepath,
70104
70131
  /* @__PURE__ */ new Set(),
70105
70132
  arg,
70106
- body
70133
+ body,
70134
+ graphql21.isInputType(arg.type)
70107
70135
  )
70108
70136
  )
70109
70137
  );
@@ -65677,10 +65677,10 @@ var AST3 = recast2.types.builders;
65677
65677
  function unwrappedTsTypeReference(config, filepath, missingScalars, {
65678
65678
  type,
65679
65679
  wrappers
65680
- }, body) {
65680
+ }, body, input) {
65681
65681
  let result;
65682
65682
  if (graphql6.isScalarType(type)) {
65683
- result = scalarPropertyValue(config, filepath, missingScalars, type, body, null);
65683
+ result = scalarPropertyValue(config, filepath, missingScalars, type, body, null, input);
65684
65684
  } else if (graphql6.isEnumType(type)) {
65685
65685
  result = enumReference(config, body, type.name);
65686
65686
  } else {
@@ -65697,14 +65697,15 @@ function unwrappedTsTypeReference(config, filepath, missingScalars, {
65697
65697
  }
65698
65698
  return result;
65699
65699
  }
65700
- function tsTypeReference(config, filepath, missingScalars, definition, body) {
65700
+ function tsTypeReference(config, filepath, missingScalars, definition, body, input) {
65701
65701
  const { type, wrappers } = unwrapType(config, definition.type);
65702
65702
  return unwrappedTsTypeReference(
65703
65703
  config,
65704
65704
  filepath,
65705
65705
  missingScalars,
65706
65706
  { type, wrappers },
65707
- body
65707
+ body,
65708
+ input
65708
65709
  );
65709
65710
  }
65710
65711
  function enumReference(config, body, name) {
@@ -65733,7 +65734,7 @@ function nullableField(inner, input = false) {
65733
65734
  }
65734
65735
  return AST3.tsUnionType(members);
65735
65736
  }
65736
- function scalarPropertyValue(config, filepath, missingScalars, target, body, field) {
65737
+ function scalarPropertyValue(config, filepath, missingScalars, target, body, field, input) {
65737
65738
  if (config.configFile.features?.componentFields && target.name === config.componentScalar) {
65738
65739
  if (!field) {
65739
65740
  return AST3.tsNeverKeyword();
@@ -65792,6 +65793,9 @@ function scalarPropertyValue(config, filepath, missingScalars, target, body, fie
65792
65793
  return AST3.tsBooleanKeyword();
65793
65794
  }
65794
65795
  case "ID": {
65796
+ if (input) {
65797
+ return AST3.tsUnionType([AST3.tsStringKeyword(), AST3.tsNumberKeyword()]);
65798
+ }
65795
65799
  return AST3.tsStringKeyword();
65796
65800
  }
65797
65801
  default: {
@@ -65802,7 +65806,8 @@ function scalarPropertyValue(config, filepath, missingScalars, target, body, fie
65802
65806
  missingScalars,
65803
65807
  target.ofType,
65804
65808
  body,
65805
- field
65809
+ field,
65810
+ input
65806
65811
  );
65807
65812
  }
65808
65813
  if (config.scalars?.[target.name]) {
@@ -68899,7 +68904,7 @@ var recast11 = __toESM(require_main2(), 1);
68899
68904
  var recast7 = __toESM(require_main2(), 1);
68900
68905
  import * as graphql19 from "graphql";
68901
68906
  var AST8 = recast7.types.builders;
68902
- function addReferencedInputTypes(config, filepath, body, visitedTypes, missingScalars, rootType) {
68907
+ function addReferencedInputTypes(config, filepath, body, visitedTypes, missingScalars, rootType, input) {
68903
68908
  const { type } = unwrapType(config, rootType);
68904
68909
  if (graphql19.isScalarType(type)) {
68905
68910
  return;
@@ -68924,12 +68929,20 @@ function addReferencedInputTypes(config, filepath, body, visitedTypes, missingSc
68924
68929
  }
68925
68930
  const members = [];
68926
68931
  for (const field of Object.values(type.getFields())) {
68927
- addReferencedInputTypes(config, filepath, body, visitedTypes, missingScalars, field.type);
68932
+ addReferencedInputTypes(
68933
+ config,
68934
+ filepath,
68935
+ body,
68936
+ visitedTypes,
68937
+ missingScalars,
68938
+ field.type,
68939
+ input
68940
+ );
68928
68941
  members.push(
68929
68942
  AST8.tsPropertySignature(
68930
68943
  AST8.identifier(field.name),
68931
68944
  AST8.tsTypeAnnotation(
68932
- tsTypeReference(config, filepath, missingScalars, field, body)
68945
+ tsTypeReference(config, filepath, missingScalars, field, body, input)
68933
68946
  ),
68934
68947
  graphql19.isNullableType(field.type)
68935
68948
  )
@@ -68972,7 +68985,8 @@ function inlineType({
68972
68985
  includeFragments,
68973
68986
  allOptional,
68974
68987
  forceNonNull,
68975
- field
68988
+ field,
68989
+ input
68976
68990
  }) {
68977
68991
  const { type, wrappers } = unwrapType(config, rootType);
68978
68992
  let result;
@@ -68984,7 +68998,8 @@ function inlineType({
68984
68998
  missingScalars,
68985
68999
  type,
68986
69000
  body,
68987
- field
69001
+ field,
69002
+ input
68988
69003
  );
68989
69004
  } else if (graphql20.isEnumType(type)) {
68990
69005
  ensureImports({
@@ -69092,7 +69107,8 @@ function inlineType({
69092
69107
  field: {
69093
69108
  field: attributeName,
69094
69109
  parent: type.name
69095
- }
69110
+ },
69111
+ input
69096
69112
  });
69097
69113
  const hasIncludeOrSkipDirective = selection.directives && selection.directives.filter(
69098
69114
  (directive) => directive.name.value === "include" || directive.name.value === "skip"
@@ -69156,7 +69172,8 @@ function inlineType({
69156
69172
  missingScalars,
69157
69173
  includeFragments,
69158
69174
  allOptional,
69159
- field: null
69175
+ field: null,
69176
+ input: false
69160
69177
  });
69161
69178
  let objectType = fragmentType;
69162
69179
  if (fragmentType.type === "TSUnionType") {
@@ -69621,7 +69638,8 @@ async function generateOperationTypeDefs(config, filepath, document, body, defin
69621
69638
  body,
69622
69639
  missingScalars,
69623
69640
  includeFragments: true,
69624
- field: null
69641
+ field: null,
69642
+ input: false
69625
69643
  });
69626
69644
  if (artifact.kind === "HoudiniQuery") {
69627
69645
  resultType = withLoadingState({
@@ -69670,7 +69688,8 @@ async function generateOperationTypeDefs(config, filepath, document, body, defin
69670
69688
  body,
69671
69689
  visitedTypes,
69672
69690
  missingScalars,
69673
- variableDefinition.type
69691
+ variableDefinition.type,
69692
+ true
69674
69693
  );
69675
69694
  }
69676
69695
  body.push(
@@ -69688,7 +69707,8 @@ async function generateOperationTypeDefs(config, filepath, document, body, defin
69688
69707
  filepath,
69689
69708
  missingScalars,
69690
69709
  definition2,
69691
- body
69710
+ body,
69711
+ true
69692
69712
  )
69693
69713
  ),
69694
69714
  definition2.type.kind !== "NonNullType"
@@ -69723,7 +69743,8 @@ async function generateOperationTypeDefs(config, filepath, document, body, defin
69723
69743
  missingScalars,
69724
69744
  includeFragments: false,
69725
69745
  allOptional: true,
69726
- field: null
69746
+ field: null,
69747
+ input: false
69727
69748
  })
69728
69749
  )
69729
69750
  )
@@ -69756,7 +69777,8 @@ async function generateFragmentTypeDefs(config, filepath, body, selections, defi
69756
69777
  filepath,
69757
69778
  missingScalars,
69758
69779
  definition2,
69759
- body
69780
+ body,
69781
+ false
69760
69782
  )
69761
69783
  ),
69762
69784
  definition2.type.kind !== "NonNullType"
@@ -69819,7 +69841,8 @@ async function generateFragmentTypeDefs(config, filepath, body, selections, defi
69819
69841
  visitedTypes,
69820
69842
  missingScalars,
69821
69843
  includeFragments: true,
69822
- field: null
69844
+ field: null,
69845
+ input: false
69823
69846
  })
69824
69847
  })
69825
69848
  )
@@ -69915,7 +69938,8 @@ function typeDefinitions(config, filepath, body, docs, returnType) {
69915
69938
  {
69916
69939
  field: key,
69917
69940
  parent: type.name
69918
- }
69941
+ },
69942
+ false
69919
69943
  )
69920
69944
  )
69921
69945
  );
@@ -69942,7 +69966,8 @@ function typeDefinitions(config, filepath, body, docs, returnType) {
69942
69966
  {
69943
69967
  field: key,
69944
69968
  parent: type.name
69945
- }
69969
+ },
69970
+ false
69946
69971
  )
69947
69972
  );
69948
69973
  } else if (graphql21.isEnumType(unwrapped.type)) {
@@ -69980,7 +70005,8 @@ function typeDefinitions(config, filepath, body, docs, returnType) {
69980
70005
  body,
69981
70006
  visitedTypes,
69982
70007
  /* @__PURE__ */ new Set(),
69983
- arg.type
70008
+ arg.type,
70009
+ true
69984
70010
  );
69985
70011
  const prop = AST13.tsPropertySignature(
69986
70012
  AST13.identifier(arg.name),
@@ -69990,7 +70016,8 @@ function typeDefinitions(config, filepath, body, docs, returnType) {
69990
70016
  filepath,
69991
70017
  /* @__PURE__ */ new Set(),
69992
70018
  arg,
69993
- body
70019
+ body,
70020
+ graphql21.isInputType(arg.type)
69994
70021
  )
69995
70022
  )
69996
70023
  );
@@ -70102,7 +70129,8 @@ function listDefinitions(config, filepath, body, docs) {
70102
70129
  filepath,
70103
70130
  /* @__PURE__ */ new Set(),
70104
70131
  arg,
70105
- body
70132
+ body,
70133
+ graphql21.isInputType(arg.type)
70106
70134
  )
70107
70135
  )
70108
70136
  );
@@ -6,15 +6,15 @@ import { TypeWrapper } from './graphql';
6
6
  export declare function unwrappedTsTypeReference(config: Config, filepath: string, missingScalars: Set<string>, { type, wrappers, }: {
7
7
  type: graphql.GraphQLNamedType;
8
8
  wrappers: TypeWrapper[];
9
- }, body: StatementKind[]): TSTypeKind;
9
+ }, body: StatementKind[], input: boolean): TSTypeKind;
10
10
  export declare function tsTypeReference(config: Config, filepath: string, missingScalars: Set<string>, definition: {
11
11
  type: graphql.GraphQLScalarType | graphql.GraphQLInputType | graphql.GraphQLNamedType | graphql.TypeNode;
12
- }, body: StatementKind[]): TSTypeKind;
12
+ }, body: StatementKind[], input: boolean): TSTypeKind;
13
13
  export declare function enumReference(config: Config, body: StatementKind[], name: string): recast.types.namedTypes.TSTypeReference;
14
14
  export declare function readonlyProperty(prop: recast.types.namedTypes.TSPropertySignature, enable?: boolean): recast.types.namedTypes.TSPropertySignature;
15
15
  export declare function nullableField(inner: TSTypeKind, input?: boolean): recast.types.namedTypes.TSUnionType;
16
16
  export declare function scalarPropertyValue(config: Config, filepath: string, missingScalars: Set<string>, target: graphql.GraphQLNamedType, body: StatementKind[], field: {
17
17
  parent: string;
18
18
  field: string;
19
- } | null): TSTypeKind;
19
+ } | null, input: boolean): TSTypeKind;
20
20
  export declare function writeTsConfig(config: Config): Promise<void>;
@@ -73407,7 +73407,8 @@ async function load_manifest(args) {
73407
73407
  const name = child.isDirectory() ? child.name : parse3(child.name).name;
73408
73408
  if (name === "+schema") {
73409
73409
  manifest.local_schema = true;
73410
- } else if (name === "+yoga") {
73410
+ }
73411
+ if (name === "+yoga") {
73411
73412
  manifest.local_yoga = true;
73412
73413
  }
73413
73414
  }
@@ -77424,7 +77425,7 @@ var HoudiniClient = class {
77424
77425
  }
77425
77426
  this.throwOnError_operations = throwOnError2?.operations ?? [];
77426
77427
  let serverPort = globalThis.process?.env?.HOUDINI_PORT ?? "5173";
77427
- this.url = url ?? (globalThis.window ? "" : `https://localhost:${serverPort}`) + localApiEndpoint(getCurrentConfig());
77428
+ this.url = url ?? (globalThis.window ? "" : `http://localhost:${serverPort}`) + localApiEndpoint(getCurrentConfig());
77428
77429
  this.throwOnError = throwOnError2;
77429
77430
  this.fetchParams = fetchParams2;
77430
77431
  this.pipeline = pipeline2;
@@ -78913,10 +78914,10 @@ var AST3 = recast2.types.builders;
78913
78914
  function unwrappedTsTypeReference(config, filepath, missingScalars, {
78914
78915
  type,
78915
78916
  wrappers
78916
- }, body) {
78917
+ }, body, input) {
78917
78918
  let result;
78918
78919
  if (graphql6.isScalarType(type)) {
78919
- result = scalarPropertyValue(config, filepath, missingScalars, type, body, null);
78920
+ result = scalarPropertyValue(config, filepath, missingScalars, type, body, null, input);
78920
78921
  } else if (graphql6.isEnumType(type)) {
78921
78922
  result = enumReference(config, body, type.name);
78922
78923
  } else {
@@ -78933,14 +78934,15 @@ function unwrappedTsTypeReference(config, filepath, missingScalars, {
78933
78934
  }
78934
78935
  return result;
78935
78936
  }
78936
- function tsTypeReference(config, filepath, missingScalars, definition, body) {
78937
+ function tsTypeReference(config, filepath, missingScalars, definition, body, input) {
78937
78938
  const { type, wrappers } = unwrapType(config, definition.type);
78938
78939
  return unwrappedTsTypeReference(
78939
78940
  config,
78940
78941
  filepath,
78941
78942
  missingScalars,
78942
78943
  { type, wrappers },
78943
- body
78944
+ body,
78945
+ input
78944
78946
  );
78945
78947
  }
78946
78948
  function enumReference(config, body, name) {
@@ -78969,7 +78971,7 @@ function nullableField(inner, input = false) {
78969
78971
  }
78970
78972
  return AST3.tsUnionType(members);
78971
78973
  }
78972
- function scalarPropertyValue(config, filepath, missingScalars, target, body, field) {
78974
+ function scalarPropertyValue(config, filepath, missingScalars, target, body, field, input) {
78973
78975
  if (config.configFile.features?.componentFields && target.name === config.componentScalar) {
78974
78976
  if (!field) {
78975
78977
  return AST3.tsNeverKeyword();
@@ -79028,6 +79030,9 @@ function scalarPropertyValue(config, filepath, missingScalars, target, body, fie
79028
79030
  return AST3.tsBooleanKeyword();
79029
79031
  }
79030
79032
  case "ID": {
79033
+ if (input) {
79034
+ return AST3.tsUnionType([AST3.tsStringKeyword(), AST3.tsNumberKeyword()]);
79035
+ }
79031
79036
  return AST3.tsStringKeyword();
79032
79037
  }
79033
79038
  default: {
@@ -79038,7 +79043,8 @@ function scalarPropertyValue(config, filepath, missingScalars, target, body, fie
79038
79043
  missingScalars,
79039
79044
  target.ofType,
79040
79045
  body,
79041
- field
79046
+ field,
79047
+ input
79042
79048
  );
79043
79049
  }
79044
79050
  if (config.scalars?.[target.name]) {
@@ -73318,7 +73318,8 @@ async function load_manifest(args) {
73318
73318
  const name = child.isDirectory() ? child.name : parse3(child.name).name;
73319
73319
  if (name === "+schema") {
73320
73320
  manifest.local_schema = true;
73321
- } else if (name === "+yoga") {
73321
+ }
73322
+ if (name === "+yoga") {
73322
73323
  manifest.local_yoga = true;
73323
73324
  }
73324
73325
  }
@@ -77335,7 +77336,7 @@ var HoudiniClient = class {
77335
77336
  }
77336
77337
  this.throwOnError_operations = throwOnError2?.operations ?? [];
77337
77338
  let serverPort = globalThis.process?.env?.HOUDINI_PORT ?? "5173";
77338
- this.url = url ?? (globalThis.window ? "" : `https://localhost:${serverPort}`) + localApiEndpoint(getCurrentConfig());
77339
+ this.url = url ?? (globalThis.window ? "" : `http://localhost:${serverPort}`) + localApiEndpoint(getCurrentConfig());
77339
77340
  this.throwOnError = throwOnError2;
77340
77341
  this.fetchParams = fetchParams2;
77341
77342
  this.pipeline = pipeline2;
@@ -78823,10 +78824,10 @@ var AST3 = recast2.types.builders;
78823
78824
  function unwrappedTsTypeReference(config, filepath, missingScalars, {
78824
78825
  type,
78825
78826
  wrappers
78826
- }, body) {
78827
+ }, body, input) {
78827
78828
  let result;
78828
78829
  if (graphql6.isScalarType(type)) {
78829
- result = scalarPropertyValue(config, filepath, missingScalars, type, body, null);
78830
+ result = scalarPropertyValue(config, filepath, missingScalars, type, body, null, input);
78830
78831
  } else if (graphql6.isEnumType(type)) {
78831
78832
  result = enumReference(config, body, type.name);
78832
78833
  } else {
@@ -78843,14 +78844,15 @@ function unwrappedTsTypeReference(config, filepath, missingScalars, {
78843
78844
  }
78844
78845
  return result;
78845
78846
  }
78846
- function tsTypeReference(config, filepath, missingScalars, definition, body) {
78847
+ function tsTypeReference(config, filepath, missingScalars, definition, body, input) {
78847
78848
  const { type, wrappers } = unwrapType(config, definition.type);
78848
78849
  return unwrappedTsTypeReference(
78849
78850
  config,
78850
78851
  filepath,
78851
78852
  missingScalars,
78852
78853
  { type, wrappers },
78853
- body
78854
+ body,
78855
+ input
78854
78856
  );
78855
78857
  }
78856
78858
  function enumReference(config, body, name) {
@@ -78879,7 +78881,7 @@ function nullableField(inner, input = false) {
78879
78881
  }
78880
78882
  return AST3.tsUnionType(members);
78881
78883
  }
78882
- function scalarPropertyValue(config, filepath, missingScalars, target, body, field) {
78884
+ function scalarPropertyValue(config, filepath, missingScalars, target, body, field, input) {
78883
78885
  if (config.configFile.features?.componentFields && target.name === config.componentScalar) {
78884
78886
  if (!field) {
78885
78887
  return AST3.tsNeverKeyword();
@@ -78938,6 +78940,9 @@ function scalarPropertyValue(config, filepath, missingScalars, target, body, fie
78938
78940
  return AST3.tsBooleanKeyword();
78939
78941
  }
78940
78942
  case "ID": {
78943
+ if (input) {
78944
+ return AST3.tsUnionType([AST3.tsStringKeyword(), AST3.tsNumberKeyword()]);
78945
+ }
78941
78946
  return AST3.tsStringKeyword();
78942
78947
  }
78943
78948
  default: {
@@ -78948,7 +78953,8 @@ function scalarPropertyValue(config, filepath, missingScalars, target, body, fie
78948
78953
  missingScalars,
78949
78954
  target.ofType,
78950
78955
  body,
78951
- field
78956
+ field,
78957
+ input
78952
78958
  );
78953
78959
  }
78954
78960
  if (config.scalars?.[target.name]) {
@@ -29,13 +29,13 @@ export declare function parse(str: string, options?: {
29
29
  *
30
30
  */
31
31
  export declare function serialize(name: string, val: string, options: {
32
- encode: boolean;
33
- maxAge: number;
34
- domain: string;
35
- path: string;
36
- expires: Date;
37
- httpOnly: boolean;
38
- priority: string | number;
39
- secure: boolean;
40
- sameSite: string | boolean;
32
+ encode?: boolean;
33
+ maxAge?: number;
34
+ domain?: string;
35
+ path?: string;
36
+ expires?: Date;
37
+ httpOnly?: boolean;
38
+ priority?: string | number;
39
+ secure?: boolean;
40
+ sameSite?: string | boolean;
41
41
  }): string;
@@ -1,5 +1,5 @@
1
1
  import { createServerAdapter as createAdapter } from '@whatwg-node/server';
2
- import { type GraphQLSchema } from 'graphql';
2
+ import type { GraphQLSchema } from 'graphql';
3
3
  import { createYoga } from 'graphql-yoga';
4
4
  import type { HoudiniClient } from '../client';
5
5
  import type { RouterManifest, RouterPageManifest, YogaServerOptions } from './types';
@@ -17,5 +17,6 @@ export type ServerResponse = {
17
17
  redirect(url: string, status?: number): void;
18
18
  set_header(name: string, value: string): void;
19
19
  };
20
+ export declare const session_cookie_name = "__houdini__";
20
21
  export declare function get_session(req: Headers, secrets: string[]): Promise<App.Session>;
21
22
  export {};