houdini 2.0.0-next.8 → 2.0.0-next.9

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.
@@ -1,3 +1,3 @@
1
1
  import type { serverAdapterFactory as createAdapter } from '../runtime/router/server';
2
2
  export declare const endpoint: string;
3
- export declare let createServerAdapter: (args: Omit<Parameters<typeof createAdapter>[0], 'on_render' | 'manifest' | 'yoga' | 'schema' | 'graphqlEndpoint' | 'componentCache' | 'client'>) => ReturnType<typeof createAdapter>;
3
+ export declare let createServerAdapter: (args: Omit<Parameters<typeof createAdapter>[0], 'on_render' | 'manifest' | 'server' | 'schema' | 'graphqlEndpoint' | 'componentCache' | 'client'>) => ReturnType<typeof createAdapter>;
@@ -82357,6 +82357,10 @@ ${exportStatement("config")}
82357
82357
  // we need to update the list of client plugins that get injected by codegen plugins
82358
82358
  [join2(config.runtimeSource, "client", "plugins", "injectedPlugins.js")]: (content) => injectPlugins({ config, content, importStatement, exportStatement })
82359
82359
  }),
82360
+ recursiveCopy(
82361
+ join2(config.runtimeSource, "server"),
82362
+ join2(config.rootDir, "server")
82363
+ ),
82360
82364
  generatePluginRuntimes({
82361
82365
  config,
82362
82366
  docs
@@ -83634,10 +83638,7 @@ function queryDefinitions(config, body, docs, returnType) {
83634
83638
  const [shapeType, inputType] = ensureImports({
83635
83639
  config,
83636
83640
  body,
83637
- sourceModule: path_exports.relative(
83638
- config.runtimeDirectory,
83639
- config.artifactImportPath(doc.name)
83640
- ),
83641
+ sourceModule: config.artifactImportPath(doc.name),
83641
83642
  import: [`${doc.name}$result`, `${doc.name}$input`]
83642
83643
  });
83643
83644
  return prev.concat(
@@ -83667,10 +83668,7 @@ function fragmentListMap(config, concreteTypes, body, docs, return_type) {
83667
83668
  const [shapeType] = ensureImports({
83668
83669
  config,
83669
83670
  body,
83670
- sourceModule: path_exports.relative(
83671
- config.runtimeDirectory,
83672
- config.artifactImportPath(doc.name)
83673
- ),
83671
+ sourceModule: config.artifactImportPath(doc.name),
83674
83672
  import: [`${definition.name.value}$data`]
83675
83673
  });
83676
83674
  let inputType = AST13.tsNeverKeyword();
@@ -83683,10 +83681,7 @@ function fragmentListMap(config, concreteTypes, body, docs, return_type) {
83683
83681
  ensureImports({
83684
83682
  config,
83685
83683
  body,
83686
- sourceModule: path_exports.relative(
83687
- config.runtimeDirectory,
83688
- config.artifactImportPath(doc.name)
83689
- ),
83684
+ sourceModule: config.artifactImportPath(doc.name),
83690
83685
  import: [`${definition.name.value}$input`]
83691
83686
  })[0]
83692
83687
  )
@@ -89211,12 +89206,12 @@ async function packageJSON(targetPath, frameworkInfo) {
89211
89206
  }
89212
89207
  packageJSON2.devDependencies = {
89213
89208
  ...packageJSON2.devDependencies,
89214
- houdini: "^2.0.0-next.8"
89209
+ houdini: "^2.0.0-next.9"
89215
89210
  };
89216
89211
  if (frameworkInfo.framework === "svelte" || frameworkInfo.framework === "kit") {
89217
89212
  packageJSON2.devDependencies = {
89218
89213
  ...packageJSON2.devDependencies,
89219
- "houdini-svelte": "^3.0.0-next.11"
89214
+ "houdini-svelte": "^3.0.0-next.12"
89220
89215
  };
89221
89216
  } else {
89222
89217
  throw new Error(`Unmanaged framework: "${JSON.stringify(frameworkInfo)}"`);
@@ -82361,6 +82361,10 @@ ${exportStatement("config")}
82361
82361
  // we need to update the list of client plugins that get injected by codegen plugins
82362
82362
  [join2(config.runtimeSource, "client", "plugins", "injectedPlugins.js")]: (content) => injectPlugins({ config, content, importStatement, exportStatement })
82363
82363
  }),
82364
+ recursiveCopy(
82365
+ join2(config.runtimeSource, "server"),
82366
+ join2(config.rootDir, "server")
82367
+ ),
82364
82368
  generatePluginRuntimes({
82365
82369
  config,
82366
82370
  docs
@@ -83638,10 +83642,7 @@ function queryDefinitions(config, body, docs, returnType) {
83638
83642
  const [shapeType, inputType] = ensureImports({
83639
83643
  config,
83640
83644
  body,
83641
- sourceModule: path_exports.relative(
83642
- config.runtimeDirectory,
83643
- config.artifactImportPath(doc.name)
83644
- ),
83645
+ sourceModule: config.artifactImportPath(doc.name),
83645
83646
  import: [`${doc.name}$result`, `${doc.name}$input`]
83646
83647
  });
83647
83648
  return prev.concat(
@@ -83671,10 +83672,7 @@ function fragmentListMap(config, concreteTypes, body, docs, return_type) {
83671
83672
  const [shapeType] = ensureImports({
83672
83673
  config,
83673
83674
  body,
83674
- sourceModule: path_exports.relative(
83675
- config.runtimeDirectory,
83676
- config.artifactImportPath(doc.name)
83677
- ),
83675
+ sourceModule: config.artifactImportPath(doc.name),
83678
83676
  import: [`${definition.name.value}$data`]
83679
83677
  });
83680
83678
  let inputType = AST13.tsNeverKeyword();
@@ -83687,10 +83685,7 @@ function fragmentListMap(config, concreteTypes, body, docs, return_type) {
83687
83685
  ensureImports({
83688
83686
  config,
83689
83687
  body,
83690
- sourceModule: path_exports.relative(
83691
- config.runtimeDirectory,
83692
- config.artifactImportPath(doc.name)
83693
- ),
83688
+ sourceModule: config.artifactImportPath(doc.name),
83694
83689
  import: [`${definition.name.value}$input`]
83695
83690
  })[0]
83696
83691
  )
@@ -89215,12 +89210,12 @@ async function packageJSON(targetPath, frameworkInfo) {
89215
89210
  }
89216
89211
  packageJSON2.devDependencies = {
89217
89212
  ...packageJSON2.devDependencies,
89218
- houdini: "^2.0.0-next.8"
89213
+ houdini: "^2.0.0-next.9"
89219
89214
  };
89220
89215
  if (frameworkInfo.framework === "svelte" || frameworkInfo.framework === "kit") {
89221
89216
  packageJSON2.devDependencies = {
89222
89217
  ...packageJSON2.devDependencies,
89223
- "houdini-svelte": "^3.0.0-next.11"
89218
+ "houdini-svelte": "^3.0.0-next.12"
89224
89219
  };
89225
89220
  } else {
89226
89221
  throw new Error(`Unmanaged framework: "${JSON.stringify(frameworkInfo)}"`);
@@ -68889,6 +68889,10 @@ ${exportStatement("config")}
68889
68889
  // we need to update the list of client plugins that get injected by codegen plugins
68890
68890
  [join(config.runtimeSource, "client", "plugins", "injectedPlugins.js")]: (content) => injectPlugins({ config, content, importStatement, exportStatement })
68891
68891
  }),
68892
+ recursiveCopy(
68893
+ join(config.runtimeSource, "server"),
68894
+ join(config.rootDir, "server")
68895
+ ),
68892
68896
  generatePluginRuntimes({
68893
68897
  config,
68894
68898
  docs
@@ -70166,10 +70170,7 @@ function queryDefinitions(config, body, docs, returnType) {
70166
70170
  const [shapeType, inputType] = ensureImports({
70167
70171
  config,
70168
70172
  body,
70169
- sourceModule: path_exports.relative(
70170
- config.runtimeDirectory,
70171
- config.artifactImportPath(doc.name)
70172
- ),
70173
+ sourceModule: config.artifactImportPath(doc.name),
70173
70174
  import: [`${doc.name}$result`, `${doc.name}$input`]
70174
70175
  });
70175
70176
  return prev.concat(
@@ -70199,10 +70200,7 @@ function fragmentListMap(config, concreteTypes, body, docs, return_type) {
70199
70200
  const [shapeType] = ensureImports({
70200
70201
  config,
70201
70202
  body,
70202
- sourceModule: path_exports.relative(
70203
- config.runtimeDirectory,
70204
- config.artifactImportPath(doc.name)
70205
- ),
70203
+ sourceModule: config.artifactImportPath(doc.name),
70206
70204
  import: [`${definition.name.value}$data`]
70207
70205
  });
70208
70206
  let inputType = AST13.tsNeverKeyword();
@@ -70215,10 +70213,7 @@ function fragmentListMap(config, concreteTypes, body, docs, return_type) {
70215
70213
  ensureImports({
70216
70214
  config,
70217
70215
  body,
70218
- sourceModule: path_exports.relative(
70219
- config.runtimeDirectory,
70220
- config.artifactImportPath(doc.name)
70221
- ),
70216
+ sourceModule: config.artifactImportPath(doc.name),
70222
70217
  import: [`${definition.name.value}$input`]
70223
70218
  })[0]
70224
70219
  )
@@ -68888,6 +68888,10 @@ ${exportStatement("config")}
68888
68888
  // we need to update the list of client plugins that get injected by codegen plugins
68889
68889
  [join(config.runtimeSource, "client", "plugins", "injectedPlugins.js")]: (content) => injectPlugins({ config, content, importStatement, exportStatement })
68890
68890
  }),
68891
+ recursiveCopy(
68892
+ join(config.runtimeSource, "server"),
68893
+ join(config.rootDir, "server")
68894
+ ),
68891
68895
  generatePluginRuntimes({
68892
68896
  config,
68893
68897
  docs
@@ -70165,10 +70169,7 @@ function queryDefinitions(config, body, docs, returnType) {
70165
70169
  const [shapeType, inputType] = ensureImports({
70166
70170
  config,
70167
70171
  body,
70168
- sourceModule: path_exports.relative(
70169
- config.runtimeDirectory,
70170
- config.artifactImportPath(doc.name)
70171
- ),
70172
+ sourceModule: config.artifactImportPath(doc.name),
70172
70173
  import: [`${doc.name}$result`, `${doc.name}$input`]
70173
70174
  });
70174
70175
  return prev.concat(
@@ -70198,10 +70199,7 @@ function fragmentListMap(config, concreteTypes, body, docs, return_type) {
70198
70199
  const [shapeType] = ensureImports({
70199
70200
  config,
70200
70201
  body,
70201
- sourceModule: path_exports.relative(
70202
- config.runtimeDirectory,
70203
- config.artifactImportPath(doc.name)
70204
- ),
70202
+ sourceModule: config.artifactImportPath(doc.name),
70205
70203
  import: [`${definition.name.value}$data`]
70206
70204
  });
70207
70205
  let inputType = AST13.tsNeverKeyword();
@@ -70214,10 +70212,7 @@ function fragmentListMap(config, concreteTypes, body, docs, return_type) {
70214
70212
  ensureImports({
70215
70213
  config,
70216
70214
  body,
70217
- sourceModule: path_exports.relative(
70218
- config.runtimeDirectory,
70219
- config.artifactImportPath(doc.name)
70220
- ),
70215
+ sourceModule: config.artifactImportPath(doc.name),
70221
70216
  import: [`${definition.name.value}$input`]
70222
70217
  })[0]
70223
70218
  )
@@ -73384,7 +73384,7 @@ async function load_manifest(args) {
73384
73384
  layout_queries: {},
73385
73385
  artifacts: [],
73386
73386
  local_schema: false,
73387
- local_yoga: false
73387
+ local_server: false
73388
73388
  },
73389
73389
  queries: [],
73390
73390
  layouts: [],
@@ -73408,8 +73408,8 @@ async function load_manifest(args) {
73408
73408
  if (name === "+schema") {
73409
73409
  manifest.local_schema = true;
73410
73410
  }
73411
- if (name === "+yoga") {
73412
- manifest.local_yoga = true;
73411
+ if (name === "+server") {
73412
+ manifest.local_server = true;
73413
73413
  }
73414
73414
  }
73415
73415
  } catch {
@@ -77808,6 +77808,9 @@ async function get_session(req, secrets) {
77808
77808
  if (!cookie) {
77809
77809
  return {};
77810
77810
  }
77811
+ if (cookie === "{}") {
77812
+ return {};
77813
+ }
77811
77814
  for (const secret of secrets) {
77812
77815
  if (!await verify(cookie, secret)) {
77813
77816
  continue;
@@ -73295,7 +73295,7 @@ async function load_manifest(args) {
73295
73295
  layout_queries: {},
73296
73296
  artifacts: [],
73297
73297
  local_schema: false,
73298
- local_yoga: false
73298
+ local_server: false
73299
73299
  },
73300
73300
  queries: [],
73301
73301
  layouts: [],
@@ -73319,8 +73319,8 @@ async function load_manifest(args) {
73319
73319
  if (name === "+schema") {
73320
73320
  manifest.local_schema = true;
73321
73321
  }
73322
- if (name === "+yoga") {
73323
- manifest.local_yoga = true;
73322
+ if (name === "+server") {
73323
+ manifest.local_server = true;
73324
73324
  }
73325
73325
  }
73326
73326
  } catch {
@@ -77719,6 +77719,9 @@ async function get_session(req, secrets) {
77719
77719
  if (!cookie) {
77720
77720
  return {};
77721
77721
  }
77722
+ if (cookie === "{}") {
77723
+ return {};
77724
+ }
77722
77725
  for (const secret of secrets) {
77723
77726
  if (!await verify(cookie, secret)) {
77724
77727
  continue;
@@ -372,8 +372,8 @@ export type ProjectManifest = {
372
372
  artifacts: string[];
373
373
  /** Whether or not there is a local schema defined */
374
374
  local_schema: boolean;
375
- /** Whether or not there is a custom instance of yoga defined */
376
- local_yoga: boolean;
375
+ /** Whether or not there is a custom server defined */
376
+ local_server: boolean;
377
377
  /** Information about componentFields defined in the project */
378
378
  component_fields: Record<string, {
379
379
  filepath: string;
@@ -6,7 +6,6 @@ import type { ArgType, CacheTypeDef, IDFields, QueryInput, QueryList, QueryValue
6
6
  export declare class Cache<Def extends CacheTypeDef> {
7
7
  _internal_unstable: _Cache;
8
8
  constructor(cache: _Cache);
9
- validateInstabilityWarning(): void;
10
9
  get<T extends TypeNames<Def>>(type: T, data: IDFields<Def, T>): Record<Def, T>;
11
10
  get config(): import("../lib").ConfigFile;
12
11
  list<Name extends ValidLists<Def>>(name: Name, { parentID, allLists }?: {
@@ -1,11 +1,11 @@
1
- import { createServerAdapter as createAdapter } from '@whatwg-node/server';
1
+ import { createServerAdapter } from '@whatwg-node/server';
2
2
  import type { GraphQLSchema } from 'graphql';
3
- import { createYoga } from 'graphql-yoga';
4
3
  import type { HoudiniClient } from '../client';
4
+ import { Server } from '../server';
5
5
  import type { RouterManifest, RouterPageManifest, YogaServerOptions } from './types';
6
- export declare function _serverHandler<ComponentType = unknown>({ schema, yoga, client, production, manifest, graphqlEndpoint, on_render, componentCache, }: {
6
+ export declare function _serverHandler<ComponentType = unknown>({ schema, server, client, production, manifest, graphqlEndpoint, on_render, componentCache, }: {
7
7
  schema?: GraphQLSchema | null;
8
- yoga?: ReturnType<typeof createYoga> | null;
8
+ server?: Server<any, any>;
9
9
  client: HoudiniClient;
10
10
  production: boolean;
11
11
  manifest: RouterManifest<ComponentType> | null;
@@ -20,5 +20,5 @@ export declare function _serverHandler<ComponentType = unknown>({ schema, yoga,
20
20
  componentCache: Record<string, any>;
21
21
  }) => Response | Promise<Response | undefined> | undefined;
22
22
  } & Omit<YogaServerOptions, 'schema'>): (request: Request) => Promise<Response>;
23
- export declare const serverAdapterFactory: (args: Parameters<typeof _serverHandler>[0]) => ReturnType<typeof createAdapter>;
23
+ export declare const serverAdapterFactory: (args: Parameters<typeof _serverHandler>[0]) => ReturnType<typeof createServerAdapter>;
24
24
  export type ServerAdapterFactory = typeof serverAdapterFactory;
@@ -0,0 +1,17 @@
1
+ import type { ServerAdapterRequestHandler } from '@whatwg-node/server';
2
+ import { YogaServer } from 'graphql-yoga';
3
+ import type { YogaSchemaDefinition } from 'graphql-yoga/typings/plugins/use-schema';
4
+ type YogaParams = Required<ConstructorParameters<typeof YogaServer>>[0];
5
+ type ConstructorParams = Omit<YogaParams, 'schema' | 'graphqlEndpoint'>;
6
+ export declare class Server<ServerContext extends Record<string, any>, UserContext extends Record<string, any>> {
7
+ opts: ConstructorParams | null;
8
+ _yoga: YogaServer<any, any> | null;
9
+ constructor(opts?: ConstructorParams);
10
+ init({ endpoint, schema, getSession, }: {
11
+ schema: YogaSchemaDefinition<any>;
12
+ endpoint: string;
13
+ getSession: (request: Request) => Promise<UserContext>;
14
+ }): import("@whatwg-node/server").ServerAdapter<ServerContext, Server<ServerContext, UserContext>>;
15
+ handle: ServerAdapterRequestHandler<ServerContext>;
16
+ }
17
+ export {};
@@ -372,8 +372,8 @@ export type ProjectManifest = {
372
372
  artifacts: string[];
373
373
  /** Whether or not there is a local schema defined */
374
374
  local_schema: boolean;
375
- /** Whether or not there is a custom instance of yoga defined */
376
- local_yoga: boolean;
375
+ /** Whether or not there is a custom server defined */
376
+ local_server: boolean;
377
377
  /** Information about componentFields defined in the project */
378
378
  component_fields: Record<string, {
379
379
  filepath: string;
@@ -6,7 +6,6 @@ import type { ArgType, CacheTypeDef, IDFields, QueryInput, QueryList, QueryValue
6
6
  export declare class Cache<Def extends CacheTypeDef> {
7
7
  _internal_unstable: _Cache;
8
8
  constructor(cache: _Cache);
9
- validateInstabilityWarning(): void;
10
9
  get<T extends TypeNames<Def>>(type: T, data: IDFields<Def, T>): Record<Def, T>;
11
10
  get config(): import("../lib").ConfigFile;
12
11
  list<Name extends ValidLists<Def>>(name: Name, { parentID, allLists }?: {
@@ -29,19 +29,8 @@ class Cache {
29
29
  constructor(cache) {
30
30
  this._internal_unstable = cache;
31
31
  }
32
- // if the user is using the imperative API, we want the ability to break the API
33
- // with any minor version. In order to do this, we require them to accept this contract
34
- // through their config file
35
- validateInstabilityWarning() {
36
- if (!this.config.acceptImperativeInstability && !this.config.features?.imperativeCache) {
37
- console.warn(`\u26A0\uFE0F The imperative cache API is considered unstable and will change in any minor version release
38
- Please acknowledge this by enabling the imperative cache feature flage in your config file.
39
- For more information: https://houdinigraphql.com/api/cache`);
40
- }
41
- }
42
32
  // return the record proxy for the given type/id combo
43
33
  get(type, data) {
44
- this.validateInstabilityWarning();
45
34
  let recordID = this._internal_unstable._internal_unstable.id(type, data);
46
35
  if (!recordID) {
47
36
  throw new Error("todo");
@@ -57,7 +46,6 @@ For more information: https://houdinigraphql.com/api/cache`);
57
46
  return (0, import_lib.getCurrentConfig)();
58
47
  }
59
48
  list(name, { parentID, allLists } = {}) {
60
- this.validateInstabilityWarning();
61
49
  return new import_list.ListCollection({
62
50
  cache: this,
63
51
  name,
@@ -69,7 +57,6 @@ For more information: https://houdinigraphql.com/api/cache`);
69
57
  query,
70
58
  variables
71
59
  }) {
72
- this.validateInstabilityWarning();
73
60
  return this._internal_unstable.read({
74
61
  selection: query.artifact.selection,
75
62
  variables
@@ -80,7 +67,6 @@ For more information: https://houdinigraphql.com/api/cache`);
80
67
  variables,
81
68
  data
82
69
  }) {
83
- this.validateInstabilityWarning();
84
70
  this._internal_unstable.write({
85
71
  selection: query.artifact.selection,
86
72
  // @ts-expect-error
@@ -1,11 +1,11 @@
1
- import { createServerAdapter as createAdapter } from '@whatwg-node/server';
1
+ import { createServerAdapter } from '@whatwg-node/server';
2
2
  import type { GraphQLSchema } from 'graphql';
3
- import { createYoga } from 'graphql-yoga';
4
3
  import type { HoudiniClient } from '../client';
4
+ import { Server } from '../server';
5
5
  import type { RouterManifest, RouterPageManifest, YogaServerOptions } from './types';
6
- export declare function _serverHandler<ComponentType = unknown>({ schema, yoga, client, production, manifest, graphqlEndpoint, on_render, componentCache, }: {
6
+ export declare function _serverHandler<ComponentType = unknown>({ schema, server, client, production, manifest, graphqlEndpoint, on_render, componentCache, }: {
7
7
  schema?: GraphQLSchema | null;
8
- yoga?: ReturnType<typeof createYoga> | null;
8
+ server?: Server<any, any>;
9
9
  client: HoudiniClient;
10
10
  production: boolean;
11
11
  manifest: RouterManifest<ComponentType> | null;
@@ -20,5 +20,5 @@ export declare function _serverHandler<ComponentType = unknown>({ schema, yoga,
20
20
  componentCache: Record<string, any>;
21
21
  }) => Response | Promise<Response | undefined> | undefined;
22
22
  } & Omit<YogaServerOptions, 'schema'>): (request: Request) => Promise<Response>;
23
- export declare const serverAdapterFactory: (args: Parameters<typeof _serverHandler>[0]) => ReturnType<typeof createAdapter>;
23
+ export declare const serverAdapterFactory: (args: Parameters<typeof _serverHandler>[0]) => ReturnType<typeof createServerAdapter>;
24
24
  export type ServerAdapterFactory = typeof serverAdapterFactory;
@@ -23,8 +23,8 @@ __export(server_exports, {
23
23
  });
24
24
  module.exports = __toCommonJS(server_exports);
25
25
  var import_server = require("@whatwg-node/server");
26
- var import_graphql_yoga = require("graphql-yoga");
27
26
  var import_config = require("../lib/config");
27
+ var import_server2 = require("../server");
28
28
  var import_cookies = require("./cookies");
29
29
  var import_match = require("./match");
30
30
  var import_session = require("./session");
@@ -32,7 +32,7 @@ const config_file = (0, import_config.getCurrentConfig)();
32
32
  const session_keys = (0, import_config.localApiSessionKeys)(config_file);
33
33
  function _serverHandler({
34
34
  schema,
35
- yoga,
35
+ server,
36
36
  client,
37
37
  production,
38
38
  manifest,
@@ -40,18 +40,23 @@ function _serverHandler({
40
40
  on_render,
41
41
  componentCache
42
42
  }) {
43
- if (schema && !yoga) {
44
- yoga = (0, import_graphql_yoga.createYoga)({
43
+ if (schema && !server) {
44
+ server = new import_server2.Server({
45
+ landingPage: !production
46
+ });
47
+ }
48
+ let requestHandler = null;
49
+ if (server && schema) {
50
+ requestHandler = server.init({
45
51
  schema,
46
- landingPage: !production,
47
- graphqlEndpoint,
48
- context: async (request) => await (0, import_session.get_session)(request.headers, session_keys)
52
+ endpoint: graphqlEndpoint,
53
+ getSession: (request) => (0, import_session.get_session)(request.headers, session_keys)
49
54
  });
50
55
  }
51
56
  client.componentCache = componentCache;
52
- if (schema) {
57
+ if (requestHandler) {
53
58
  client.registerProxy(graphqlEndpoint, async ({ query, variables, session }) => {
54
- const response = await yoga(
59
+ const response = await requestHandler(
55
60
  new Request(`http://localhost/${graphqlEndpoint}`, {
56
61
  method: "POST",
57
62
  headers: {
@@ -77,8 +82,8 @@ function _serverHandler({
77
82
  );
78
83
  }
79
84
  const url = new URL(request.url).pathname;
80
- if (yoga && url === (0, import_config.localApiEndpoint)(config_file)) {
81
- return yoga(request);
85
+ if (requestHandler && url === graphqlEndpoint) {
86
+ return requestHandler(request);
82
87
  }
83
88
  const authResponse = await (0, import_session.handle_request)({
84
89
  request,
@@ -77,6 +77,9 @@ async function get_session(req, secrets) {
77
77
  if (!cookie) {
78
78
  return {};
79
79
  }
80
+ if (cookie === "{}") {
81
+ return {};
82
+ }
80
83
  for (const secret of secrets) {
81
84
  if (!await (0, import_jwt.verify)(cookie, secret)) {
82
85
  continue;
@@ -0,0 +1,17 @@
1
+ import type { ServerAdapterRequestHandler } from '@whatwg-node/server';
2
+ import { YogaServer } from 'graphql-yoga';
3
+ import type { YogaSchemaDefinition } from 'graphql-yoga/typings/plugins/use-schema';
4
+ type YogaParams = Required<ConstructorParameters<typeof YogaServer>>[0];
5
+ type ConstructorParams = Omit<YogaParams, 'schema' | 'graphqlEndpoint'>;
6
+ export declare class Server<ServerContext extends Record<string, any>, UserContext extends Record<string, any>> {
7
+ opts: ConstructorParams | null;
8
+ _yoga: YogaServer<any, any> | null;
9
+ constructor(opts?: ConstructorParams);
10
+ init({ endpoint, schema, getSession, }: {
11
+ schema: YogaSchemaDefinition<any>;
12
+ endpoint: string;
13
+ getSession: (request: Request) => Promise<UserContext>;
14
+ }): import("@whatwg-node/server").ServerAdapter<ServerContext, Server<ServerContext, UserContext>>;
15
+ handle: ServerAdapterRequestHandler<ServerContext>;
16
+ }
17
+ export {};
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var server_exports = {};
20
+ __export(server_exports, {
21
+ Server: () => Server
22
+ });
23
+ module.exports = __toCommonJS(server_exports);
24
+ var import_server = require("@whatwg-node/server");
25
+ var import_graphql_yoga = require("graphql-yoga");
26
+ class Server {
27
+ opts;
28
+ _yoga = null;
29
+ constructor(opts) {
30
+ this.opts = opts ?? null;
31
+ }
32
+ init({
33
+ endpoint,
34
+ schema,
35
+ getSession
36
+ }) {
37
+ this._yoga = new import_graphql_yoga.YogaServer({
38
+ ...this.opts,
39
+ schema,
40
+ graphqlEndpoint: endpoint,
41
+ context: async (ctx) => {
42
+ const userContext = !this.opts ? {} : typeof this.opts.context === "function" ? await this.opts.context(ctx) : this.opts.context || {};
43
+ const sessionContext = await getSession(ctx.request) || {};
44
+ return {
45
+ ...userContext,
46
+ session: sessionContext
47
+ };
48
+ }
49
+ });
50
+ return (0, import_server.createServerAdapter)(this, {
51
+ fetchAPI: this._yoga.fetchAPI,
52
+ plugins: this._yoga["plugins"]
53
+ });
54
+ }
55
+ handle = (request, serverContext) => {
56
+ return this._yoga.handle(request, serverContext);
57
+ };
58
+ }
59
+ // Annotate the CommonJS export names for ESM import in node:
60
+ 0 && (module.exports = {
61
+ Server
62
+ });
@@ -372,8 +372,8 @@ export type ProjectManifest = {
372
372
  artifacts: string[];
373
373
  /** Whether or not there is a local schema defined */
374
374
  local_schema: boolean;
375
- /** Whether or not there is a custom instance of yoga defined */
376
- local_yoga: boolean;
375
+ /** Whether or not there is a custom server defined */
376
+ local_server: boolean;
377
377
  /** Information about componentFields defined in the project */
378
378
  component_fields: Record<string, {
379
379
  filepath: string;
@@ -6,7 +6,6 @@ import type { ArgType, CacheTypeDef, IDFields, QueryInput, QueryList, QueryValue
6
6
  export declare class Cache<Def extends CacheTypeDef> {
7
7
  _internal_unstable: _Cache;
8
8
  constructor(cache: _Cache);
9
- validateInstabilityWarning(): void;
10
9
  get<T extends TypeNames<Def>>(type: T, data: IDFields<Def, T>): Record<Def, T>;
11
10
  get config(): import("../lib").ConfigFile;
12
11
  list<Name extends ValidLists<Def>>(name: Name, { parentID, allLists }?: {
@@ -6,19 +6,8 @@ class Cache {
6
6
  constructor(cache) {
7
7
  this._internal_unstable = cache;
8
8
  }
9
- // if the user is using the imperative API, we want the ability to break the API
10
- // with any minor version. In order to do this, we require them to accept this contract
11
- // through their config file
12
- validateInstabilityWarning() {
13
- if (!this.config.acceptImperativeInstability && !this.config.features?.imperativeCache) {
14
- console.warn(`\u26A0\uFE0F The imperative cache API is considered unstable and will change in any minor version release
15
- Please acknowledge this by enabling the imperative cache feature flage in your config file.
16
- For more information: https://houdinigraphql.com/api/cache`);
17
- }
18
- }
19
9
  // return the record proxy for the given type/id combo
20
10
  get(type, data) {
21
- this.validateInstabilityWarning();
22
11
  let recordID = this._internal_unstable._internal_unstable.id(type, data);
23
12
  if (!recordID) {
24
13
  throw new Error("todo");
@@ -34,7 +23,6 @@ For more information: https://houdinigraphql.com/api/cache`);
34
23
  return getCurrentConfig();
35
24
  }
36
25
  list(name, { parentID, allLists } = {}) {
37
- this.validateInstabilityWarning();
38
26
  return new ListCollection({
39
27
  cache: this,
40
28
  name,
@@ -46,7 +34,6 @@ For more information: https://houdinigraphql.com/api/cache`);
46
34
  query,
47
35
  variables
48
36
  }) {
49
- this.validateInstabilityWarning();
50
37
  return this._internal_unstable.read({
51
38
  selection: query.artifact.selection,
52
39
  variables
@@ -57,7 +44,6 @@ For more information: https://houdinigraphql.com/api/cache`);
57
44
  variables,
58
45
  data
59
46
  }) {
60
- this.validateInstabilityWarning();
61
47
  this._internal_unstable.write({
62
48
  selection: query.artifact.selection,
63
49
  // @ts-expect-error
@@ -1,11 +1,11 @@
1
- import { createServerAdapter as createAdapter } from '@whatwg-node/server';
1
+ import { createServerAdapter } from '@whatwg-node/server';
2
2
  import type { GraphQLSchema } from 'graphql';
3
- import { createYoga } from 'graphql-yoga';
4
3
  import type { HoudiniClient } from '../client';
4
+ import { Server } from '../server';
5
5
  import type { RouterManifest, RouterPageManifest, YogaServerOptions } from './types';
6
- export declare function _serverHandler<ComponentType = unknown>({ schema, yoga, client, production, manifest, graphqlEndpoint, on_render, componentCache, }: {
6
+ export declare function _serverHandler<ComponentType = unknown>({ schema, server, client, production, manifest, graphqlEndpoint, on_render, componentCache, }: {
7
7
  schema?: GraphQLSchema | null;
8
- yoga?: ReturnType<typeof createYoga> | null;
8
+ server?: Server<any, any>;
9
9
  client: HoudiniClient;
10
10
  production: boolean;
11
11
  manifest: RouterManifest<ComponentType> | null;
@@ -20,5 +20,5 @@ export declare function _serverHandler<ComponentType = unknown>({ schema, yoga,
20
20
  componentCache: Record<string, any>;
21
21
  }) => Response | Promise<Response | undefined> | undefined;
22
22
  } & Omit<YogaServerOptions, 'schema'>): (request: Request) => Promise<Response>;
23
- export declare const serverAdapterFactory: (args: Parameters<typeof _serverHandler>[0]) => ReturnType<typeof createAdapter>;
23
+ export declare const serverAdapterFactory: (args: Parameters<typeof _serverHandler>[0]) => ReturnType<typeof createServerAdapter>;
24
24
  export type ServerAdapterFactory = typeof serverAdapterFactory;
@@ -1,6 +1,6 @@
1
- import { createServerAdapter as createAdapter } from "@whatwg-node/server";
2
- import { createYoga } from "graphql-yoga";
3
- import { localApiSessionKeys, localApiEndpoint, getCurrentConfig } from "../lib/config";
1
+ import { createServerAdapter } from "@whatwg-node/server";
2
+ import { localApiSessionKeys, getCurrentConfig } from "../lib/config";
3
+ import { Server } from "../server";
4
4
  import { serialize as encodeCookie } from "./cookies";
5
5
  import { find_match } from "./match";
6
6
  import { get_session, handle_request, session_cookie_name } from "./session";
@@ -8,7 +8,7 @@ const config_file = getCurrentConfig();
8
8
  const session_keys = localApiSessionKeys(config_file);
9
9
  function _serverHandler({
10
10
  schema,
11
- yoga,
11
+ server,
12
12
  client,
13
13
  production,
14
14
  manifest,
@@ -16,18 +16,23 @@ function _serverHandler({
16
16
  on_render,
17
17
  componentCache
18
18
  }) {
19
- if (schema && !yoga) {
20
- yoga = createYoga({
19
+ if (schema && !server) {
20
+ server = new Server({
21
+ landingPage: !production
22
+ });
23
+ }
24
+ let requestHandler = null;
25
+ if (server && schema) {
26
+ requestHandler = server.init({
21
27
  schema,
22
- landingPage: !production,
23
- graphqlEndpoint,
24
- context: async (request) => await get_session(request.headers, session_keys)
28
+ endpoint: graphqlEndpoint,
29
+ getSession: (request) => get_session(request.headers, session_keys)
25
30
  });
26
31
  }
27
32
  client.componentCache = componentCache;
28
- if (schema) {
33
+ if (requestHandler) {
29
34
  client.registerProxy(graphqlEndpoint, async ({ query, variables, session }) => {
30
- const response = await yoga(
35
+ const response = await requestHandler(
31
36
  new Request(`http://localhost/${graphqlEndpoint}`, {
32
37
  method: "POST",
33
38
  headers: {
@@ -53,8 +58,8 @@ function _serverHandler({
53
58
  );
54
59
  }
55
60
  const url = new URL(request.url).pathname;
56
- if (yoga && url === localApiEndpoint(config_file)) {
57
- return yoga(request);
61
+ if (requestHandler && url === graphqlEndpoint) {
62
+ return requestHandler(request);
58
63
  }
59
64
  const authResponse = await handle_request({
60
65
  request,
@@ -79,7 +84,7 @@ function _serverHandler({
79
84
  };
80
85
  }
81
86
  const serverAdapterFactory = (args) => {
82
- return createAdapter(_serverHandler(args));
87
+ return createServerAdapter(_serverHandler(args));
83
88
  };
84
89
  export {
85
90
  _serverHandler,
@@ -52,6 +52,9 @@ async function get_session(req, secrets) {
52
52
  if (!cookie) {
53
53
  return {};
54
54
  }
55
+ if (cookie === "{}") {
56
+ return {};
57
+ }
55
58
  for (const secret of secrets) {
56
59
  if (!await verify(cookie, secret)) {
57
60
  continue;
@@ -0,0 +1,17 @@
1
+ import type { ServerAdapterRequestHandler } from '@whatwg-node/server';
2
+ import { YogaServer } from 'graphql-yoga';
3
+ import type { YogaSchemaDefinition } from 'graphql-yoga/typings/plugins/use-schema';
4
+ type YogaParams = Required<ConstructorParameters<typeof YogaServer>>[0];
5
+ type ConstructorParams = Omit<YogaParams, 'schema' | 'graphqlEndpoint'>;
6
+ export declare class Server<ServerContext extends Record<string, any>, UserContext extends Record<string, any>> {
7
+ opts: ConstructorParams | null;
8
+ _yoga: YogaServer<any, any> | null;
9
+ constructor(opts?: ConstructorParams);
10
+ init({ endpoint, schema, getSession, }: {
11
+ schema: YogaSchemaDefinition<any>;
12
+ endpoint: string;
13
+ getSession: (request: Request) => Promise<UserContext>;
14
+ }): import("@whatwg-node/server").ServerAdapter<ServerContext, Server<ServerContext, UserContext>>;
15
+ handle: ServerAdapterRequestHandler<ServerContext>;
16
+ }
17
+ export {};
@@ -0,0 +1,38 @@
1
+ import { createServerAdapter } from "@whatwg-node/server";
2
+ import { YogaServer } from "graphql-yoga";
3
+ class Server {
4
+ opts;
5
+ _yoga = null;
6
+ constructor(opts) {
7
+ this.opts = opts ?? null;
8
+ }
9
+ init({
10
+ endpoint,
11
+ schema,
12
+ getSession
13
+ }) {
14
+ this._yoga = new YogaServer({
15
+ ...this.opts,
16
+ schema,
17
+ graphqlEndpoint: endpoint,
18
+ context: async (ctx) => {
19
+ const userContext = !this.opts ? {} : typeof this.opts.context === "function" ? await this.opts.context(ctx) : this.opts.context || {};
20
+ const sessionContext = await getSession(ctx.request) || {};
21
+ return {
22
+ ...userContext,
23
+ session: sessionContext
24
+ };
25
+ }
26
+ });
27
+ return createServerAdapter(this, {
28
+ fetchAPI: this._yoga.fetchAPI,
29
+ plugins: this._yoga["plugins"]
30
+ });
31
+ }
32
+ handle = (request, serverContext) => {
33
+ return this._yoga.handle(request, serverContext);
34
+ };
35
+ }
36
+ export {
37
+ Server
38
+ };
@@ -69233,6 +69233,10 @@ ${exportStatement("config")}
69233
69233
  // we need to update the list of client plugins that get injected by codegen plugins
69234
69234
  [join(config.runtimeSource, "client", "plugins", "injectedPlugins.js")]: (content) => injectPlugins({ config, content, importStatement, exportStatement })
69235
69235
  }),
69236
+ recursiveCopy(
69237
+ join(config.runtimeSource, "server"),
69238
+ join(config.rootDir, "server")
69239
+ ),
69236
69240
  generatePluginRuntimes({
69237
69241
  config,
69238
69242
  docs
@@ -70510,10 +70514,7 @@ function queryDefinitions(config, body, docs, returnType) {
70510
70514
  const [shapeType, inputType] = ensureImports({
70511
70515
  config,
70512
70516
  body,
70513
- sourceModule: path_exports.relative(
70514
- config.runtimeDirectory,
70515
- config.artifactImportPath(doc.name)
70516
- ),
70517
+ sourceModule: config.artifactImportPath(doc.name),
70517
70518
  import: [`${doc.name}$result`, `${doc.name}$input`]
70518
70519
  });
70519
70520
  return prev.concat(
@@ -70543,10 +70544,7 @@ function fragmentListMap(config, concreteTypes, body, docs, return_type) {
70543
70544
  const [shapeType] = ensureImports({
70544
70545
  config,
70545
70546
  body,
70546
- sourceModule: path_exports.relative(
70547
- config.runtimeDirectory,
70548
- config.artifactImportPath(doc.name)
70549
- ),
70547
+ sourceModule: config.artifactImportPath(doc.name),
70550
70548
  import: [`${definition.name.value}$data`]
70551
70549
  });
70552
70550
  let inputType = AST13.tsNeverKeyword();
@@ -70559,10 +70557,7 @@ function fragmentListMap(config, concreteTypes, body, docs, return_type) {
70559
70557
  ensureImports({
70560
70558
  config,
70561
70559
  body,
70562
- sourceModule: path_exports.relative(
70563
- config.runtimeDirectory,
70564
- config.artifactImportPath(doc.name)
70565
- ),
70560
+ sourceModule: config.artifactImportPath(doc.name),
70566
70561
  import: [`${definition.name.value}$input`]
70567
70562
  })[0]
70568
70563
  )
@@ -69229,6 +69229,10 @@ ${exportStatement("config")}
69229
69229
  // we need to update the list of client plugins that get injected by codegen plugins
69230
69230
  [join(config.runtimeSource, "client", "plugins", "injectedPlugins.js")]: (content) => injectPlugins({ config, content, importStatement, exportStatement })
69231
69231
  }),
69232
+ recursiveCopy(
69233
+ join(config.runtimeSource, "server"),
69234
+ join(config.rootDir, "server")
69235
+ ),
69232
69236
  generatePluginRuntimes({
69233
69237
  config,
69234
69238
  docs
@@ -70506,10 +70510,7 @@ function queryDefinitions(config, body, docs, returnType) {
70506
70510
  const [shapeType, inputType] = ensureImports({
70507
70511
  config,
70508
70512
  body,
70509
- sourceModule: path_exports.relative(
70510
- config.runtimeDirectory,
70511
- config.artifactImportPath(doc.name)
70512
- ),
70513
+ sourceModule: config.artifactImportPath(doc.name),
70513
70514
  import: [`${doc.name}$result`, `${doc.name}$input`]
70514
70515
  });
70515
70516
  return prev.concat(
@@ -70539,10 +70540,7 @@ function fragmentListMap(config, concreteTypes, body, docs, return_type) {
70539
70540
  const [shapeType] = ensureImports({
70540
70541
  config,
70541
70542
  body,
70542
- sourceModule: path_exports.relative(
70543
- config.runtimeDirectory,
70544
- config.artifactImportPath(doc.name)
70545
- ),
70543
+ sourceModule: config.artifactImportPath(doc.name),
70546
70544
  import: [`${definition.name.value}$data`]
70547
70545
  });
70548
70546
  let inputType = AST13.tsNeverKeyword();
@@ -70555,10 +70553,7 @@ function fragmentListMap(config, concreteTypes, body, docs, return_type) {
70555
70553
  ensureImports({
70556
70554
  config,
70557
70555
  body,
70558
- sourceModule: path_exports.relative(
70559
- config.runtimeDirectory,
70560
- config.artifactImportPath(doc.name)
70561
- ),
70556
+ sourceModule: config.artifactImportPath(doc.name),
70562
70557
  import: [`${definition.name.value}$input`]
70563
70558
  })[0]
70564
70559
  )
@@ -73003,7 +73003,7 @@ async function load_manifest(args) {
73003
73003
  layout_queries: {},
73004
73004
  artifacts: [],
73005
73005
  local_schema: false,
73006
- local_yoga: false
73006
+ local_server: false
73007
73007
  },
73008
73008
  queries: [],
73009
73009
  layouts: [],
@@ -73027,8 +73027,8 @@ async function load_manifest(args) {
73027
73027
  if (name === "+schema") {
73028
73028
  manifest.local_schema = true;
73029
73029
  }
73030
- if (name === "+yoga") {
73031
- manifest.local_yoga = true;
73030
+ if (name === "+server") {
73031
+ manifest.local_server = true;
73032
73032
  }
73033
73033
  }
73034
73034
  } catch {
@@ -80003,6 +80003,10 @@ ${exportStatement("config")}
80003
80003
  // we need to update the list of client plugins that get injected by codegen plugins
80004
80004
  [join2(config2.runtimeSource, "client", "plugins", "injectedPlugins.js")]: (content) => injectPlugins({ config: config2, content, importStatement, exportStatement })
80005
80005
  }),
80006
+ recursiveCopy(
80007
+ join2(config2.runtimeSource, "server"),
80008
+ join2(config2.rootDir, "server")
80009
+ ),
80006
80010
  generatePluginRuntimes({
80007
80011
  config: config2,
80008
80012
  docs
@@ -81280,10 +81284,7 @@ function queryDefinitions(config2, body, docs, returnType) {
81280
81284
  const [shapeType, inputType] = ensureImports({
81281
81285
  config: config2,
81282
81286
  body,
81283
- sourceModule: path_exports.relative(
81284
- config2.runtimeDirectory,
81285
- config2.artifactImportPath(doc.name)
81286
- ),
81287
+ sourceModule: config2.artifactImportPath(doc.name),
81287
81288
  import: [`${doc.name}$result`, `${doc.name}$input`]
81288
81289
  });
81289
81290
  return prev.concat(
@@ -81313,10 +81314,7 @@ function fragmentListMap(config2, concreteTypes, body, docs, return_type) {
81313
81314
  const [shapeType] = ensureImports({
81314
81315
  config: config2,
81315
81316
  body,
81316
- sourceModule: path_exports.relative(
81317
- config2.runtimeDirectory,
81318
- config2.artifactImportPath(doc.name)
81319
- ),
81317
+ sourceModule: config2.artifactImportPath(doc.name),
81320
81318
  import: [`${definition.name.value}$data`]
81321
81319
  });
81322
81320
  let inputType = AST13.tsNeverKeyword();
@@ -81329,10 +81327,7 @@ function fragmentListMap(config2, concreteTypes, body, docs, return_type) {
81329
81327
  ensureImports({
81330
81328
  config: config2,
81331
81329
  body,
81332
- sourceModule: path_exports.relative(
81333
- config2.runtimeDirectory,
81334
- config2.artifactImportPath(doc.name)
81335
- ),
81330
+ sourceModule: config2.artifactImportPath(doc.name),
81336
81331
  import: [`${definition.name.value}$input`]
81337
81332
  })[0]
81338
81333
  )
@@ -85767,7 +85762,13 @@ function Plugin(opts = {}) {
85767
85762
  // houdini will always act as a "meta framework" and process the user's code before it
85768
85763
  // is processed by the user's library-specific plugins.
85769
85764
  enforce: "pre",
85770
- async hotUpdate({ file, server, modules, timestamp, read }) {
85765
+ async hotUpdate({
85766
+ file,
85767
+ server,
85768
+ modules,
85769
+ timestamp,
85770
+ read
85771
+ }) {
85771
85772
  const config2 = await getConfig(opts);
85772
85773
  const shouldReact = await shouldReactToFileChange(file, config2);
85773
85774
  const runtimeDir = path_exports.join(config2.projectRoot, config2.runtimeDir ?? ".houdini");
@@ -72996,7 +72996,7 @@ async function load_manifest(args) {
72996
72996
  layout_queries: {},
72997
72997
  artifacts: [],
72998
72998
  local_schema: false,
72999
- local_yoga: false
72999
+ local_server: false
73000
73000
  },
73001
73001
  queries: [],
73002
73002
  layouts: [],
@@ -73020,8 +73020,8 @@ async function load_manifest(args) {
73020
73020
  if (name === "+schema") {
73021
73021
  manifest.local_schema = true;
73022
73022
  }
73023
- if (name === "+yoga") {
73024
- manifest.local_yoga = true;
73023
+ if (name === "+server") {
73024
+ manifest.local_server = true;
73025
73025
  }
73026
73026
  }
73027
73027
  } catch {
@@ -79995,6 +79995,10 @@ ${exportStatement("config")}
79995
79995
  // we need to update the list of client plugins that get injected by codegen plugins
79996
79996
  [join2(config2.runtimeSource, "client", "plugins", "injectedPlugins.js")]: (content) => injectPlugins({ config: config2, content, importStatement, exportStatement })
79997
79997
  }),
79998
+ recursiveCopy(
79999
+ join2(config2.runtimeSource, "server"),
80000
+ join2(config2.rootDir, "server")
80001
+ ),
79998
80002
  generatePluginRuntimes({
79999
80003
  config: config2,
80000
80004
  docs
@@ -81272,10 +81276,7 @@ function queryDefinitions(config2, body, docs, returnType) {
81272
81276
  const [shapeType, inputType] = ensureImports({
81273
81277
  config: config2,
81274
81278
  body,
81275
- sourceModule: path_exports.relative(
81276
- config2.runtimeDirectory,
81277
- config2.artifactImportPath(doc.name)
81278
- ),
81279
+ sourceModule: config2.artifactImportPath(doc.name),
81279
81280
  import: [`${doc.name}$result`, `${doc.name}$input`]
81280
81281
  });
81281
81282
  return prev.concat(
@@ -81305,10 +81306,7 @@ function fragmentListMap(config2, concreteTypes, body, docs, return_type) {
81305
81306
  const [shapeType] = ensureImports({
81306
81307
  config: config2,
81307
81308
  body,
81308
- sourceModule: path_exports.relative(
81309
- config2.runtimeDirectory,
81310
- config2.artifactImportPath(doc.name)
81311
- ),
81309
+ sourceModule: config2.artifactImportPath(doc.name),
81312
81310
  import: [`${definition.name.value}$data`]
81313
81311
  });
81314
81312
  let inputType = AST13.tsNeverKeyword();
@@ -81321,10 +81319,7 @@ function fragmentListMap(config2, concreteTypes, body, docs, return_type) {
81321
81319
  ensureImports({
81322
81320
  config: config2,
81323
81321
  body,
81324
- sourceModule: path_exports.relative(
81325
- config2.runtimeDirectory,
81326
- config2.artifactImportPath(doc.name)
81327
- ),
81322
+ sourceModule: config2.artifactImportPath(doc.name),
81328
81323
  import: [`${definition.name.value}$input`]
81329
81324
  })[0]
81330
81325
  )
@@ -85759,7 +85754,13 @@ function Plugin(opts = {}) {
85759
85754
  // houdini will always act as a "meta framework" and process the user's code before it
85760
85755
  // is processed by the user's library-specific plugins.
85761
85756
  enforce: "pre",
85762
- async hotUpdate({ file, server, modules, timestamp, read }) {
85757
+ async hotUpdate({
85758
+ file,
85759
+ server,
85760
+ modules,
85761
+ timestamp,
85762
+ read
85763
+ }) {
85763
85764
  const config2 = await getConfig(opts);
85764
85765
  const shouldReact = await shouldReactToFileChange(file, config2);
85765
85766
  const runtimeDir = path_exports.join(config2.projectRoot, config2.runtimeDir ?? ".houdini");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "houdini",
3
- "version": "2.0.0-next.8",
3
+ "version": "2.0.0-next.9",
4
4
  "description": "The disappearing GraphQL clients",
5
5
  "keywords": [
6
6
  "typescript",
@@ -38,7 +38,7 @@
38
38
  "@types/fs-extra": "^9.0.13",
39
39
  "@types/micromatch": "^4.0.2",
40
40
  "@ungap/structured-clone": "^1.0.2",
41
- "@whatwg-node/server": "^0.9.14",
41
+ "@whatwg-node/server": "^0.10.5",
42
42
  "ast-types": "^0.16.1",
43
43
  "commander": "^9.4.0",
44
44
  "deepmerge": "^4.2.2",