nitro-graphql 1.0.2 → 1.0.3

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,6 +1,6 @@
1
- import * as h34 from "h3";
1
+ import * as h30 from "h3";
2
2
 
3
3
  //#region src/routes/apollo-server.d.ts
4
- declare const _default: h34.EventHandler<h34.EventHandlerRequest, any>;
4
+ declare const _default: h30.EventHandler<h30.EventHandlerRequest, any>;
5
5
  //#endregion
6
6
  export { _default as default };
@@ -1,6 +1,6 @@
1
- import * as h36 from "h3";
1
+ import * as h34 from "h3";
2
2
 
3
3
  //#region src/routes/graphql-yoga.d.ts
4
- declare const _default: h36.EventHandler<h36.EventHandlerRequest, Promise<Response>>;
4
+ declare const _default: h34.EventHandler<h34.EventHandlerRequest, Promise<Response>>;
5
5
  //#endregion
6
6
  export { _default as default };
@@ -1,7 +1,7 @@
1
- import * as h30 from "h3";
1
+ import * as h36 from "h3";
2
2
 
3
3
  //#region src/routes/health.d.ts
4
- declare const _default: h30.EventHandler<h30.EventHandlerRequest, Promise<{
4
+ declare const _default: h36.EventHandler<h36.EventHandlerRequest, Promise<{
5
5
  status: string;
6
6
  message: string;
7
7
  timestamp: string;
@@ -14,7 +14,6 @@ function generateNuxtOfetchClient(clientDir) {
14
14
  if (!existsSync(ofetchPath)) {
15
15
  const ofetchContent = `// This file is auto-generated once by nitro-graphql for quick start
16
16
  // You can modify this file according to your needs
17
- import type { ExecutionResult } from 'graphql'
18
17
  import type { Requester } from './sdk'
19
18
  import { getSdk } from './sdk'
20
19
 
@@ -29,11 +28,9 @@ export function createGraphQLClient(endpoint: string): Requester {
29
28
  'Content-Type': 'application/json',
30
29
  ...headers,
31
30
  },
32
- }) as ExecutionResult
31
+ })
33
32
 
34
- return result.errors?.length
35
- ? Promise.reject(new Error(result.errors[0]?.message || 'GraphQL error'))
36
- : result.data as R
33
+ return result as R
37
34
  }
38
35
  }
39
36
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nitro-graphql",
3
3
  "type": "module",
4
- "version": "1.0.2",
4
+ "version": "1.0.3",
5
5
  "description": "GraphQL integration for Nitro",
6
6
  "license": "MIT",
7
7
  "sideEffects": false,