nitro-graphql 2.0.0-beta.13 → 2.0.0-beta.14
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.
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { StandardSchemaV1 } from "./types/standard-schema.js";
|
|
2
2
|
import { ClientUtilsConfig, CodegenClientConfig, CodegenServerConfig, ExternalGraphQLService, ExternalServicePaths, FederationConfig, FileGenerationConfig, GenImport, GenericSdkConfig, NitroGraphQLOptions, PathsConfig, ScaffoldConfig, SdkConfig, TypesConfig } from "./types/index.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as nitropack_types0 from "nitropack/types";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
|
6
6
|
/**
|
|
7
7
|
* Nitro GraphQL module
|
|
8
8
|
* Can be used via modules array in nitro.config.ts
|
|
9
9
|
*/
|
|
10
|
-
declare const _default:
|
|
10
|
+
declare const _default: nitropack_types0.NitroModule;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { ClientUtilsConfig, CodegenClientConfig, CodegenServerConfig, ExternalGraphQLService, ExternalServicePaths, FederationConfig, FileGenerationConfig, GenImport, GenericSdkConfig, NitroGraphQLOptions, PathsConfig, ScaffoldConfig, SdkConfig, StandardSchemaV1, TypesConfig, _default as default };
|
package/dist/routes/debug.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as h35 from "h3";
|
|
2
2
|
|
|
3
3
|
//#region src/routes/debug.d.ts
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@ import * as h33 from "h3";
|
|
|
10
10
|
* - /_nitro/graphql/debug - HTML dashboard
|
|
11
11
|
* - /_nitro/graphql/debug?format=json - JSON API
|
|
12
12
|
*/
|
|
13
|
-
declare const _default:
|
|
13
|
+
declare const _default: h35.EventHandlerWithFetch<h35.EventHandlerRequest, Promise<string | {
|
|
14
14
|
timestamp: string;
|
|
15
15
|
environment: {
|
|
16
16
|
dev: any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as h31 from "h3";
|
|
2
2
|
|
|
3
3
|
//#region src/routes/graphql-yoga.d.ts
|
|
4
|
-
declare const _default:
|
|
4
|
+
declare const _default: h31.EventHandlerWithFetch<h31.EventHandlerRequest, Promise<Response>>;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { _default as default };
|
package/dist/routes/health.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as h33 from "h3";
|
|
2
2
|
|
|
3
3
|
//#region src/routes/health.d.ts
|
|
4
|
-
declare const _default:
|
|
4
|
+
declare const _default: h33.EventHandlerWithFetch<h33.EventHandlerRequest, Promise<{
|
|
5
5
|
status: string;
|
|
6
6
|
message: string;
|
|
7
7
|
timestamp: string;
|
|
@@ -78,7 +78,7 @@ function shouldGenerateClientUtils(nitro) {
|
|
|
78
78
|
const clientUtilsConfig = nitro.options.graphql?.clientUtils;
|
|
79
79
|
if (clientUtilsConfig === false) return false;
|
|
80
80
|
if (clientUtilsConfig && clientUtilsConfig.enabled === false) return false;
|
|
81
|
-
return
|
|
81
|
+
return true;
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
84
|
* Get client utilities configuration (handles false case)
|
|
@@ -298,11 +298,9 @@ async function generateMainClientTypes(nitro) {
|
|
|
298
298
|
writeFileSync(sdkPath, types.sdk, "utf-8");
|
|
299
299
|
consola.success(`[nitro-graphql] Generated SDK at: ${sdkPath}`);
|
|
300
300
|
}
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
generateGraphQLIndexFile(nitro, nitro.graphql.clientDir, externalServices);
|
|
305
|
-
}
|
|
301
|
+
generateNuxtOfetchClient(nitro, nitro.graphql.clientDir, "default");
|
|
302
|
+
const externalServices = nitro.options.graphql?.externalServices || [];
|
|
303
|
+
if (externalServices.length > 0) generateGraphQLIndexFile(nitro, nitro.graphql.clientDir, externalServices);
|
|
306
304
|
}
|
|
307
305
|
async function generateExternalServicesTypes(nitro) {
|
|
308
306
|
const externalServices = nitro.options.graphql?.externalServices || [];
|
|
@@ -349,7 +347,7 @@ async function generateExternalServicesTypes(nitro) {
|
|
|
349
347
|
writeFileSync(serviceSdkPath, types.sdk, "utf-8");
|
|
350
348
|
consola.success(`[graphql:${service.name}] Generated SDK at: ${serviceSdkPath}`);
|
|
351
349
|
}
|
|
352
|
-
|
|
350
|
+
generateExternalOfetchClient(nitro, service, service.endpoint);
|
|
353
351
|
consola.success(`[graphql:${service.name}] External service types generated successfully`);
|
|
354
352
|
} catch (error) {
|
|
355
353
|
consola.error(`[graphql:${service.name}] External service generation failed:`, error);
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nitro-graphql",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.14",
|
|
5
|
+
"packageManager": "pnpm@10.20.0",
|
|
5
6
|
"description": "GraphQL integration for Nitro",
|
|
6
7
|
"license": "MIT",
|
|
7
8
|
"sideEffects": false,
|
|
@@ -86,6 +87,21 @@
|
|
|
86
87
|
"files": [
|
|
87
88
|
"dist"
|
|
88
89
|
],
|
|
90
|
+
"scripts": {
|
|
91
|
+
"prepack": "pnpm build",
|
|
92
|
+
"build": "tsdown",
|
|
93
|
+
"dev": "tsdown --watch",
|
|
94
|
+
"bumpp": "bumpp package.json",
|
|
95
|
+
"release": "pnpm build && pnpm bumpp && pnpm publish --no-git-checks --access public",
|
|
96
|
+
"playground:nitro": "cd playgrounds/nitro && pnpm install && pnpm dev",
|
|
97
|
+
"playground:nuxt": "cd playgrounds/nuxt && pnpm install && pnpm dev",
|
|
98
|
+
"playground:federation": "cd playgrounds/federation && pnpm install && pnpm dev",
|
|
99
|
+
"docs:dev": "cd .docs && pnpm install && pnpm dev",
|
|
100
|
+
"docs:build": "cd .docs && pnpm install && pnpm build",
|
|
101
|
+
"docs:preview": "cd .docs && pnpm preview",
|
|
102
|
+
"lint": "eslint .",
|
|
103
|
+
"lint:fix": "eslint . --fix"
|
|
104
|
+
},
|
|
89
105
|
"peerDependencies": {
|
|
90
106
|
"@apollo/server": "^5.0.0",
|
|
91
107
|
"@apollo/utils.withrequired": "^3.0.0",
|
|
@@ -106,63 +122,49 @@
|
|
|
106
122
|
}
|
|
107
123
|
},
|
|
108
124
|
"dependencies": {
|
|
109
|
-
"@apollo/subgraph": "
|
|
110
|
-
"@graphql-codegen/core": "
|
|
111
|
-
"@graphql-codegen/import-types-preset": "
|
|
112
|
-
"@graphql-codegen/typescript": "
|
|
113
|
-
"@graphql-codegen/typescript-generic-sdk": "
|
|
114
|
-
"@graphql-codegen/typescript-operations": "
|
|
115
|
-
"@graphql-codegen/typescript-resolvers": "
|
|
116
|
-
"@graphql-tools/graphql-file-loader": "
|
|
117
|
-
"@graphql-tools/load": "
|
|
118
|
-
"@graphql-tools/load-files": "
|
|
119
|
-
"@graphql-tools/merge": "
|
|
120
|
-
"@graphql-tools/schema": "
|
|
121
|
-
"@graphql-tools/url-loader": "
|
|
122
|
-
"@graphql-tools/utils": "
|
|
123
|
-
"chokidar": "
|
|
124
|
-
"consola": "
|
|
125
|
-
"defu": "
|
|
126
|
-
"graphql-config": "
|
|
127
|
-
"graphql-scalars": "
|
|
128
|
-
"knitwork": "
|
|
129
|
-
"ohash": "
|
|
130
|
-
"oxc-parser": "
|
|
131
|
-
"pathe": "
|
|
132
|
-
"tinyglobby": "
|
|
125
|
+
"@apollo/subgraph": "catalog:",
|
|
126
|
+
"@graphql-codegen/core": "catalog:",
|
|
127
|
+
"@graphql-codegen/import-types-preset": "catalog:",
|
|
128
|
+
"@graphql-codegen/typescript": "catalog:",
|
|
129
|
+
"@graphql-codegen/typescript-generic-sdk": "catalog:",
|
|
130
|
+
"@graphql-codegen/typescript-operations": "catalog:",
|
|
131
|
+
"@graphql-codegen/typescript-resolvers": "catalog:",
|
|
132
|
+
"@graphql-tools/graphql-file-loader": "catalog:",
|
|
133
|
+
"@graphql-tools/load": "catalog:",
|
|
134
|
+
"@graphql-tools/load-files": "catalog:",
|
|
135
|
+
"@graphql-tools/merge": "catalog:",
|
|
136
|
+
"@graphql-tools/schema": "catalog:",
|
|
137
|
+
"@graphql-tools/url-loader": "catalog:",
|
|
138
|
+
"@graphql-tools/utils": "catalog:",
|
|
139
|
+
"chokidar": "catalog:",
|
|
140
|
+
"consola": "catalog:",
|
|
141
|
+
"defu": "catalog:",
|
|
142
|
+
"graphql-config": "catalog:",
|
|
143
|
+
"graphql-scalars": "catalog:",
|
|
144
|
+
"knitwork": "catalog:",
|
|
145
|
+
"ohash": "catalog:",
|
|
146
|
+
"oxc-parser": "catalog:",
|
|
147
|
+
"pathe": "catalog:",
|
|
148
|
+
"tinyglobby": "catalog:"
|
|
133
149
|
},
|
|
134
150
|
"devDependencies": {
|
|
135
|
-
"@antfu/eslint-config": "
|
|
136
|
-
"@nuxt/kit": "
|
|
137
|
-
"@nuxt/schema": "
|
|
138
|
-
"@types/node": "
|
|
139
|
-
"bumpp": "
|
|
140
|
-
"changelogen": "
|
|
141
|
-
"crossws": "
|
|
142
|
-
"eslint": "
|
|
143
|
-
"graphql": "
|
|
144
|
-
"graphql-yoga": "
|
|
145
|
-
"h3": "
|
|
146
|
-
"nitro": "
|
|
147
|
-
"tsdown": "
|
|
148
|
-
"typescript": "
|
|
151
|
+
"@antfu/eslint-config": "catalog:",
|
|
152
|
+
"@nuxt/kit": "catalog:",
|
|
153
|
+
"@nuxt/schema": "catalog:",
|
|
154
|
+
"@types/node": "catalog:",
|
|
155
|
+
"bumpp": "catalog:",
|
|
156
|
+
"changelogen": "catalog:",
|
|
157
|
+
"crossws": "catalog:",
|
|
158
|
+
"eslint": "catalog:",
|
|
159
|
+
"graphql": "catalog:",
|
|
160
|
+
"graphql-yoga": "catalog:",
|
|
161
|
+
"h3": "catalog:",
|
|
162
|
+
"nitro": "catalog:",
|
|
163
|
+
"tsdown": "catalog:",
|
|
164
|
+
"typescript": "catalog:",
|
|
149
165
|
"vitepress-plugin-llms": "^1.8.1"
|
|
150
166
|
},
|
|
151
167
|
"resolutions": {
|
|
152
168
|
"nitro-graphql": "link:."
|
|
153
|
-
},
|
|
154
|
-
"scripts": {
|
|
155
|
-
"build": "tsdown",
|
|
156
|
-
"dev": "tsdown --watch",
|
|
157
|
-
"bumpp": "bumpp package.json",
|
|
158
|
-
"release": "pnpm build && pnpm bumpp && pnpm publish --no-git-checks --access public",
|
|
159
|
-
"playground:nitro": "cd playgrounds/nitro && pnpm install && pnpm dev",
|
|
160
|
-
"playground:nuxt": "cd playgrounds/nuxt && pnpm install && pnpm dev",
|
|
161
|
-
"playground:federation": "cd playgrounds/federation && pnpm install && pnpm dev",
|
|
162
|
-
"docs:dev": "cd .docs && pnpm install && pnpm dev",
|
|
163
|
-
"docs:build": "cd .docs && pnpm install && pnpm build",
|
|
164
|
-
"docs:preview": "cd .docs && pnpm preview",
|
|
165
|
-
"lint": "eslint .",
|
|
166
|
-
"lint:fix": "eslint . --fix"
|
|
167
169
|
}
|
|
168
|
-
}
|
|
170
|
+
}
|