nitro-graphql 2.0.0-beta.11 → 2.0.0-beta.12
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.js
CHANGED
|
@@ -25,8 +25,8 @@ var src_default = defineNitroModule({
|
|
|
25
25
|
}
|
|
26
26
|
consola.info(`Configured ${nitro.options.graphql.externalServices.length} external GraphQL services`);
|
|
27
27
|
}
|
|
28
|
-
const { getDefaultPaths
|
|
29
|
-
const defaultPaths = getDefaultPaths
|
|
28
|
+
const { getDefaultPaths } = await import("./utils/path-resolver.js");
|
|
29
|
+
const defaultPaths = getDefaultPaths(nitro);
|
|
30
30
|
nitro.graphql ||= {
|
|
31
31
|
buildDir: "",
|
|
32
32
|
watchDirs: [],
|
|
@@ -252,7 +252,7 @@ var src_default = defineNitroModule({
|
|
|
252
252
|
if (nuxtOptions) nuxtOptions.nitroGraphqlExternalServices = nitro.options.graphql?.externalServices || [];
|
|
253
253
|
});
|
|
254
254
|
if (shouldGenerateScaffold(nitro)) {
|
|
255
|
-
const placeholders = getDefaultPaths
|
|
255
|
+
const placeholders = getDefaultPaths(nitro);
|
|
256
256
|
const scaffoldConfig = getScaffoldConfig(nitro);
|
|
257
257
|
const graphqlConfigPath = resolveFilePath(scaffoldConfig.graphqlConfig, scaffoldConfig.enabled, true, "graphql.config.ts", placeholders);
|
|
258
258
|
if (graphqlConfigPath) writeFileIfNotExists(graphqlConfigPath, `
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as h33 from "h3";
|
|
2
2
|
|
|
3
3
|
//#region src/routes/apollo-server.d.ts
|
|
4
|
-
declare const _default:
|
|
4
|
+
declare const _default: h33.EventHandlerWithFetch<h33.EventHandlerRequest, Promise<any>>;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { _default as default };
|
package/dist/routes/debug.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as h31 from "h3";
|
|
2
2
|
|
|
3
3
|
//#region src/routes/debug.d.ts
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@ import * as h35 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: h31.EventHandlerWithFetch<h31.EventHandlerRequest, Promise<string | {
|
|
14
14
|
timestamp: string;
|
|
15
15
|
environment: {
|
|
16
16
|
dev: any;
|
package/dist/routes/debug.js
CHANGED
|
@@ -2,7 +2,7 @@ import { moduleConfig } from "#nitro-graphql/module-config";
|
|
|
2
2
|
import { directives } from "#nitro-graphql/server-directives";
|
|
3
3
|
import { resolvers } from "#nitro-graphql/server-resolvers";
|
|
4
4
|
import { schemas } from "#nitro-graphql/server-schemas";
|
|
5
|
-
import { defineEventHandler, getQuery
|
|
5
|
+
import { defineEventHandler, getQuery } from "h3";
|
|
6
6
|
import { debugInfo } from "#nitro-graphql/debug-info";
|
|
7
7
|
|
|
8
8
|
//#region src/routes/debug.ts
|
|
@@ -15,10 +15,6 @@ import { debugInfo } from "#nitro-graphql/debug-info";
|
|
|
15
15
|
* - /_nitro/graphql/debug?format=json - JSON API
|
|
16
16
|
*/
|
|
17
17
|
var debug_default = defineEventHandler(async (event) => {
|
|
18
|
-
if (!debugInfo.isDev) {
|
|
19
|
-
setResponseHeader(event, "Content-Type", "text/plain");
|
|
20
|
-
return "Debug endpoint is only available in development mode";
|
|
21
|
-
}
|
|
22
18
|
const format = getQuery(event).format || "html";
|
|
23
19
|
const processedResolverFiles = debugInfo.scanned.resolverFiles.map((r) => {
|
|
24
20
|
const parts = r.specifier.split("/");
|
|
@@ -94,10 +90,10 @@ var debug_default = defineEventHandler(async (event) => {
|
|
|
94
90
|
}
|
|
95
91
|
};
|
|
96
92
|
if (format === "json") {
|
|
97
|
-
|
|
93
|
+
event.res.headers.set("Content-Type", "application/json");
|
|
98
94
|
return fullDebugInfo;
|
|
99
95
|
}
|
|
100
|
-
|
|
96
|
+
event.res.headers.set("Content-Type", "text/html");
|
|
101
97
|
return generateHtmlDashboard(fullDebugInfo);
|
|
102
98
|
});
|
|
103
99
|
function generateHtmlDashboard(debugInfo$1) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as h30 from "h3";
|
|
2
2
|
|
|
3
3
|
//#region src/routes/graphql-yoga.d.ts
|
|
4
|
-
declare const _default:
|
|
4
|
+
declare const _default: h30.EventHandlerWithFetch<h30.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 h35 from "h3";
|
|
2
2
|
|
|
3
3
|
//#region src/routes/health.d.ts
|
|
4
|
-
declare const _default:
|
|
4
|
+
declare const _default: h35.EventHandlerWithFetch<h35.EventHandlerRequest, Promise<{
|
|
5
5
|
status: string;
|
|
6
6
|
message: string;
|
|
7
7
|
timestamp: string;
|