nitro-graphql 2.0.0-beta.63 → 2.0.0-beta.65

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.
@@ -29,9 +29,7 @@ function createScanContext(ctx) {
29
29
  error: (msg, ...args) => logger.error(msg, ...args),
30
30
  success: (msg, ...args) => logger.success(msg, ...args),
31
31
  debug: (msg, ...args) => logger.debug(msg, ...args)
32
- },
33
- layerServerDirs: [],
34
- layerAppDirs: []
32
+ }
35
33
  };
36
34
  }
37
35
  /**
@@ -22,9 +22,7 @@ async function validate(ctx) {
22
22
  error: (msg, ...args) => logger.error(msg, ...args),
23
23
  success: (msg, ...args) => logger.success(msg, ...args),
24
24
  debug: (msg, ...args) => logger.debug(msg, ...args)
25
- },
26
- layerServerDirs: [],
27
- layerAppDirs: []
25
+ }
28
26
  });
29
27
  if (schemaResult.errors.length > 0) {
30
28
  for (const error of schemaResult.errors) logger.error(error);
@@ -25,10 +25,6 @@ interface CreateCoreConfigOptions {
25
25
  logger?: CoreLogger;
26
26
  /** Patterns to ignore */
27
27
  ignorePatterns?: string[];
28
- /** Layer server directories */
29
- layerServerDirs?: string[];
30
- /** Layer app directories */
31
- layerAppDirs?: string[];
32
28
  }
33
29
  /**
34
30
  * Create a CoreConfig with sensible defaults
@@ -7,7 +7,7 @@ import { relative, resolve } from "pathe";
7
7
  * Create a CoreConfig with sensible defaults
8
8
  */
9
9
  function createCoreConfig(options) {
10
- const { rootDir, isNuxt = false, isDev = process.env.NODE_ENV !== "production", graphqlOptions = {}, logger = createLogger(), ignorePatterns = [], layerServerDirs = [], layerAppDirs = [] } = options;
10
+ const { rootDir, isNuxt = false, isDev = process.env.NODE_ENV !== "production", graphqlOptions = {}, logger = createLogger(), ignorePatterns = [] } = options;
11
11
  const framework = graphqlOptions.framework || GRAPHQL_FRAMEWORK_YOGA;
12
12
  const buildDir = options.buildDir || resolve(rootDir, isNuxt ? ".nuxt" : DIR_BUILD_NITRO);
13
13
  return {
@@ -21,9 +21,7 @@ function createCoreConfig(options) {
21
21
  isDev,
22
22
  graphqlOptions,
23
23
  logger,
24
- ignorePatterns,
25
- layerServerDirs,
26
- layerAppDirs
24
+ ignorePatterns
27
25
  };
28
26
  }
29
27
  /**
@@ -51,9 +49,7 @@ function createScanContext(config) {
51
49
  clientDir: config.clientDir,
52
50
  ignorePatterns: config.ignorePatterns,
53
51
  isDev: config.isDev,
54
- logger: config.logger,
55
- layerServerDirs: config.layerServerDirs,
56
- layerAppDirs: config.layerAppDirs
52
+ logger: config.logger
57
53
  };
58
54
  }
59
55
  /**
@@ -1,4 +1,4 @@
1
- import { scanWithLayers } from "./common.mjs";
1
+ import { scanDirectory } from "./common.mjs";
2
2
  import { readFile } from "node:fs/promises";
3
3
  import { basename, relative } from "pathe";
4
4
  import { parseSync } from "oxc-parser";
@@ -12,13 +12,7 @@ async function scanWithAST(ctx, config) {
12
12
  const errors = [];
13
13
  try {
14
14
  const serverDirRelative = relative(ctx.rootDir, ctx.serverDir);
15
- const files = await scanWithLayers(ctx, {
16
- mainDir: ctx.rootDir,
17
- mainSubDir: serverDirRelative,
18
- layerDirs: ctx.layerServerDirs,
19
- layerSubDir: "graphql",
20
- pattern: config.pattern
21
- });
15
+ const files = await scanDirectory(ctx, ctx.rootDir, serverDirRelative, config.pattern);
22
16
  const results = [];
23
17
  for (const file of files) try {
24
18
  const fileContent = await readFile(file.fullPath, "utf-8");
@@ -22,16 +22,5 @@ declare function filterByExtension<T extends {
22
22
  * Extract file paths from scanned files
23
23
  */
24
24
  declare function extractPaths(files: ScannedFile[]): string[];
25
- /**
26
- * Scan directory with layer support
27
- * Encapsulates the common pattern of scanning main directory + layer directories
28
- */
29
- declare function scanWithLayers(ctx: ScanContext, options: {
30
- mainDir: string;
31
- mainSubDir: string;
32
- layerDirs: string[] | undefined;
33
- layerSubDir: string;
34
- pattern: string;
35
- }): Promise<ScannedFile[]>;
36
25
  //#endregion
37
- export { deduplicateFiles, extractPaths, filterByExtension, scanDirectory, scanWithLayers };
26
+ export { deduplicateFiles, extractPaths, filterByExtension, scanDirectory };
@@ -54,15 +54,6 @@ function filterByExtension(files, extensions) {
54
54
  function extractPaths(files) {
55
55
  return files.map((f) => f.fullPath);
56
56
  }
57
- /**
58
- * Scan directory with layer support
59
- * Encapsulates the common pattern of scanning main directory + layer directories
60
- */
61
- async function scanWithLayers(ctx, options) {
62
- const mainFiles = await scanDirectory(ctx, options.mainDir, options.mainSubDir, options.pattern);
63
- const layerFiles = await Promise.all((options.layerDirs || []).map((layerDir) => scanDirectory(ctx, layerDir, options.layerSubDir, options.pattern))).then((r) => r.flat());
64
- return deduplicateFiles([...mainFiles, ...layerFiles]).sort((a, b) => a.path.localeCompare(b.path));
65
- }
66
57
 
67
58
  //#endregion
68
- export { deduplicateFiles, extractPaths, filterByExtension, scanDirectory, scanWithLayers };
59
+ export { deduplicateFiles, extractPaths, filterByExtension, scanDirectory };
@@ -1,5 +1,5 @@
1
1
  import { GRAPHQL_GLOB_PATTERN } from "../constants.mjs";
2
- import { scanWithLayers } from "./common.mjs";
2
+ import { scanDirectory } from "./common.mjs";
3
3
  import { relative } from "pathe";
4
4
 
5
5
  //#region src/core/scanning/documents.ts
@@ -12,13 +12,7 @@ async function scanDocumentsCore(ctx, options = {}) {
12
12
  const errors = [];
13
13
  try {
14
14
  const clientDirRelative = options.clientDirRelative || relative(ctx.rootDir, ctx.clientDir);
15
- const allFiles = await scanWithLayers(ctx, {
16
- mainDir: ctx.rootDir,
17
- mainSubDir: clientDirRelative,
18
- layerDirs: ctx.layerAppDirs,
19
- layerSubDir: "graphql",
20
- pattern: GRAPHQL_GLOB_PATTERN
21
- });
15
+ const allFiles = await scanDirectory(ctx, ctx.rootDir, clientDirRelative, GRAPHQL_GLOB_PATTERN);
22
16
  const externalPatterns = (options.externalServices || []).flatMap((service) => service.documents || []);
23
17
  return {
24
18
  items: allFiles.filter((f) => !f.path.startsWith("external/")).filter((f) => {
@@ -1,5 +1,5 @@
1
1
  import { GRAPHQL_GLOB_PATTERN } from "../constants.mjs";
2
- import { extractPaths, scanWithLayers } from "./common.mjs";
2
+ import { extractPaths, scanDirectory } from "./common.mjs";
3
3
  import { relative } from "pathe";
4
4
 
5
5
  //#region src/core/scanning/schemas.ts
@@ -12,13 +12,7 @@ async function scanSchemasCore(ctx) {
12
12
  try {
13
13
  const serverDirRelative = relative(ctx.rootDir, ctx.serverDir);
14
14
  return {
15
- items: extractPaths(await scanWithLayers(ctx, {
16
- mainDir: ctx.rootDir,
17
- mainSubDir: serverDirRelative,
18
- layerDirs: ctx.layerServerDirs,
19
- layerSubDir: "graphql",
20
- pattern: GRAPHQL_GLOB_PATTERN
21
- })),
15
+ items: extractPaths(await scanDirectory(ctx, ctx.rootDir, serverDirRelative, GRAPHQL_GLOB_PATTERN)),
22
16
  warnings,
23
17
  errors
24
18
  };
@@ -40,13 +34,7 @@ async function scanGraphqlCore(ctx) {
40
34
  try {
41
35
  const serverDirRelative = relative(ctx.rootDir, ctx.serverDir);
42
36
  return {
43
- items: extractPaths(await scanWithLayers(ctx, {
44
- mainDir: ctx.rootDir,
45
- mainSubDir: serverDirRelative,
46
- layerDirs: ctx.layerServerDirs,
47
- layerSubDir: "graphql",
48
- pattern: "**/*.{graphql,gql}"
49
- })),
37
+ items: extractPaths(await scanDirectory(ctx, ctx.rootDir, serverDirRelative, "**/*.{graphql,gql}")),
50
38
  warnings,
51
39
  errors
52
40
  };
@@ -166,10 +166,6 @@ interface CoreConfig {
166
166
  logger: CoreLogger;
167
167
  /** Patterns to ignore during scanning */
168
168
  ignorePatterns: string[];
169
- /** Layer server directories (Nuxt) */
170
- layerServerDirs?: string[];
171
- /** Layer app directories (Nuxt) */
172
- layerAppDirs?: string[];
173
169
  }
174
170
  /**
175
171
  * Core context for runtime operations
@@ -19,10 +19,6 @@ interface ScanContext {
19
19
  isDev: boolean;
20
20
  /** Logger instance */
21
21
  logger: CoreLogger;
22
- /** Layer server directories (Nuxt layers) */
23
- layerServerDirs?: string[];
24
- /** Layer app directories (Nuxt layers) */
25
- layerAppDirs?: string[];
26
22
  }
27
23
  /**
28
24
  * Generic scan result wrapper
@@ -27,9 +27,7 @@ function createScanContextFromNitro(nitro) {
27
27
  clientDir: nitro.graphql.clientDir,
28
28
  ignorePatterns: nitro.options.ignore,
29
29
  isDev: nitro.options.dev,
30
- logger: createLoggerFromNitro(nitro),
31
- layerServerDirs: nitro.options.graphql?.layerServerDirs || [],
32
- layerAppDirs: nitro.options.graphql?.layerAppDirs || []
30
+ logger: createLoggerFromNitro(nitro)
33
31
  };
34
32
  }
35
33
  /**
@@ -55,9 +53,7 @@ function createCoreConfigFromNitro(nitro) {
55
53
  security: graphqlOptions.security
56
54
  },
57
55
  logger: createLoggerFromNitro(nitro),
58
- ignorePatterns: nitro.options.ignore,
59
- layerServerDirs: nitro.options.graphql?.layerServerDirs || [],
60
- layerAppDirs: nitro.options.graphql?.layerAppDirs || []
56
+ ignorePatterns: nitro.options.ignore
61
57
  };
62
58
  }
63
59
  /**
@@ -1,4 +1,4 @@
1
- import { ClientUtilsConfig, CodegenClientConfig, CodegenServerConfig, DefineDirectiveConfig, DefineServerConfig, DirectiveArgument, DirectiveDefinition, ExtendSource, ExternalGraphQLService, ExternalServicePaths, FederationConfig, FileGenerationConfig, Flatten, GenImport, GenericSdkConfig, GraphQLArgumentType, GraphQLBaseType, GraphQLScalarType, NitroGraphQLOptions, PathsConfig, PubSubConfig, RuntimeConfig, SSETransportConfig, SdkConfig, SecurityConfig, StandardSchemaV1, SubscriptionsConfig, TypesConfig, WatchConfig, WebSocketTransportConfig } from "./types.mjs";
1
+ import { ClientUtilsConfig, CodegenClientConfig, CodegenServerConfig, DefineDirectiveConfig, DefineServerConfig, DirectiveArgument, DirectiveDefinition, ExplicitPathsExtendSource, ExtendSource, ExternalGraphQLService, ExternalServicePaths, FederationConfig, FileGenerationConfig, Flatten, GenImport, GenericSdkConfig, GraphQLArgumentType, GraphQLBaseType, GraphQLScalarType, LocalDirExtendSource, NitroGraphQLOptions, PathsConfig, PubSubConfig, RuntimeConfig, SSETransportConfig, SdkConfig, SecurityConfig, StandardSchemaV1, SubscriptionsConfig, TypesConfig, WatchConfig, WebSocketTransportConfig } from "./types.mjs";
2
2
  import { NitroAdapter } from "./adapter.mjs";
3
3
  import { resolveSecurityConfig } from "./setup/logging.mjs";
4
4
  import { setupNitroGraphQL } from "./setup.mjs";
@@ -43,4 +43,4 @@ declare function graphqlModule(options?: NitroGraphQLOptions): Plugin & {
43
43
  nitro?: NitroModule;
44
44
  };
45
45
  //#endregion
46
- export { ClientUtilsConfig, CodegenClientConfig, CodegenServerConfig, DefineDirectiveConfig, DefineServerConfig, DirectiveArgument, DirectiveDefinition, ExtendSource, ExternalGraphQLService, ExternalServicePaths, FederationConfig, FileGenerationConfig, Flatten, GenImport, GenericSdkConfig, GraphQLArgumentType, GraphQLBaseType, GraphQLScalarType, NitroAdapter, NitroGraphQLOptions, PathsConfig, PubSubConfig, RuntimeConfig, SSETransportConfig, SdkConfig, SecurityConfig, StandardSchemaV1, SubscriptionsConfig, TypesConfig, WatchConfig, WebSocketTransportConfig, graphqlModule as default, resolveSecurityConfig, setupNitroGraphQL };
46
+ export { ClientUtilsConfig, CodegenClientConfig, CodegenServerConfig, DefineDirectiveConfig, DefineServerConfig, DirectiveArgument, DirectiveDefinition, ExplicitPathsExtendSource, ExtendSource, ExternalGraphQLService, ExternalServicePaths, FederationConfig, FileGenerationConfig, Flatten, GenImport, GenericSdkConfig, GraphQLArgumentType, GraphQLBaseType, GraphQLScalarType, LocalDirExtendSource, NitroAdapter, NitroGraphQLOptions, PathsConfig, PubSubConfig, RuntimeConfig, SSETransportConfig, SdkConfig, SecurityConfig, StandardSchemaV1, SubscriptionsConfig, TypesConfig, WatchConfig, WebSocketTransportConfig, graphqlModule as default, resolveSecurityConfig, setupNitroGraphQL };
@@ -1,6 +1,6 @@
1
- import * as nitro_h30 from "nitro/h3";
1
+ import * as nitro_h35 from "nitro/h3";
2
2
 
3
3
  //#region src/nitro/routes/apollo-sandbox-script.d.ts
4
- declare const _default: nitro_h30.EventHandlerWithFetch<nitro_h30.EventHandlerRequest, Promise<Response>>;
4
+ declare const _default: nitro_h35.EventHandlerWithFetch<nitro_h35.EventHandlerRequest, Promise<Response>>;
5
5
  //#endregion
6
6
  export { _default as default };
@@ -1,4 +1,4 @@
1
- import * as nitro_h31 from "nitro/h3";
1
+ import * as nitro_h30 from "nitro/h3";
2
2
 
3
3
  //#region src/nitro/routes/apollo-server-ws.d.ts
4
4
 
@@ -11,6 +11,6 @@ import * as nitro_h31 from "nitro/h3";
11
11
  *
12
12
  * @see https://github.com/enisdenjo/graphql-ws
13
13
  */
14
- declare const _default: nitro_h31.EventHandler<nitro_h31.EventHandlerRequest, unknown>;
14
+ declare const _default: nitro_h30.EventHandler<nitro_h30.EventHandlerRequest, unknown>;
15
15
  //#endregion
16
16
  export { _default as default };
@@ -1,6 +1,6 @@
1
- import * as nitro_h33 from "nitro/h3";
1
+ import * as nitro_h31 from "nitro/h3";
2
2
 
3
3
  //#region src/nitro/routes/apollo-server.d.ts
4
- declare const _default: nitro_h33.EventHandlerWithFetch<nitro_h33.EventHandlerRequest, Promise<any>>;
4
+ declare const _default: nitro_h31.EventHandlerWithFetch<nitro_h31.EventHandlerRequest, Promise<any>>;
5
5
  //#endregion
6
6
  export { _default as default };
@@ -1,4 +1,4 @@
1
- import * as nitro_h35 from "nitro/h3";
1
+ import * as nitro_h33 from "nitro/h3";
2
2
 
3
3
  //#region src/nitro/routes/debug.d.ts
4
4
 
@@ -10,7 +10,7 @@ import * as nitro_h35 from "nitro/h3";
10
10
  * - /_nitro/graphql/debug - HTML dashboard
11
11
  * - /_nitro/graphql/debug?format=json - JSON API
12
12
  */
13
- declare const _default: nitro_h35.EventHandlerWithFetch<nitro_h35.EventHandlerRequest, Promise<string | {
13
+ declare const _default: nitro_h33.EventHandlerWithFetch<nitro_h33.EventHandlerRequest, Promise<string | {
14
14
  timestamp: string;
15
15
  environment: {
16
16
  dev: any;
@@ -1,4 +1,4 @@
1
- import { LOG_TAG } from "../../core/constants.mjs";
1
+ import { GRAPHQL_GLOB_PATTERN, LOG_TAG, RESOLVER_GLOB_PATTERN } from "../../core/constants.mjs";
2
2
  import { isLocalPath, loadPackageConfig, resolvePackageFiles } from "../../core/manifest.mjs";
3
3
  import { parseSingleFile } from "../../core/scanning/ast-scanner.mjs";
4
4
  import { parseDirectiveCall } from "../../core/scanning/directives.mjs";
@@ -7,10 +7,17 @@ import { generateDirectiveSchemas } from "../../core/utils/directive-parser.mjs"
7
7
  import consola from "consola";
8
8
  import { dirname, resolve } from "pathe";
9
9
  import { existsSync } from "node:fs";
10
+ import { glob } from "tinyglobby";
10
11
 
11
12
  //#region src/nitro/setup/extend-loader.ts
12
13
  const logger = consola.withTag(LOG_TAG);
13
14
  /**
15
+ * Check if source is a LocalDirExtendSource
16
+ */
17
+ function isLocalDirSource(source) {
18
+ return source !== null && typeof source === "object" && ("serverDir" in source || "clientDir" in source) && !("manifest" in source) && !("resolvers" in source) && !("schemas" in source);
19
+ }
20
+ /**
14
21
  * Resolve extend directories for file watching
15
22
  * Called early in setup (before watcher) to get directories to watch
16
23
  */
@@ -23,10 +30,17 @@ async function resolveExtendDirs(nitro) {
23
30
  if (pkg) {
24
31
  const serverDir = resolve(pkg.baseDir, pkg.config.serverDir || "server/graphql");
25
32
  dirs.push(serverDir);
33
+ if (pkg.config.clientDir) {
34
+ const clientDir = resolve(pkg.baseDir, pkg.config.clientDir);
35
+ dirs.push(clientDir);
36
+ }
26
37
  } else if (isLocalPath(source)) {
27
38
  const localDir = resolve(nitro.options.rootDir, source, "graphql");
28
39
  if (existsSync(localDir)) dirs.push(localDir);
29
40
  }
41
+ } else if (isLocalDirSource(source)) {
42
+ if (source.serverDir && existsSync(source.serverDir)) dirs.push(source.serverDir);
43
+ if (source.clientDir && existsSync(source.clientDir)) dirs.push(source.clientDir);
30
44
  } else if (source && typeof source === "object") {
31
45
  const obj = source;
32
46
  if (obj.schemas) {
@@ -82,6 +96,7 @@ async function resolveExtendConfig(nitro, options = {}) {
82
96
  */
83
97
  async function processExtendSource(source, nitro, silent) {
84
98
  if (typeof source === "string") return loadFromPackage(source, nitro, silent);
99
+ if (isLocalDirSource(source)) return processLocalDirSource(source, nitro);
85
100
  if (source && typeof source === "object") return processExplicitPaths(source, nitro);
86
101
  return {
87
102
  schemas: 0,
@@ -190,6 +205,79 @@ async function processExplicitPaths(source, nitro) {
190
205
  hasSchema: false
191
206
  };
192
207
  }
208
+ /**
209
+ * Process LocalDirExtendSource - scan serverDir and clientDir for GraphQL files
210
+ * Used for Nuxt layers and local directory extends
211
+ */
212
+ async function processLocalDirSource(source, nitro) {
213
+ let schemasAdded = 0;
214
+ let resolversAdded = 0;
215
+ let directivesAdded = 0;
216
+ let documentsAdded = 0;
217
+ const ignorePatterns = [
218
+ "**/node_modules/**",
219
+ "**/.git/**",
220
+ "**/.output/**",
221
+ "**/.nitro/**",
222
+ "**/.nuxt/**"
223
+ ];
224
+ if (source.serverDir && existsSync(source.serverDir)) {
225
+ const schemaFiles = await glob(GRAPHQL_GLOB_PATTERN, {
226
+ cwd: source.serverDir,
227
+ absolute: true,
228
+ ignore: ignorePatterns
229
+ });
230
+ for (const schemaPath of schemaFiles) if (!nitro.scanSchemas.includes(schemaPath)) {
231
+ nitro.scanSchemas.push(schemaPath);
232
+ schemasAdded++;
233
+ }
234
+ const resolverFiles = await glob(RESOLVER_GLOB_PATTERN, {
235
+ cwd: source.serverDir,
236
+ absolute: true,
237
+ ignore: ignorePatterns
238
+ });
239
+ for (const resolverPath of resolverFiles) {
240
+ if (nitro.scanResolvers.some((r) => r.specifier === resolverPath)) continue;
241
+ const parsed = await parseSingleFile(resolverPath, parseResolverCall);
242
+ if (parsed?.imports.length) {
243
+ nitro.scanResolvers.push(parsed);
244
+ resolversAdded++;
245
+ }
246
+ }
247
+ const directiveFiles = await glob("**/*.directive.ts", {
248
+ cwd: source.serverDir,
249
+ absolute: true,
250
+ ignore: ignorePatterns
251
+ });
252
+ for (const directivePath of directiveFiles) {
253
+ if (nitro.scanDirectives.some((d) => d.specifier === directivePath)) continue;
254
+ const parsed = await parseSingleFile(directivePath, parseDirectiveCall);
255
+ if (parsed?.imports.length) {
256
+ nitro.scanDirectives.push(parsed);
257
+ directivesAdded++;
258
+ }
259
+ }
260
+ }
261
+ if (source.clientDir && existsSync(source.clientDir)) {
262
+ const documentFiles = await glob(GRAPHQL_GLOB_PATTERN, {
263
+ cwd: source.clientDir,
264
+ absolute: true,
265
+ ignore: ignorePatterns
266
+ });
267
+ for (const docPath of documentFiles) if (!nitro.scanDocuments.includes(docPath)) {
268
+ nitro.scanDocuments.push(docPath);
269
+ documentsAdded++;
270
+ }
271
+ }
272
+ return {
273
+ schemas: schemasAdded,
274
+ resolvers: resolversAdded,
275
+ directives: directivesAdded,
276
+ documents: documentsAdded,
277
+ hasConfig: false,
278
+ hasSchema: false
279
+ };
280
+ }
193
281
 
194
282
  //#endregion
195
283
  export { resolveExtendConfig, resolveExtendDirs };
@@ -10,6 +10,7 @@ import { Nitro } from "nitro/types";
10
10
  declare function setupFileWatcher(nitro: Nitro, watchDirs: string[]): FSWatcher;
11
11
  /**
12
12
  * Determine which directories to watch based on framework and configuration
13
+ * Note: Layer directories are now handled via extendDirs (passed from extend-loader)
13
14
  */
14
15
  declare function getWatchDirectories(nitro: Nitro, extendDirs?: string[]): string[];
15
16
  //#endregion
@@ -63,29 +63,13 @@ function setupFileWatcher(nitro, watchDirs) {
63
63
  }
64
64
  /**
65
65
  * Determine which directories to watch based on framework and configuration
66
+ * Note: Layer directories are now handled via extendDirs (passed from extend-loader)
66
67
  */
67
68
  function getWatchDirectories(nitro, extendDirs = []) {
68
69
  const watchDirs = [];
69
- const framework = nitro.options.framework.name;
70
70
  const scanLocal = shouldScanLocalFiles(nitro);
71
- switch (framework) {
72
- case "nuxt": {
73
- watchDirs.push(nitro.graphql.clientDir);
74
- if (scanLocal) watchDirs.push(nitro.graphql.serverDir);
75
- const layerServerDirs = nitro.options.graphql?.layerServerDirs || [];
76
- const layerAppDirs = nitro.options.graphql?.layerAppDirs || [];
77
- if (scanLocal) for (const layerServerDir of layerServerDirs) watchDirs.push(join(layerServerDir, "graphql"));
78
- for (const layerAppDir of layerAppDirs) watchDirs.push(join(layerAppDir, "graphql"));
79
- break;
80
- }
81
- case "nitro":
82
- watchDirs.push(nitro.graphql.clientDir);
83
- if (scanLocal) watchDirs.push(nitro.graphql.serverDir);
84
- break;
85
- default:
86
- watchDirs.push(nitro.graphql.clientDir);
87
- if (scanLocal) watchDirs.push(nitro.graphql.serverDir);
88
- }
71
+ watchDirs.push(nitro.graphql.clientDir);
72
+ if (scanLocal) watchDirs.push(nitro.graphql.serverDir);
89
73
  for (const dir of extendDirs) if (!watchDirs.includes(dir)) watchDirs.push(dir);
90
74
  if (nitro.options.graphql?.externalServices?.length) {
91
75
  for (const service of nitro.options.graphql.externalServices) if (service.documents?.length) for (const pattern of service.documents) {
@@ -11,6 +11,9 @@ declare function setupNoExternals(nitro: Nitro): void;
11
11
  /**
12
12
  * Setup Rollup/Rolldown chunking configuration for GraphQL files
13
13
  * Creates separate chunks for schemas and resolvers to optimize bundle size
14
+ *
15
+ * Note: For Rolldown, we only use manualChunks (not advancedChunks) to avoid
16
+ * interfering with Nitro's node_modules chunking which uses advancedChunks.
14
17
  */
15
18
  declare function setupRollupChunking(nitro: Nitro): void;
16
19
  /**
@@ -1,5 +1,3 @@
1
- import { CHUNK_NAME_RESOLVERS, CHUNK_NAME_SCHEMAS, CHUNK_PATH_GRAPHQL, CHUNK_PATH_UNKNOWN, GRAPHQL_EXTENSIONS, RESOLVER_EXTENSIONS } from "../../core/constants.mjs";
2
-
3
1
  //#region src/nitro/setup/rollup-integration.ts
4
2
  /**
5
3
  * Configure noExternals to ensure nitro-graphql route handlers are bundled
@@ -15,63 +13,12 @@ function setupNoExternals(nitro) {
15
13
  /**
16
14
  * Setup Rollup/Rolldown chunking configuration for GraphQL files
17
15
  * Creates separate chunks for schemas and resolvers to optimize bundle size
16
+ *
17
+ * Note: For Rolldown, we only use manualChunks (not advancedChunks) to avoid
18
+ * interfering with Nitro's node_modules chunking which uses advancedChunks.
18
19
  */
19
20
  function setupRollupChunking(nitro) {
20
- nitro.hooks.hook("rollup:before", (_, rollupConfig) => {
21
- const manualChunks = rollupConfig.output?.manualChunks;
22
- const chunkFiles = rollupConfig.output?.chunkFileNames;
23
- if (!rollupConfig.output.inlineDynamicImports) {
24
- rollupConfig.output.manualChunks = (id, _meta) => {
25
- if (isGraphQLFile(id)) return getSchemaChunkName(id);
26
- if (isResolverFile(id)) return getResolverChunkName(id);
27
- if (typeof manualChunks === "function") return manualChunks(id, meta);
28
- };
29
- rollupConfig.output.advancedChunks = {
30
- groups: [{
31
- name: CHUNK_NAME_SCHEMAS,
32
- test: /* @__PURE__ */ new RegExp(`\\.(${GRAPHQL_EXTENSIONS.map((e) => e.slice(1)).join("|")})$`)
33
- }, {
34
- name: CHUNK_NAME_RESOLVERS,
35
- test: /\.resolver\.(ts|js)$/
36
- }],
37
- minSize: 0,
38
- minShareCount: 1
39
- };
40
- }
41
- rollupConfig.output.chunkFileNames = (chunkInfo) => {
42
- if (chunkInfo.moduleIds && chunkInfo.moduleIds.some((id) => isGraphQLFile(id) || isResolverFile(id))) return CHUNK_PATH_GRAPHQL;
43
- if (typeof chunkFiles === "function") return chunkFiles(chunkInfo);
44
- return CHUNK_PATH_UNKNOWN;
45
- };
46
- });
47
- }
48
- /**
49
- * Check if a file is a GraphQL schema file
50
- */
51
- function isGraphQLFile(id) {
52
- return GRAPHQL_EXTENSIONS.some((ext) => id.endsWith(ext));
53
- }
54
- /**
55
- * Check if a file is a resolver file
56
- */
57
- function isResolverFile(id) {
58
- return RESOLVER_EXTENSIONS.some((ext) => id.endsWith(ext));
59
- }
60
- /**
61
- * Get chunk name for GraphQL schema files
62
- * All schemas are bundled into a single chunk since GraphQL server
63
- * merges them at runtime anyway - no benefit from separate chunks
64
- */
65
- function getSchemaChunkName(_id) {
66
- return CHUNK_NAME_SCHEMAS;
67
- }
68
- /**
69
- * Get chunk name for resolver files
70
- * All resolvers are bundled into a single chunk since GraphQL server
71
- * requires all resolvers to be registered at startup - no runtime lazy loading
72
- */
73
- function getResolverChunkName(_id) {
74
- return CHUNK_NAME_RESOLVERS;
21
+ nitro.hooks.hook("rollup:before", (_, rollupConfig) => {});
75
22
  }
76
23
  /**
77
24
  * Configure external dependencies for Rollup
@@ -452,10 +452,6 @@ interface NitroGraphQLOptions {
452
452
  clientDir?: string;
453
453
  /** Types directory path (default: '{buildDir}/types') */
454
454
  typesDir?: string;
455
- /** Layer directories (populated by Nuxt module) */
456
- layerDirectories?: string[];
457
- layerServerDirs?: string[];
458
- layerAppDirs?: string[];
459
455
  /**
460
456
  * SDK files configuration
461
457
  * Set to false to disable all SDK generation
@@ -527,18 +523,32 @@ interface NitroGraphQLOptions {
527
523
  runtime?: boolean | RuntimeConfig;
528
524
  }
529
525
  /**
530
- * Extend source - package path or detailed config
531
- * - string: package name, requires graphql-manifest.json in package root
532
- * - object with manifest: explicit manifest path
533
- * - object with resolvers/schemas: explicit paths (legacy)
526
+ * Explicit paths extend source (legacy)
534
527
  */
535
- type ExtendSource = string | {
528
+ interface ExplicitPathsExtendSource {
536
529
  /** Explicit manifest path */
537
530
  manifest?: string;
538
531
  /** Explicit resolver paths (legacy, prefer manifest) */
539
532
  resolvers?: string | string[];
540
533
  /** Explicit schema paths (legacy, prefer manifest) */
541
534
  schemas?: string | string[];
542
- };
535
+ }
536
+ /**
537
+ * Local directory extend source
538
+ * For extending from local directories (e.g., Nuxt layers, monorepo packages)
539
+ */
540
+ interface LocalDirExtendSource {
541
+ /** Server GraphQL directory path (for schemas, resolvers, directives) */
542
+ serverDir?: string;
543
+ /** Client GraphQL directory path (for documents) */
544
+ clientDir?: string;
545
+ }
546
+ /**
547
+ * Extend source - package path or detailed config
548
+ * - string: package name or local path, requires nitro-graphql.config.ts in package root
549
+ * - LocalDirExtendSource: local directories with serverDir/clientDir
550
+ * - ExplicitPathsExtendSource: explicit paths (legacy)
551
+ */
552
+ type ExtendSource = string | LocalDirExtendSource | ExplicitPathsExtendSource;
543
553
  //#endregion
544
- export { ClientUtilsConfig, CodegenClientConfig, CodegenServerConfig, DefineDirectiveConfig, DefineServerConfig, DirectiveArgument, DirectiveDefinition, ExtendSource, ExternalGraphQLService, ExternalServicePaths, FederationConfig, FileGenerationConfig, Flatten, GenImport, GenericSdkConfig, GraphQLArgumentType, GraphQLBaseType, GraphQLScalarType, NitroGraphQLOptions, PathsConfig, PubSubConfig, RuntimeConfig, SSETransportConfig, SdkConfig, SecurityConfig, StandardSchemaV1, SubscriptionsConfig, TypesConfig, WatchConfig, WebSocketTransportConfig };
554
+ export { ClientUtilsConfig, CodegenClientConfig, CodegenServerConfig, DefineDirectiveConfig, DefineServerConfig, DirectiveArgument, DirectiveDefinition, ExplicitPathsExtendSource, ExtendSource, ExternalGraphQLService, ExternalServicePaths, FederationConfig, FileGenerationConfig, Flatten, GenImport, GenericSdkConfig, GraphQLArgumentType, GraphQLBaseType, GraphQLScalarType, LocalDirExtendSource, NitroGraphQLOptions, PathsConfig, PubSubConfig, RuntimeConfig, SSETransportConfig, SdkConfig, SecurityConfig, StandardSchemaV1, SubscriptionsConfig, TypesConfig, WatchConfig, WebSocketTransportConfig };
package/dist/nuxt.mjs CHANGED
@@ -77,14 +77,17 @@ var nuxt_default = defineNuxtModule({
77
77
  });
78
78
  nuxt.hook("nitro:config", async (nitroConfig) => {
79
79
  const clientDir = join(nuxt.options.buildDir, "graphql");
80
- const layerDirs = await getLayerDirectories(nuxt);
81
- const layerDirectories = layerDirs.map((layer) => layer.root.replace(/\/$/, "")).filter((root) => root !== nuxt.options.rootDir);
82
- const layerServerDirs = layerDirs.filter((layer) => layer.root !== `${nuxt.options.rootDir}/`).map((layer) => layer.server?.replace(/\/$/, "")).filter(Boolean);
83
- const layerAppDirs = layerDirs.filter((layer) => layer.root !== `${nuxt.options.rootDir}/`).map((layer) => layer.app?.replace(/\/$/, "")).filter(Boolean);
80
+ const layerExtends = (await getLayerDirectories(nuxt)).filter((layer) => layer.root !== `${nuxt.options.rootDir}/`).map((layer) => {
81
+ const serverDir = layer.server?.replace(/\/$/, "");
82
+ const appDir = layer.app?.replace(/\/$/, "");
83
+ if (!serverDir && !appDir) return null;
84
+ return {
85
+ serverDir: serverDir ? join(serverDir, "graphql") : void 0,
86
+ clientDir: appDir ? join(appDir, "graphql") : void 0
87
+ };
88
+ }).filter(Boolean);
84
89
  if (!nitroConfig.graphql) nitroConfig.graphql = {};
85
- nitroConfig.graphql.layerDirectories = layerDirectories;
86
- nitroConfig.graphql.layerServerDirs = layerServerDirs;
87
- nitroConfig.graphql.layerAppDirs = layerAppDirs;
90
+ nitroConfig.graphql.extend = [...nitroConfig.graphql?.extend || [], ...layerExtends];
88
91
  if (!existsSync(resolve(nuxt.options.rootDir, "app/graphql"))) {
89
92
  const defaultDir = join(clientDir, "default");
90
93
  if (!existsSync(defaultDir)) mkdirSync(defaultDir, { recursive: true });
package/native/index.js CHANGED
@@ -77,8 +77,8 @@ function requireNative() {
77
77
  try {
78
78
  const binding = require('nitro-graphql-android-arm64')
79
79
  const bindingPackageVersion = require('nitro-graphql-android-arm64/package.json').version
80
- if (bindingPackageVersion !== '2.0.0-beta.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
81
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
80
+ if (bindingPackageVersion !== '2.0.0-beta.65' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
81
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.65 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
82
82
  }
83
83
  return binding
84
84
  } catch (e) {
@@ -93,8 +93,8 @@ function requireNative() {
93
93
  try {
94
94
  const binding = require('nitro-graphql-android-arm-eabi')
95
95
  const bindingPackageVersion = require('nitro-graphql-android-arm-eabi/package.json').version
96
- if (bindingPackageVersion !== '2.0.0-beta.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
97
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
96
+ if (bindingPackageVersion !== '2.0.0-beta.65' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
97
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.65 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
98
98
  }
99
99
  return binding
100
100
  } catch (e) {
@@ -114,8 +114,8 @@ function requireNative() {
114
114
  try {
115
115
  const binding = require('nitro-graphql-win32-x64-gnu')
116
116
  const bindingPackageVersion = require('nitro-graphql-win32-x64-gnu/package.json').version
117
- if (bindingPackageVersion !== '2.0.0-beta.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
118
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
117
+ if (bindingPackageVersion !== '2.0.0-beta.65' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
118
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.65 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
119
119
  }
120
120
  return binding
121
121
  } catch (e) {
@@ -130,8 +130,8 @@ function requireNative() {
130
130
  try {
131
131
  const binding = require('nitro-graphql-win32-x64-msvc')
132
132
  const bindingPackageVersion = require('nitro-graphql-win32-x64-msvc/package.json').version
133
- if (bindingPackageVersion !== '2.0.0-beta.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
134
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
133
+ if (bindingPackageVersion !== '2.0.0-beta.65' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
134
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.65 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
135
135
  }
136
136
  return binding
137
137
  } catch (e) {
@@ -147,8 +147,8 @@ function requireNative() {
147
147
  try {
148
148
  const binding = require('nitro-graphql-win32-ia32-msvc')
149
149
  const bindingPackageVersion = require('nitro-graphql-win32-ia32-msvc/package.json').version
150
- if (bindingPackageVersion !== '2.0.0-beta.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
151
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
150
+ if (bindingPackageVersion !== '2.0.0-beta.65' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
151
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.65 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
152
152
  }
153
153
  return binding
154
154
  } catch (e) {
@@ -163,8 +163,8 @@ function requireNative() {
163
163
  try {
164
164
  const binding = require('nitro-graphql-win32-arm64-msvc')
165
165
  const bindingPackageVersion = require('nitro-graphql-win32-arm64-msvc/package.json').version
166
- if (bindingPackageVersion !== '2.0.0-beta.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
167
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
166
+ if (bindingPackageVersion !== '2.0.0-beta.65' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
167
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.65 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
168
168
  }
169
169
  return binding
170
170
  } catch (e) {
@@ -182,8 +182,8 @@ function requireNative() {
182
182
  try {
183
183
  const binding = require('nitro-graphql-darwin-universal')
184
184
  const bindingPackageVersion = require('nitro-graphql-darwin-universal/package.json').version
185
- if (bindingPackageVersion !== '2.0.0-beta.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
186
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
185
+ if (bindingPackageVersion !== '2.0.0-beta.65' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
186
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.65 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
187
187
  }
188
188
  return binding
189
189
  } catch (e) {
@@ -198,8 +198,8 @@ function requireNative() {
198
198
  try {
199
199
  const binding = require('nitro-graphql-darwin-x64')
200
200
  const bindingPackageVersion = require('nitro-graphql-darwin-x64/package.json').version
201
- if (bindingPackageVersion !== '2.0.0-beta.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
202
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
201
+ if (bindingPackageVersion !== '2.0.0-beta.65' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
202
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.65 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
203
203
  }
204
204
  return binding
205
205
  } catch (e) {
@@ -214,8 +214,8 @@ function requireNative() {
214
214
  try {
215
215
  const binding = require('nitro-graphql-darwin-arm64')
216
216
  const bindingPackageVersion = require('nitro-graphql-darwin-arm64/package.json').version
217
- if (bindingPackageVersion !== '2.0.0-beta.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
218
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
217
+ if (bindingPackageVersion !== '2.0.0-beta.65' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
218
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.65 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
219
219
  }
220
220
  return binding
221
221
  } catch (e) {
@@ -234,8 +234,8 @@ function requireNative() {
234
234
  try {
235
235
  const binding = require('nitro-graphql-freebsd-x64')
236
236
  const bindingPackageVersion = require('nitro-graphql-freebsd-x64/package.json').version
237
- if (bindingPackageVersion !== '2.0.0-beta.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
238
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
237
+ if (bindingPackageVersion !== '2.0.0-beta.65' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
238
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.65 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
239
239
  }
240
240
  return binding
241
241
  } catch (e) {
@@ -250,8 +250,8 @@ function requireNative() {
250
250
  try {
251
251
  const binding = require('nitro-graphql-freebsd-arm64')
252
252
  const bindingPackageVersion = require('nitro-graphql-freebsd-arm64/package.json').version
253
- if (bindingPackageVersion !== '2.0.0-beta.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
254
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
253
+ if (bindingPackageVersion !== '2.0.0-beta.65' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
254
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.65 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
255
255
  }
256
256
  return binding
257
257
  } catch (e) {
@@ -271,8 +271,8 @@ function requireNative() {
271
271
  try {
272
272
  const binding = require('nitro-graphql-linux-x64-musl')
273
273
  const bindingPackageVersion = require('nitro-graphql-linux-x64-musl/package.json').version
274
- if (bindingPackageVersion !== '2.0.0-beta.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
275
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
274
+ if (bindingPackageVersion !== '2.0.0-beta.65' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
275
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.65 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
276
276
  }
277
277
  return binding
278
278
  } catch (e) {
@@ -287,8 +287,8 @@ function requireNative() {
287
287
  try {
288
288
  const binding = require('nitro-graphql-linux-x64-gnu')
289
289
  const bindingPackageVersion = require('nitro-graphql-linux-x64-gnu/package.json').version
290
- if (bindingPackageVersion !== '2.0.0-beta.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
291
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
290
+ if (bindingPackageVersion !== '2.0.0-beta.65' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
291
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.65 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
292
292
  }
293
293
  return binding
294
294
  } catch (e) {
@@ -305,8 +305,8 @@ function requireNative() {
305
305
  try {
306
306
  const binding = require('nitro-graphql-linux-arm64-musl')
307
307
  const bindingPackageVersion = require('nitro-graphql-linux-arm64-musl/package.json').version
308
- if (bindingPackageVersion !== '2.0.0-beta.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
309
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
308
+ if (bindingPackageVersion !== '2.0.0-beta.65' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
309
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.65 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
310
310
  }
311
311
  return binding
312
312
  } catch (e) {
@@ -321,8 +321,8 @@ function requireNative() {
321
321
  try {
322
322
  const binding = require('nitro-graphql-linux-arm64-gnu')
323
323
  const bindingPackageVersion = require('nitro-graphql-linux-arm64-gnu/package.json').version
324
- if (bindingPackageVersion !== '2.0.0-beta.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
325
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
324
+ if (bindingPackageVersion !== '2.0.0-beta.65' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
325
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.65 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
326
326
  }
327
327
  return binding
328
328
  } catch (e) {
@@ -339,8 +339,8 @@ function requireNative() {
339
339
  try {
340
340
  const binding = require('nitro-graphql-linux-arm-musleabihf')
341
341
  const bindingPackageVersion = require('nitro-graphql-linux-arm-musleabihf/package.json').version
342
- if (bindingPackageVersion !== '2.0.0-beta.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
343
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
342
+ if (bindingPackageVersion !== '2.0.0-beta.65' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
343
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.65 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
344
344
  }
345
345
  return binding
346
346
  } catch (e) {
@@ -355,8 +355,8 @@ function requireNative() {
355
355
  try {
356
356
  const binding = require('nitro-graphql-linux-arm-gnueabihf')
357
357
  const bindingPackageVersion = require('nitro-graphql-linux-arm-gnueabihf/package.json').version
358
- if (bindingPackageVersion !== '2.0.0-beta.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
359
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
358
+ if (bindingPackageVersion !== '2.0.0-beta.65' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
359
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.65 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
360
360
  }
361
361
  return binding
362
362
  } catch (e) {
@@ -373,8 +373,8 @@ function requireNative() {
373
373
  try {
374
374
  const binding = require('nitro-graphql-linux-loong64-musl')
375
375
  const bindingPackageVersion = require('nitro-graphql-linux-loong64-musl/package.json').version
376
- if (bindingPackageVersion !== '2.0.0-beta.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
377
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
376
+ if (bindingPackageVersion !== '2.0.0-beta.65' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
377
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.65 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
378
378
  }
379
379
  return binding
380
380
  } catch (e) {
@@ -389,8 +389,8 @@ function requireNative() {
389
389
  try {
390
390
  const binding = require('nitro-graphql-linux-loong64-gnu')
391
391
  const bindingPackageVersion = require('nitro-graphql-linux-loong64-gnu/package.json').version
392
- if (bindingPackageVersion !== '2.0.0-beta.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
393
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
392
+ if (bindingPackageVersion !== '2.0.0-beta.65' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
393
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.65 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
394
394
  }
395
395
  return binding
396
396
  } catch (e) {
@@ -407,8 +407,8 @@ function requireNative() {
407
407
  try {
408
408
  const binding = require('nitro-graphql-linux-riscv64-musl')
409
409
  const bindingPackageVersion = require('nitro-graphql-linux-riscv64-musl/package.json').version
410
- if (bindingPackageVersion !== '2.0.0-beta.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
411
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
410
+ if (bindingPackageVersion !== '2.0.0-beta.65' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
411
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.65 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
412
412
  }
413
413
  return binding
414
414
  } catch (e) {
@@ -423,8 +423,8 @@ function requireNative() {
423
423
  try {
424
424
  const binding = require('nitro-graphql-linux-riscv64-gnu')
425
425
  const bindingPackageVersion = require('nitro-graphql-linux-riscv64-gnu/package.json').version
426
- if (bindingPackageVersion !== '2.0.0-beta.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
427
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
426
+ if (bindingPackageVersion !== '2.0.0-beta.65' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
427
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.65 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
428
428
  }
429
429
  return binding
430
430
  } catch (e) {
@@ -440,8 +440,8 @@ function requireNative() {
440
440
  try {
441
441
  const binding = require('nitro-graphql-linux-ppc64-gnu')
442
442
  const bindingPackageVersion = require('nitro-graphql-linux-ppc64-gnu/package.json').version
443
- if (bindingPackageVersion !== '2.0.0-beta.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
444
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
443
+ if (bindingPackageVersion !== '2.0.0-beta.65' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
444
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.65 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
445
445
  }
446
446
  return binding
447
447
  } catch (e) {
@@ -456,8 +456,8 @@ function requireNative() {
456
456
  try {
457
457
  const binding = require('nitro-graphql-linux-s390x-gnu')
458
458
  const bindingPackageVersion = require('nitro-graphql-linux-s390x-gnu/package.json').version
459
- if (bindingPackageVersion !== '2.0.0-beta.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
460
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
459
+ if (bindingPackageVersion !== '2.0.0-beta.65' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
460
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.65 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
461
461
  }
462
462
  return binding
463
463
  } catch (e) {
@@ -476,8 +476,8 @@ function requireNative() {
476
476
  try {
477
477
  const binding = require('nitro-graphql-openharmony-arm64')
478
478
  const bindingPackageVersion = require('nitro-graphql-openharmony-arm64/package.json').version
479
- if (bindingPackageVersion !== '2.0.0-beta.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
480
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
479
+ if (bindingPackageVersion !== '2.0.0-beta.65' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
480
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.65 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
481
481
  }
482
482
  return binding
483
483
  } catch (e) {
@@ -492,8 +492,8 @@ function requireNative() {
492
492
  try {
493
493
  const binding = require('nitro-graphql-openharmony-x64')
494
494
  const bindingPackageVersion = require('nitro-graphql-openharmony-x64/package.json').version
495
- if (bindingPackageVersion !== '2.0.0-beta.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
496
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
495
+ if (bindingPackageVersion !== '2.0.0-beta.65' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
496
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.65 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
497
497
  }
498
498
  return binding
499
499
  } catch (e) {
@@ -508,8 +508,8 @@ function requireNative() {
508
508
  try {
509
509
  const binding = require('nitro-graphql-openharmony-arm')
510
510
  const bindingPackageVersion = require('nitro-graphql-openharmony-arm/package.json').version
511
- if (bindingPackageVersion !== '2.0.0-beta.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
512
- throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
511
+ if (bindingPackageVersion !== '2.0.0-beta.65' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
512
+ throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.65 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
513
513
  }
514
514
  return binding
515
515
  } catch (e) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nitro-graphql",
3
3
  "type": "module",
4
- "version": "2.0.0-beta.63",
4
+ "version": "2.0.0-beta.65",
5
5
  "description": "GraphQL integration for Nitro",
6
6
  "license": "MIT",
7
7
  "repository": {