nitro-graphql 0.2.1 → 0.2.2

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 CHANGED
@@ -191,6 +191,7 @@ server/
191
191
  │ │ ├── post-queries.resolver.ts # Post query resolvers (use named exports)
192
192
  │ │ └── create-post.resolver.ts # Post mutation resolvers (use named exports)
193
193
  │ └── config.ts # Optional GraphQL configuration
194
+ │ └── schema.ts # Changing Special Return types
194
195
  ```
195
196
 
196
197
  > [!TIP]
@@ -621,6 +622,7 @@ export const postTypes = defineType({
621
622
  You can override schema types if needed. StandardSchema supported — Zod, Valibot, anything works:
622
623
 
623
624
  ```ts
625
+ # server/graphql/schema.ts
624
626
  import { defineSchema } from 'nitro-graphql/utils/define'
625
627
  import { z } from 'zod'
626
628
 
@@ -1,7 +1,7 @@
1
- import * as _nuxt_schema1 from "@nuxt/schema";
1
+ import * as _nuxt_schema4 from "@nuxt/schema";
2
2
 
3
3
  //#region src/ecosystem/nuxt.d.ts
4
4
  interface ModuleOptions {}
5
- declare const _default: _nuxt_schema1.NuxtModule<ModuleOptions, ModuleOptions, false>;
5
+ declare const _default: _nuxt_schema4.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 nitropack5 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: nitropack5.NitroModule;
8
8
  //#endregion
9
9
  export { CodegenClientConfig, CodegenServerConfig, GenImport, GraphQLFramework, NitroGraphQLOptions, StandardSchemaV1, _default as default };
package/dist/index.js CHANGED
@@ -149,7 +149,7 @@ declare module 'nitro-graphql' {
149
149
  types.tsConfig.compilerOptions.paths ??= {};
150
150
  types.tsConfig.compilerOptions.paths["#graphql/server"] = [relativeWithDot(tsconfigDir, join(typesDir, "nitro-graphql-server.d.ts"))];
151
151
  types.tsConfig.compilerOptions.paths["#graphql/client"] = [relativeWithDot(tsconfigDir, join(typesDir, "nitro-graphql-client.d.ts"))];
152
- types.tsConfig.compilerOptions.paths["#graphql/schemas"] = [relativeWithDot(tsconfigDir, join(nitro.graphql.serverDir, "schemas.ts"))];
152
+ types.tsConfig.compilerOptions.paths["#graphql/schema"] = [relativeWithDot(tsconfigDir, join(nitro.graphql.serverDir, "schema.ts"))];
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
  });
@@ -1,6 +1,6 @@
1
- import * as h34 from "h3";
1
+ import * as h30 from "h3";
2
2
 
3
3
  //#region src/routes/graphql-yoga.d.ts
4
- declare const _default: h34.EventHandler<h34.EventHandlerRequest, Promise<Response>>;
4
+ declare const _default: h30.EventHandler<h30.EventHandlerRequest, Promise<Response>>;
5
5
  //#endregion
6
6
  export { _default as default };
@@ -55,7 +55,7 @@ async function generateTypes(schema, config = {}, outputPath) {
55
55
  imports: { plugin: () => {
56
56
  return {
57
57
  prepend: [
58
- `import schemas from '#graphql/schemas'`,
58
+ `import schemas from '#graphql/schema'`,
59
59
  `import type { StandardSchemaV1 } from 'nitro-graphql'`,
60
60
  `
61
61
  export type SchemaType = Partial<Record<Partial<keyof ResolversTypes>, StandardSchemaV1>>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nitro-graphql",
3
3
  "type": "module",
4
- "version": "0.2.1",
4
+ "version": "0.2.2",
5
5
  "description": "GraphQL integration for Nitro",
6
6
  "license": "MIT",
7
7
  "sideEffects": false,