nitro-graphql 1.7.0-beta.3 → 1.7.0-beta.5

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 h33 from "h3";
1
+ import * as h31 from "h3";
2
2
 
3
3
  //#region src/routes/apollo-server-ws.d.ts
4
- declare const _default: h33.EventHandler<h33.EventHandlerRequest, never>;
4
+ declare const _default: h31.EventHandler<h31.EventHandlerRequest, never>;
5
5
  //#endregion
6
6
  export { _default as default };
@@ -1,4 +1,4 @@
1
- import * as h39 from "h3";
1
+ import * as h37 from "h3";
2
2
 
3
3
  //#region src/routes/debug.d.ts
4
4
 
@@ -10,7 +10,7 @@ import * as h39 from "h3";
10
10
  * - /_nitro/graphql/debug - HTML dashboard
11
11
  * - /_nitro/graphql/debug?format=json - JSON API
12
12
  */
13
- declare const _default: h39.EventHandler<h39.EventHandlerRequest, Promise<string | {
13
+ declare const _default: h37.EventHandler<h37.EventHandlerRequest, Promise<string | {
14
14
  timestamp: string;
15
15
  environment: {
16
16
  dev: any;
@@ -1,6 +1,6 @@
1
- import * as h37 from "h3";
1
+ import * as h33 from "h3";
2
2
 
3
3
  //#region src/routes/graphql-yoga-ws.d.ts
4
- declare const _default: h37.EventHandler<h37.EventHandlerRequest, never>;
4
+ declare const _default: h33.EventHandler<h33.EventHandlerRequest, never>;
5
5
  //#endregion
6
6
  export { _default as default };
@@ -1,7 +1,7 @@
1
- import * as h31 from "h3";
1
+ import * as h39 from "h3";
2
2
 
3
3
  //#region src/routes/health.d.ts
4
- declare const _default: h31.EventHandler<h31.EventHandlerRequest, Promise<{
4
+ declare const _default: h39.EventHandler<h39.EventHandlerRequest, Promise<{
5
5
  status: string;
6
6
  message: string;
7
7
  timestamp: string;
@@ -58,8 +58,6 @@ type SubscriptionTransport = 'websocket' | 'sse' | 'auto';
58
58
  interface TransportOptions {
59
59
  /** Transport type: 'websocket' (default), 'sse', or 'auto' (WS first, SSE fallback) */
60
60
  transport?: SubscriptionTransport;
61
- /** Shorthand for { transport: 'sse' } */
62
- sse?: boolean;
63
61
  }
64
62
  interface SubscriptionOptions<TVariables = Record<string, unknown>> {
65
63
  query: string;
@@ -564,7 +564,6 @@ function createSession(endpoint, connectionParams, maxRetries, connectionTimeout
564
564
  * Resolve transport type from options
565
565
  */
566
566
  function resolveTransport(options) {
567
- if (options?.sse) return "sse";
568
567
  return options?.transport ?? "websocket";
569
568
  }
570
569
  function createSubscriptionClient(config = {}) {
@@ -380,8 +380,6 @@ export interface UseSubscriptionOptions<T> {
380
380
  onStateChange?: (state: ConnectionState) => void
381
381
  /** Use existing session for multiplexing (pass result from useSubscriptionSession) */
382
382
  session?: UseSubscriptionSessionReturn
383
- /** Use SSE transport instead of WebSocket (shorthand for transport: 'sse') */
384
- sse?: boolean
385
383
  /** Transport type: 'websocket' (default), 'sse', or 'auto' (WS first, SSE fallback) */
386
384
  transport?: SubscriptionTransport
387
385
  }
@@ -439,11 +437,11 @@ function createSubscriptionBuilder<TData>(query: string, variables: unknown): Su
439
437
 
440
438
  export const subscription = {
441
439
  `;
442
- for (const sub of subscriptions) if (sub.hasVariables) output += ` ${sub.name}(variables: Types.${sub.typeName}SubscriptionVariables): SubscriptionBuilder<Types.${sub.typeName}Subscription['${sub.fieldName}']> {
440
+ for (const sub of subscriptions) if (sub.hasVariables) output += ` ${sub.typeName}(variables: Types.${sub.typeName}SubscriptionVariables): SubscriptionBuilder<Types.${sub.typeName}Subscription['${sub.fieldName}']> {
443
441
  return createSubscriptionBuilder<Types.${sub.typeName}Subscription['${sub.fieldName}']>(${sub.typeName}Document, variables)
444
442
  },
445
443
  `;
446
- else output += ` ${sub.name}(): SubscriptionBuilder<Types.${sub.typeName}Subscription['${sub.fieldName}']> {
444
+ else output += ` ${sub.typeName}(): SubscriptionBuilder<Types.${sub.typeName}Subscription['${sub.fieldName}']> {
447
445
  return createSubscriptionBuilder<Types.${sub.typeName}Subscription['${sub.fieldName}']>(${sub.typeName}Document, undefined)
448
446
  },
449
447
  `;
@@ -565,7 +563,6 @@ function createUseSubscription<TData, TVariables = undefined>(
565
563
 
566
564
  // Resolve transport options
567
565
  const transportOptions: TransportOptions = {
568
- sse: options.sse,
569
566
  transport: options.transport,
570
567
  }
571
568
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nitro-graphql",
3
3
  "type": "module",
4
- "version": "1.7.0-beta.3",
4
+ "version": "1.7.0-beta.5",
5
5
  "description": "GraphQL integration for Nitro",
6
6
  "license": "MIT",
7
7
  "repository": {