@leaven-graphql/nestjs 0.1.0 → 0.2.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.
package/dist/types.d.ts CHANGED
@@ -1,13 +1,41 @@
1
1
  /**
2
2
  * @leaven-graphql/nestjs - Type definitions
3
3
  *
4
- * Copyright 2026 Pegasus Heavy Industries LLC
4
+ * Copyright 2026 Joseph Quinn
5
5
  * Licensed under the Apache License, Version 2.0
6
6
  */
7
7
  import type { Type } from '@nestjs/common';
8
8
  import type { ModuleMetadata } from '@nestjs/common/interfaces';
9
9
  import type { GraphQLSchema, DocumentNode } from 'graphql';
10
10
  import type { DocumentCacheConfig } from '@leaven-graphql/core';
11
+ import type { PubSub } from '@leaven-graphql/ws';
12
+ import type { SubscriptionConfig } from './subscriptions';
13
+ /**
14
+ * Injection token for the Leaven module options.
15
+ *
16
+ * Defined in this file (which has no runtime imports) rather than in
17
+ * `module.ts` so that the services registered by `LeavenModule` — which
18
+ * inject this token — can be imported by `module.ts` without creating a
19
+ * circular runtime dependency. The token is re-exported from `./module`
20
+ * so existing `import { LEAVEN_MODULE_OPTIONS } from './module'` sites
21
+ * keep working.
22
+ */
23
+ export declare const LEAVEN_MODULE_OPTIONS = "LEAVEN_MODULE_OPTIONS";
24
+ /**
25
+ * Injection token for the Leaven driver.
26
+ *
27
+ * See {@link LEAVEN_MODULE_OPTIONS} for why this constant lives here and is
28
+ * re-exported from `./module`.
29
+ */
30
+ export declare const LEAVEN_DRIVER = "LEAVEN_DRIVER";
31
+ /**
32
+ * Injection token for the module's shared {@link PubSub} instance, resolved
33
+ * by `@InjectPubSub()`.
34
+ *
35
+ * See {@link LEAVEN_MODULE_OPTIONS} for why this constant lives here and is
36
+ * re-exported from `./module`.
37
+ */
38
+ export declare const LEAVEN_PUBSUB = "LEAVEN_PUBSUB";
11
39
  /**
12
40
  * Configuration options for the Leaven GraphQL module
13
41
  */
@@ -31,18 +59,36 @@ export interface LeavenModuleOptions {
31
59
  resolvers?: Record<string, unknown> | Array<Record<string, unknown>>;
32
60
  /**
33
61
  * Enable auto-schema generation (code-first approach)
34
- * @default true
62
+ *
63
+ * @remarks Not implemented. Leaven has no code-first pipeline, so setting
64
+ * this without also supplying `schema` or `typeDefs` makes
65
+ * `SchemaBuilderService` throw at bootstrap rather than start a server
66
+ * that fails every request. Unset by default, which is why
67
+ * `forRoot({})` boots (with no schema) instead of throwing.
35
68
  */
36
69
  autoSchemaFile?: boolean | string;
37
70
  /**
38
71
  * Sort schema alphabetically
72
+ *
73
+ * @deprecated Has no effect; removal target 0.3.0. Sort the emitted SDL
74
+ * instead by passing `sortSchema` to `generateSchemaFile`.
39
75
  * @default false
40
76
  */
41
77
  sortSchema?: boolean;
42
78
  /**
43
79
  * Build schema options for code-first
80
+ *
81
+ * @deprecated Has no effect; removal target 0.3.0. The code-first pipeline
82
+ * these options describe is not implemented.
44
83
  */
45
84
  buildSchemaOptions?: BuildSchemaOptions;
85
+ /**
86
+ * Plugins to use
87
+ *
88
+ * @deprecated Has no effect; removal target 0.3.0. No plugin host reads
89
+ * this option.
90
+ */
91
+ plugins?: LeavenPlugin[];
46
92
  /**
47
93
  * Enable GraphQL Playground
48
94
  * @default true in development
@@ -71,7 +117,10 @@ export interface LeavenModuleOptions {
71
117
  */
72
118
  metrics?: boolean;
73
119
  /**
74
- * Enable debug mode
120
+ * Enable debug mode.
121
+ *
122
+ * @deprecated Not implemented; setting it has no effect. Accepted only so
123
+ * existing configurations keep compiling.
75
124
  * @default false
76
125
  */
77
126
  debug?: boolean;
@@ -84,40 +133,118 @@ export interface LeavenModuleOptions {
84
133
  */
85
134
  formatError?: FormatErrorFn;
86
135
  /**
87
- * Plugins to use
136
+ * GraphQL-over-WebSocket subscription configuration.
137
+ *
138
+ * Consumed by the `SubscriptionManager` registered by `LeavenModule` to
139
+ * control connection lifecycle hooks (`onConnect`, `onDisconnect`,
140
+ * `onSubscribe`, `onOperation`, `onComplete`), the per-connection context
141
+ * factory, keep-alive behavior, the connection-init timeout, and the
142
+ * maximum number of subscriptions per connection.
88
143
  */
89
- plugins?: LeavenPlugin[];
144
+ subscriptions?: SubscriptionConfig;
145
+ /**
146
+ * PubSub instance shared by the module and resolved by `@InjectPubSub()`.
147
+ *
148
+ * Defaults to a per-module in-memory instance. Supply your own to share
149
+ * one across modules, or to use a distributed engine so that events
150
+ * published on one server instance reach subscribers on another.
151
+ */
152
+ pubSub?: PubSub;
153
+ /**
154
+ * Canonical origin (scheme + authority, e.g. `https://api.example.com`)
155
+ * used to build `request.url` for the context factory.
156
+ *
157
+ * The `Host` header is client-controlled, so it is not trusted to form that
158
+ * URL. When this is unset, a syntactically valid `Host` is used and anything
159
+ * else falls back to the default.
160
+ *
161
+ * @default 'http://localhost'
162
+ */
163
+ publicUrl?: string;
90
164
  /**
91
- * Enable CORS
165
+ * Enable CORS handling on the GraphQL endpoint.
166
+ *
167
+ * Opt-in. While this is unset `GraphQLMiddleware` emits no `Access-Control-*`
168
+ * headers at all and delegates `OPTIONS` preflights to the next handler, so
169
+ * a stock `LeavenModule.forRoot({ schema })` never answers with a wildcard
170
+ * origin. `true` (or an options object that omits `origin`) enables the
171
+ * permissive `Access-Control-Allow-Origin: *`; supply `origin` to narrow it.
172
+ * `false` is equivalent to leaving it unset.
173
+ *
174
+ * @default undefined — no CORS headers are emitted
92
175
  */
93
176
  cors?: boolean | CorsOptions;
94
177
  /**
95
- * Include stack traces in errors (development only)
178
+ * Include stack traces in errors.
179
+ *
180
+ * This is honored in **every** environment, not just development: enabling
181
+ * it also suppresses the production masking that otherwise replaces an
182
+ * unexpected error's message with a generic one (a masked error carries no
183
+ * stack to include, so masking and this option are mutually exclusive).
184
+ * Leave it off in production unless you intend to expose internals.
185
+ *
96
186
  * @default false
97
187
  */
98
188
  includeStacktraceInErrorResponses?: boolean;
99
189
  }
100
190
  /**
101
- * Options for async module configuration
191
+ * Async configuration via a factory function.
102
192
  */
103
- export interface LeavenModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
193
+ export interface LeavenModuleFactoryAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
104
194
  /**
105
- * Existing provider to use
195
+ * Factory function producing the module options
106
196
  */
107
- useExisting?: Type<LeavenOptionsFactory>;
197
+ useFactory: (...args: unknown[]) => Promise<LeavenModuleOptions> | LeavenModuleOptions;
198
+ /**
199
+ * Injection tokens for factory
200
+ */
201
+ inject?: unknown[];
202
+ useClass?: never;
203
+ useExisting?: never;
204
+ }
205
+ /**
206
+ * Async configuration via a class implementing {@link LeavenOptionsFactory},
207
+ * instantiated by the module.
208
+ */
209
+ export interface LeavenModuleClassAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
108
210
  /**
109
211
  * Class to instantiate
110
212
  */
111
- useClass?: Type<LeavenOptionsFactory>;
213
+ useClass: Type<LeavenOptionsFactory>;
214
+ useFactory?: never;
215
+ useExisting?: never;
216
+ /**
217
+ * Ignored for the `useClass` form — the factory class is instantiated by
218
+ * Nest and receives its own constructor injections. Accepted so that
219
+ * configurations carrying an `inject` array keep compiling.
220
+ */
221
+ inject?: unknown[];
222
+ }
223
+ /**
224
+ * Async configuration via an existing provider implementing
225
+ * {@link LeavenOptionsFactory}.
226
+ */
227
+ export interface LeavenModuleExistingAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
112
228
  /**
113
- * Factory function
229
+ * Existing provider to use
114
230
  */
115
- useFactory?: (...args: unknown[]) => Promise<LeavenModuleOptions> | LeavenModuleOptions;
231
+ useExisting: Type<LeavenOptionsFactory>;
232
+ useFactory?: never;
233
+ useClass?: never;
116
234
  /**
117
- * Injection tokens for factory
235
+ * Ignored for the `useExisting` form — the referenced provider is resolved
236
+ * from the container with its own injections. Accepted so that
237
+ * configurations carrying an `inject` array keep compiling.
118
238
  */
119
239
  inject?: unknown[];
120
240
  }
241
+ /**
242
+ * Options for async module configuration.
243
+ *
244
+ * Exactly one of `useFactory`, `useClass`, or `useExisting` must be
245
+ * supplied; `LeavenModule.forRootAsync` throws otherwise.
246
+ */
247
+ export type LeavenModuleAsyncOptions = LeavenModuleFactoryAsyncOptions | LeavenModuleClassAsyncOptions | LeavenModuleExistingAsyncOptions;
121
248
  /**
122
249
  * Factory interface for creating Leaven options
123
250
  */
@@ -125,7 +252,10 @@ export interface LeavenOptionsFactory {
125
252
  createLeavenOptions(): Promise<LeavenModuleOptions> | LeavenModuleOptions;
126
253
  }
127
254
  /**
128
- * Build schema options for code-first approach
255
+ * Build schema options for the code-first approach.
256
+ *
257
+ * @deprecated Has no effect; removal target 0.3.0. Leaven has no code-first
258
+ * schema pipeline, so nothing reads these options.
129
259
  */
130
260
  export interface BuildSchemaOptions {
131
261
  /**
@@ -158,7 +288,19 @@ export interface DirectiveDefinition {
158
288
  args?: Record<string, unknown>;
159
289
  }
160
290
  /**
161
- * Context factory function type
291
+ * Context factory function type.
292
+ *
293
+ * `request` is a Fetch API `Request` under both entry points — `GraphQLMiddleware`
294
+ * adapts the Express request into one specifically so this signature holds — so
295
+ * `request.headers.get()`, `await request.json()`, and `request.url` are always
296
+ * available.
297
+ *
298
+ * `response` is NOT adapted. It is whatever the transport handed the entry
299
+ * point: a Fetch `Response` via `LeavenDriver.handleRequest`, the **Express**
300
+ * response via `GraphQLMiddleware` (where `status` is a method, not a number,
301
+ * and headers are written with `setHeader(name, value)`). Prefer returning
302
+ * values on the context over writing to `response` if the factory has to work
303
+ * behind both.
162
304
  */
163
305
  export type ContextFactory<TContext = Record<string, unknown>> = (request: Request, response: Response) => TContext | Promise<TContext>;
164
306
  /**
@@ -179,6 +321,9 @@ export interface GraphQLFormattedError {
179
321
  }
180
322
  /**
181
323
  * Plugin interface
324
+ *
325
+ * @deprecated Has no effect; removal target 0.3.0. No plugin host consumes
326
+ * these hooks — use NestJS interceptors and guards instead.
182
327
  */
183
328
  export interface LeavenPlugin {
184
329
  name: string;
@@ -189,6 +334,8 @@ export interface LeavenPlugin {
189
334
  }
190
335
  /**
191
336
  * Plugin context
337
+ *
338
+ * @deprecated Has no effect; removal target 0.3.0. See {@link LeavenPlugin}.
192
339
  */
193
340
  export interface PluginContext {
194
341
  request: Request;
@@ -210,7 +357,30 @@ export interface CorsOptions {
210
357
  maxAge?: number;
211
358
  }
212
359
  /**
213
- * Request context passed to resolvers
360
+ * Request context passed to resolvers.
361
+ *
362
+ * `req` and `res` are the **transport's own** request/response objects, and
363
+ * the two shipped entry points do not agree on what those are:
364
+ *
365
+ * - `GraphQLMiddleware` (what `LeavenModule` wires up at `options.path`) stores
366
+ * the **Express** request and response. This is the path where `ctx.req.user`
367
+ * works, because Passport writes `user` onto the Express request.
368
+ * - `LeavenDriver.handleRequest` — an alternative entry point for callers that
369
+ * already hold a Fetch pair, not used by `GraphQLMiddleware` — stores a
370
+ * genuine Fetch `Request`/`Response`. A Fetch `Request` has no `user`
371
+ * property, so `ctx.req.user` is always `undefined` there.
372
+ *
373
+ * The default type parameters name the Fetch types, which describe
374
+ * `handleRequest`. Behind the middleware, parameterize with your framework's
375
+ * types (`GqlContext<ExpressRequest, ExpressResponse>`) instead of relying on
376
+ * the defaults.
377
+ *
378
+ * Code that must work behind either entry point should read values the
379
+ * configured `context` factory placed on the context directly, rather than
380
+ * reaching through `ctx.req`. The factory's first argument is a Fetch
381
+ * `Request` under both entry points (the middleware adapts the Express request
382
+ * for exactly this reason); its second argument is not adapted and is the
383
+ * transport-native response.
214
384
  */
215
385
  export interface GqlContext<TRequest = Request, TResponse = Response> {
216
386
  req: TRequest;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,C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,SAAS,GAAG,QAAQ;IAClE,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,SAAS,CAAC;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,UAAU,CAAC,CAAC,GAAG,UAAU,KAAK,CAAC,CAAC;IAChC,OAAO,CAAC,CAAC,GAAG,OAAO,KAAK,CAAC,CAAC;IAC1B,OAAO,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IAC1C,OAAO,CAAC,CAAC,GAAG,OAAO,KAAK,CAAC,CAAC;CAC3B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leaven-graphql/nestjs",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "description": "NestJS integration for Leaven GraphQL",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -11,14 +11,20 @@
11
11
  "types": "./dist/index.d.ts"
12
12
  }
13
13
  },
14
+ "publishConfig": {
15
+ "access": "public"
16
+ },
14
17
  "files": [
15
18
  "dist",
16
19
  "README.md"
17
20
  ],
18
21
  "dependencies": {
19
- "@leaven-graphql/core": "0.1.0",
20
- "@leaven-graphql/context": "0.1.0",
21
- "@leaven-graphql/errors": "0.1.0"
22
+ "@graphql-tools/schema": "^10.1.0",
23
+ "@leaven-graphql/context": "0.2.1",
24
+ "@leaven-graphql/core": "0.2.1",
25
+ "@leaven-graphql/errors": "0.2.1",
26
+ "@leaven-graphql/playground": "0.2.1",
27
+ "@leaven-graphql/ws": "0.2.1"
22
28
  },
23
29
  "peerDependencies": {
24
30
  "@nestjs/common": ">=10.0.0",
@@ -27,14 +33,15 @@
27
33
  "graphql": "^16.0.0"
28
34
  },
29
35
  "devDependencies": {
30
- "@nestjs/common": "^11.0.20",
31
- "@nestjs/core": "^11.0.20",
32
- "@nestjs/graphql": "^13.0.6",
33
- "@nestjs/testing": "^11.0.20",
36
+ "@lexmata/nestjs-platform-bun": "^0.4.0",
37
+ "@nestjs/common": "^11.2.0",
38
+ "@nestjs/core": "^11.2.0",
39
+ "@nestjs/graphql": "^13.4.4",
40
+ "@nestjs/testing": "^11.2.0",
34
41
  "graphql": "^16.12.0",
35
42
  "reflect-metadata": "^0.2.2",
36
43
  "rxjs": "^7.8.2",
37
- "typescript": "^5.9.3"
44
+ "typescript": "^6.0.0"
38
45
  },
39
46
  "keywords": [
40
47
  "nestjs",
@@ -44,14 +51,14 @@
44
51
  "api"
45
52
  ],
46
53
  "license": "Apache-2.0",
47
- "author": "Pegasus Heavy Industries LLC",
54
+ "author": "Joseph Quinn",
48
55
  "repository": {
49
56
  "type": "git",
50
- "url": "https://github.com/PegasusHeavyIndustries/leaven.git",
57
+ "url": "https://github.com/quinnjr/leaven.git",
51
58
  "directory": "packages/nestjs"
52
59
  },
53
60
  "scripts": {
54
- "build": "bun build ./src/index.ts --outdir ./dist --target bun --external @nestjs/* --external reflect-metadata --external rxjs --external graphql --external class-transformer --external class-validator --external @leaven-graphql/* && tsc -p tsconfig.build.json",
61
+ "build": "bun build ./src/index.ts --outdir ./dist --target bun --packages external && tsc -p tsconfig.build.json",
55
62
  "clean": "rm -rf dist",
56
63
  "test": "bun test",
57
64
  "typecheck": "tsc --noEmit"