nitro-graphql 2.0.0-beta.4 → 2.0.0-beta.7
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/README.md +785 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +80 -26
- package/dist/rollup.js +207 -49
- package/dist/routes/apollo-server.d.ts +2 -2
- package/dist/routes/apollo-server.js +5 -5
- package/dist/routes/debug.d.ts +61 -0
- package/dist/routes/debug.js +449 -0
- package/dist/routes/graphql-yoga.d.ts +2 -2
- package/dist/routes/graphql-yoga.js +5 -5
- package/dist/routes/health.d.ts +6 -2
- package/dist/types/index.d.ts +119 -1
- package/dist/utils/file-generator.d.ts +37 -0
- package/dist/utils/file-generator.js +72 -0
- package/dist/utils/index.js +62 -34
- package/dist/utils/path-resolver.d.ts +70 -0
- package/dist/utils/path-resolver.js +127 -0
- package/dist/utils/type-generation.js +111 -38
- package/dist/virtual/debug-info.d.ts +9 -0
- package/dist/virtual/debug-info.js +26 -0
- package/dist/virtual/graphql-config.d.ts +9 -0
- package/dist/virtual/graphql-config.js +10 -0
- package/dist/virtual/module-config.d.ts +9 -0
- package/dist/virtual/module-config.js +10 -0
- package/dist/virtual/server-directives.d.ts +11 -0
- package/dist/virtual/server-directives.js +10 -0
- package/dist/virtual/server-resolvers.d.ts +11 -0
- package/dist/virtual/server-resolvers.js +10 -0
- package/dist/virtual/server-schemas.d.ts +11 -0
- package/dist/virtual/server-schemas.js +10 -0
- package/package.json +81 -51
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/virtual/module-config.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Virtual module stub for #nitro-graphql/module-config
|
|
4
|
+
* This file is only used during build/bundling to prevent import resolution errors.
|
|
5
|
+
* At runtime, Nitro will override this with the actual virtual module.
|
|
6
|
+
*/
|
|
7
|
+
declare const moduleConfig: Record<string, any>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { moduleConfig };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/virtual/module-config.ts
|
|
2
|
+
/**
|
|
3
|
+
* Virtual module stub for #nitro-graphql/module-config
|
|
4
|
+
* This file is only used during build/bundling to prevent import resolution errors.
|
|
5
|
+
* At runtime, Nitro will override this with the actual virtual module.
|
|
6
|
+
*/
|
|
7
|
+
const moduleConfig = {};
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { moduleConfig };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/virtual/server-directives.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Virtual module stub for #nitro-graphql/server-directives
|
|
4
|
+
* This file is only used during build/bundling to prevent import resolution errors.
|
|
5
|
+
* At runtime, Nitro will override this with the actual virtual module.
|
|
6
|
+
*/
|
|
7
|
+
declare const directives: Array<{
|
|
8
|
+
directive: any;
|
|
9
|
+
}>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { directives };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/virtual/server-directives.ts
|
|
2
|
+
/**
|
|
3
|
+
* Virtual module stub for #nitro-graphql/server-directives
|
|
4
|
+
* This file is only used during build/bundling to prevent import resolution errors.
|
|
5
|
+
* At runtime, Nitro will override this with the actual virtual module.
|
|
6
|
+
*/
|
|
7
|
+
const directives = [];
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { directives };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/virtual/server-resolvers.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Virtual module stub for #nitro-graphql/server-resolvers
|
|
4
|
+
* This file is only used during build/bundling to prevent import resolution errors.
|
|
5
|
+
* At runtime, Nitro will override this with the actual virtual module.
|
|
6
|
+
*/
|
|
7
|
+
declare const resolvers: Array<{
|
|
8
|
+
resolver: any;
|
|
9
|
+
}>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { resolvers };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/virtual/server-resolvers.ts
|
|
2
|
+
/**
|
|
3
|
+
* Virtual module stub for #nitro-graphql/server-resolvers
|
|
4
|
+
* This file is only used during build/bundling to prevent import resolution errors.
|
|
5
|
+
* At runtime, Nitro will override this with the actual virtual module.
|
|
6
|
+
*/
|
|
7
|
+
const resolvers = [];
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { resolvers };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/virtual/server-schemas.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Virtual module stub for #nitro-graphql/server-schemas
|
|
4
|
+
* This file is only used during build/bundling to prevent import resolution errors.
|
|
5
|
+
* At runtime, Nitro will override this with the actual virtual module.
|
|
6
|
+
*/
|
|
7
|
+
declare const schemas: Array<{
|
|
8
|
+
def: string;
|
|
9
|
+
}>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { schemas };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/virtual/server-schemas.ts
|
|
2
|
+
/**
|
|
3
|
+
* Virtual module stub for #nitro-graphql/server-schemas
|
|
4
|
+
* This file is only used during build/bundling to prevent import resolution errors.
|
|
5
|
+
* At runtime, Nitro will override this with the actual virtual module.
|
|
6
|
+
*/
|
|
7
|
+
const schemas = [];
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { schemas };
|
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.7",
|
|
5
|
+
"packageManager": "pnpm@10.20.0",
|
|
5
6
|
"description": "GraphQL integration for Nitro",
|
|
6
7
|
"license": "MIT",
|
|
7
8
|
"sideEffects": false,
|
|
@@ -9,6 +10,30 @@
|
|
|
9
10
|
"#graphql/server": {
|
|
10
11
|
"types": "./dist/graphql/server.d.ts",
|
|
11
12
|
"import": "./dist/graphql/server.js"
|
|
13
|
+
},
|
|
14
|
+
"#nitro-graphql/graphql-config": {
|
|
15
|
+
"types": "./dist/virtual/graphql-config.d.ts",
|
|
16
|
+
"import": "./dist/virtual/graphql-config.js"
|
|
17
|
+
},
|
|
18
|
+
"#nitro-graphql/server-schemas": {
|
|
19
|
+
"types": "./dist/virtual/server-schemas.d.ts",
|
|
20
|
+
"import": "./dist/virtual/server-schemas.js"
|
|
21
|
+
},
|
|
22
|
+
"#nitro-graphql/server-resolvers": {
|
|
23
|
+
"types": "./dist/virtual/server-resolvers.d.ts",
|
|
24
|
+
"import": "./dist/virtual/server-resolvers.js"
|
|
25
|
+
},
|
|
26
|
+
"#nitro-graphql/server-directives": {
|
|
27
|
+
"types": "./dist/virtual/server-directives.d.ts",
|
|
28
|
+
"import": "./dist/virtual/server-directives.js"
|
|
29
|
+
},
|
|
30
|
+
"#nitro-graphql/module-config": {
|
|
31
|
+
"types": "./dist/virtual/module-config.d.ts",
|
|
32
|
+
"import": "./dist/virtual/module-config.js"
|
|
33
|
+
},
|
|
34
|
+
"#nitro-graphql/debug-info": {
|
|
35
|
+
"types": "./dist/virtual/debug-info.d.ts",
|
|
36
|
+
"import": "./dist/virtual/debug-info.js"
|
|
12
37
|
}
|
|
13
38
|
},
|
|
14
39
|
"exports": {
|
|
@@ -62,6 +87,21 @@
|
|
|
62
87
|
"files": [
|
|
63
88
|
"dist"
|
|
64
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
|
+
},
|
|
65
105
|
"peerDependencies": {
|
|
66
106
|
"@apollo/server": "^5.0.0",
|
|
67
107
|
"@apollo/utils.withrequired": "^3.0.0",
|
|
@@ -82,59 +122,49 @@
|
|
|
82
122
|
}
|
|
83
123
|
},
|
|
84
124
|
"dependencies": {
|
|
85
|
-
"@apollo/subgraph": "
|
|
86
|
-
"@graphql-codegen/core": "
|
|
87
|
-
"@graphql-codegen/import-types-preset": "
|
|
88
|
-
"@graphql-codegen/typescript": "
|
|
89
|
-
"@graphql-codegen/typescript-generic-sdk": "
|
|
90
|
-
"@graphql-codegen/typescript-operations": "
|
|
91
|
-
"@graphql-codegen/typescript-resolvers": "
|
|
92
|
-
"@graphql-tools/graphql-file-loader": "
|
|
93
|
-
"@graphql-tools/load": "
|
|
94
|
-
"@graphql-tools/load-files": "
|
|
95
|
-
"@graphql-tools/merge": "
|
|
96
|
-
"@graphql-tools/schema": "
|
|
97
|
-
"@graphql-tools/url-loader": "
|
|
98
|
-
"@graphql-tools/utils": "
|
|
99
|
-
"chokidar": "
|
|
100
|
-
"consola": "
|
|
101
|
-
"defu": "
|
|
102
|
-
"graphql-config": "
|
|
103
|
-
"graphql-scalars": "
|
|
104
|
-
"knitwork": "
|
|
105
|
-
"ohash": "
|
|
106
|
-
"oxc-parser": "
|
|
107
|
-
"pathe": "
|
|
108
|
-
"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:"
|
|
109
149
|
},
|
|
110
150
|
"devDependencies": {
|
|
111
|
-
"@antfu/eslint-config": "
|
|
112
|
-
"@nuxt/kit": "
|
|
113
|
-
"@nuxt/schema": "
|
|
114
|
-
"@types/node": "
|
|
115
|
-
"bumpp": "
|
|
116
|
-
"changelogen": "
|
|
117
|
-
"crossws": "
|
|
118
|
-
"eslint": "
|
|
119
|
-
"graphql": "
|
|
120
|
-
"graphql-yoga": "
|
|
121
|
-
"h3": "
|
|
122
|
-
"nitro": "
|
|
123
|
-
"tsdown": "
|
|
124
|
-
"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:",
|
|
165
|
+
"vitepress-plugin-llms": "^1.8.1"
|
|
125
166
|
},
|
|
126
167
|
"resolutions": {
|
|
127
168
|
"nitro-graphql": "link:."
|
|
128
|
-
},
|
|
129
|
-
"scripts": {
|
|
130
|
-
"build": "tsdown",
|
|
131
|
-
"dev": "tsdown --watch",
|
|
132
|
-
"bumpp": "bumpp package.json",
|
|
133
|
-
"release": "pnpm build && pnpm bumpp && pnpm publish --no-git-checks --access public",
|
|
134
|
-
"playground:nitro": "cd playgrounds/nitro && pnpm install && pnpm dev",
|
|
135
|
-
"playground:nuxt": "cd playgrounds/nuxt && pnpm install && pnpm dev",
|
|
136
|
-
"playground:federation": "cd playgrounds/federation && pnpm install && pnpm dev",
|
|
137
|
-
"lint": "eslint .",
|
|
138
|
-
"lint:fix": "eslint . --fix"
|
|
139
169
|
}
|
|
140
|
-
}
|
|
170
|
+
}
|