nitro-graphql 0.3.3 → 0.4.1

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.
@@ -1,7 +1,7 @@
1
- import * as _nuxt_schema5 from "@nuxt/schema";
1
+ import * as _nuxt_schema7 from "@nuxt/schema";
2
2
 
3
3
  //#region src/ecosystem/nuxt.d.ts
4
4
  interface ModuleOptions {}
5
- declare const _default: _nuxt_schema5.NuxtModule<ModuleOptions, ModuleOptions, false>;
5
+ declare const _default: _nuxt_schema7.NuxtModule<ModuleOptions, ModuleOptions, false>;
6
6
  //#endregion
7
7
  export { ModuleOptions, _default as default };
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 nitropack0 from "nitropack";
3
+ import * as nitropack4 from "nitropack";
4
4
 
5
5
  //#region src/index.d.ts
6
6
  type GraphQLFramework = 'graphql-yoga';
7
- declare const _default: nitropack0.NitroModule;
7
+ declare const _default: nitropack4.NitroModule;
8
8
  //#endregion
9
9
  export { CodegenClientConfig, CodegenServerConfig, GenImport, GraphQLFramework, NitroGraphQLOptions, StandardSchemaV1, _default as default };
@@ -1,6 +1,6 @@
1
- import * as h31 from "h3";
1
+ import * as h35 from "h3";
2
2
 
3
3
  //#region src/routes/apollo-server.d.ts
4
- declare const _default: h31.EventHandler<h31.EventHandlerRequest, any>;
4
+ declare const _default: h35.EventHandler<h35.EventHandlerRequest, any>;
5
5
  //#endregion
6
6
  export { _default as default };
@@ -1,6 +1,6 @@
1
- import * as h33 from "h3";
1
+ import * as h30 from "h3";
2
2
 
3
3
  //#region src/routes/graphql-yoga.d.ts
4
- declare const _default: h33.EventHandler<h33.EventHandlerRequest, Promise<Response>>;
4
+ declare const _default: h30.EventHandler<h30.EventHandlerRequest, Promise<Response>>;
5
5
  //#endregion
6
6
  export { _default as default };
@@ -1,7 +1,7 @@
1
- import * as h36 from "h3";
1
+ import * as h32 from "h3";
2
2
 
3
3
  //#region src/routes/health.d.ts
4
- declare const _default: h36.EventHandler<h36.EventHandlerRequest, Promise<{
4
+ declare const _default: h32.EventHandler<h32.EventHandlerRequest, Promise<{
5
5
  status: string;
6
6
  message: string;
7
7
  timestamp: string;
@@ -105,14 +105,9 @@ async function generateClientTypes(schema, docs, config = {}, outputPath) {
105
105
  useTypeImports: true
106
106
  },
107
107
  presetConfig: { typesPath: "#graphql/client" },
108
- plugins: [
109
- { pluginContent: {} },
110
- { typescriptOperations: {} },
111
- { typescriptGenericSdk: { rawRequest: false } }
112
- ],
108
+ plugins: [{ pluginContent: {} }, { typescriptGenericSdk: { rawRequest: false } }],
113
109
  pluginMap: {
114
110
  pluginContent: { plugin: pluginContent },
115
- typescriptOperations: { plugin: plugin$2 },
116
111
  typescriptGenericSdk: { plugin: plugin$1 }
117
112
  }
118
113
  });
@@ -45,7 +45,7 @@ async function clientTypeGeneration(nitro) {
45
45
  }
46
46
  const graphqlString = readFileSync(schemaFilePath, "utf-8");
47
47
  const schema = buildSchema(graphqlString);
48
- const types = await generateClientTypes(schema, loadDocs);
48
+ const types = await generateClientTypes(schema, loadDocs, nitro.options.graphql?.codegen?.client ?? {});
49
49
  if (types === false) return;
50
50
  const clientTypesPath = resolve(nitro.options.buildDir, "types", "nitro-graphql-client.d.ts");
51
51
  const sdkTypesPath = resolve(nitro.graphql.clientDir, "sdk.ts");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nitro-graphql",
3
3
  "type": "module",
4
- "version": "0.3.3",
4
+ "version": "0.4.1",
5
5
  "description": "GraphQL integration for Nitro",
6
6
  "license": "MIT",
7
7
  "sideEffects": false,