nitro-graphql 1.0.6 → 1.0.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/dist/ecosystem/nuxt.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _nuxt_schema1 from "@nuxt/schema";
|
|
2
2
|
|
|
3
3
|
//#region src/ecosystem/nuxt.d.ts
|
|
4
4
|
interface ModuleOptions {}
|
|
5
|
-
declare const _default:
|
|
5
|
+
declare const _default: _nuxt_schema1.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ModuleOptions, _default as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { StandardSchemaV1 } from "./types/standard-schema.js";
|
|
2
2
|
import { CodegenClientConfig, CodegenServerConfig, GenImport, GenericSdkConfig, NitroGraphQLOptions } from "./types/index.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as nitropack0 from "nitropack";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
interface GraphQLConfig extends Record<string, any> {
|
|
7
|
+
framework: 'graphql-yoga' | 'apollo-server';
|
|
8
|
+
}
|
|
9
|
+
declare const _default: nitropack0.NitroModule;
|
|
8
10
|
//#endregion
|
|
9
|
-
export { CodegenClientConfig, CodegenServerConfig, GenImport, GenericSdkConfig,
|
|
11
|
+
export { CodegenClientConfig, CodegenServerConfig, GenImport, GenericSdkConfig, GraphQLConfig, NitroGraphQLOptions, StandardSchemaV1, _default as default };
|
package/dist/index.js
CHANGED
|
@@ -149,7 +149,9 @@ var src_default = defineNitroModule({
|
|
|
149
149
|
import type { SchemaType } from './nitro-graphql-server.d.ts'
|
|
150
150
|
|
|
151
151
|
declare module 'nitro-graphql' {
|
|
152
|
-
|
|
152
|
+
interface GraphQLConfig {
|
|
153
|
+
framework: '${nitro.options.graphql?.framework || "graphql-yoga"}'
|
|
154
|
+
}
|
|
153
155
|
}
|
|
154
156
|
`;
|
|
155
157
|
writeFileSync(join(typesDir, "graphql.d.ts"), graphqlDtsContent);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as h36 from "h3";
|
|
2
2
|
|
|
3
3
|
//#region src/routes/apollo-server.d.ts
|
|
4
|
-
declare const _default:
|
|
4
|
+
declare const _default: h36.EventHandler<h36.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 h34 from "h3";
|
|
2
2
|
|
|
3
3
|
//#region src/routes/health.d.ts
|
|
4
|
-
declare const _default:
|
|
4
|
+
declare const _default: h34.EventHandler<h34.EventHandlerRequest, Promise<{
|
|
5
5
|
status: string;
|
|
6
6
|
message: string;
|
|
7
7
|
timestamp: string;
|
package/dist/utils/define.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ApolloServerOptions } from "@apollo/server";
|
|
|
2
2
|
import { H3Event } from "h3";
|
|
3
3
|
import { YogaServerOptions } from "graphql-yoga";
|
|
4
4
|
import { Resolvers, ResolversTypes } from "#graphql/server";
|
|
5
|
-
import {
|
|
5
|
+
import { GraphQLConfig, StandardSchemaV1 } from "nitro-graphql";
|
|
6
6
|
|
|
7
7
|
//#region src/utils/define.d.ts
|
|
8
8
|
type Flatten<T> = T extends infer U ? { [K in keyof U]: U[K] } : never;
|
|
@@ -15,7 +15,7 @@ declare function defineQuery(resolvers?: Resolvers['Query']): Resolvers;
|
|
|
15
15
|
declare function defineMutation(resolvers?: Resolvers['Mutation']): Resolvers;
|
|
16
16
|
declare function defineSubscription(resolvers?: Resolvers['Subscription']): Resolvers;
|
|
17
17
|
declare function defineType(resolvers: Resolvers): Resolvers;
|
|
18
|
-
type DefineServerConfig =
|
|
19
|
-
declare function defineGraphQLConfig(config: Partial<DefineServerConfig
|
|
18
|
+
type DefineServerConfig<T extends GraphQLConfig = GraphQLConfig> = T['framework'] extends 'graphql-yoga' ? Partial<YogaServerOptions<H3Event, Partial<H3Event>>> : T['framework'] extends 'apollo-server' ? Partial<ApolloServerOptions<H3Event>> : Partial<YogaServerOptions<H3Event, Partial<H3Event>>> | Partial<ApolloServerOptions<H3Event>>;
|
|
19
|
+
declare function defineGraphQLConfig<T extends GraphQLConfig = GraphQLConfig>(config: Partial<DefineServerConfig<T>>): Partial<DefineServerConfig<T>>;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { DefineServerConfig, ResolverQuery, defineGraphQLConfig, defineMutation, defineQuery, defineResolver, defineSchema, defineSubscription, defineType };
|