nitro-graphql 0.0.21 → 0.0.23
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 +2 -2
- package/dist/index.js +20 -1
- package/dist/routes/apollo-server.d.ts +2 -2
- package/dist/routes/health.d.ts +2 -2
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { StandardSchemaV1 } from "./types/standard-schema.js";
|
|
2
2
|
import { CodegenClientConfig, CodegenServerConfig, GenImport, NitroGraphQLOptions } from "./types/index.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as nitropack0 from "nitropack";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
|
6
6
|
type GraphQLFramework = 'graphql-yoga';
|
|
7
|
-
declare const _default:
|
|
7
|
+
declare const _default: nitropack0.NitroModule;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { CodegenClientConfig, CodegenServerConfig, GenImport, GraphQLFramework, NitroGraphQLOptions, StandardSchemaV1, _default as default };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { relativeWithDot, scanDefs, scanResolvers } from "./utils/index.js";
|
|
2
2
|
import { clientTypeGeneration, serverTypeGeneration } from "./utils/server-type-generation.js";
|
|
3
3
|
import { rollupConfig } from "./rollup.js";
|
|
4
|
-
import { writeFileSync } from "node:fs";
|
|
4
|
+
import { existsSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
import { watch } from "chokidar";
|
|
7
7
|
import consola from "consola";
|
|
@@ -153,6 +153,25 @@ declare module 'nitro-graphql' {
|
|
|
153
153
|
types.tsConfig.include = types.tsConfig.include || [];
|
|
154
154
|
types.tsConfig.include.push(relativeWithDot(tsconfigDir, join(typesDir, "nitro-graphql-server.d.ts")), relativeWithDot(tsconfigDir, join(typesDir, "nitro-graphql-client.d.ts")), relativeWithDot(tsconfigDir, join(typesDir, "graphql.d.ts")));
|
|
155
155
|
});
|
|
156
|
+
if (!existsSync(join(nitro.options.rootDir, "graphql.config.ts"))) {
|
|
157
|
+
const schemaPath = relativeWithDot(nitro.options.rootDir, resolve(nitro.graphql.buildDir, "schema.graphql"));
|
|
158
|
+
const documentsPath = relativeWithDot(nitro.options.rootDir, resolve(nitro.graphql.clientDir, "**/*.{graphql,js,ts,jsx,tsx}"));
|
|
159
|
+
writeFileSync(join(nitro.options.rootDir, "graphql.config.ts"), `
|
|
160
|
+
import type { IGraphQLConfig } from 'graphql-config'
|
|
161
|
+
|
|
162
|
+
export default <IGraphQLConfig> {
|
|
163
|
+
projects: {
|
|
164
|
+
default: {
|
|
165
|
+
schema: [
|
|
166
|
+
'${schemaPath}',
|
|
167
|
+
],
|
|
168
|
+
documents: [
|
|
169
|
+
'${documentsPath}',
|
|
170
|
+
],
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
}`, "utf-8");
|
|
174
|
+
}
|
|
156
175
|
}
|
|
157
176
|
});
|
|
158
177
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as h31 from "h3";
|
|
2
2
|
|
|
3
3
|
//#region src/routes/apollo-server.d.ts
|
|
4
|
-
declare const _default:
|
|
4
|
+
declare const _default: h31.EventHandler<h31.EventHandlerRequest, any>;
|
|
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 h36 from "h3";
|
|
2
2
|
|
|
3
3
|
//#region src/routes/health.d.ts
|
|
4
|
-
declare const _default:
|
|
4
|
+
declare const _default: h36.EventHandler<h36.EventHandlerRequest, Promise<{
|
|
5
5
|
status: string;
|
|
6
6
|
message: string;
|
|
7
7
|
timestamp: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nitro-graphql",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.23",
|
|
5
5
|
"description": "GraphQL integration for Nitro",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"sideEffects": false,
|
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
"chokidar": "^4.0.3",
|
|
76
76
|
"consola": "^3.4.2",
|
|
77
77
|
"defu": "^6.1.4",
|
|
78
|
+
"graphql-config": "^5.1.5",
|
|
78
79
|
"graphql-scalars": "^1.24.2",
|
|
79
80
|
"knitwork": "^1.2.0",
|
|
80
81
|
"ohash": "^2.0.11",
|