@nexusts/graphql 0.8.4 → 0.9.0

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,20 +1,3 @@
1
- /**
2
- * `@Arg(name, type?)` parameter decorator.
3
- *
4
- * Declares a method parameter as a GraphQL field argument. Used on
5
- * resolver methods marked with `@Query`/`@Mutation`/`@Subscription`.
6
- *
7
- * @Mutation()
8
- * updateProfile(
9
- * @Arg("name") name: string,
10
- * @Arg("email", "String!") email: string,
11
- * ) { ... }
12
- *
13
- * The optional `type` argument is the SDL type (e.g. `"String!"`,
14
- * `"Int"`, `"[User!]!"`). When omitted, the framework uses `"String"`
15
- * as a safe default — explicit is better than implicit.
16
- */
17
- import "reflect-metadata";
18
1
  export declare function Arg(name: string, type?: string): ParameterDecorator;
19
2
  /** Read `@Arg` metadata for a specific method. */
20
3
  export declare function getMethodArgs(target: object, propertyKey: string | symbol): Array<{
@@ -1,23 +1,3 @@
1
- /**
2
- * `@Query(name?)` / `@Mutation(name?)` / `@Subscription(name?)`
3
- *
4
- * Method decorators that mark a resolver method as a GraphQL operation.
5
- * The optional `name` argument overrides the field name in the schema
6
- * (defaults to the method name).
7
- *
8
- * @Resolver("User")
9
- * class UserResolver {
10
- * @Query("currentUser")
11
- * me() { return ctx.state.user; }
12
- *
13
- * @Mutation()
14
- * updateProfile(@Arg("name") name: string) { ... }
15
- *
16
- * @Subscription()
17
- * events() { return pubsub.asyncIterator("EVENTS"); }
18
- * }
19
- */
20
- import "reflect-metadata";
21
1
  import type { ResolverClassRecord } from "../types.js";
22
2
  export declare const Query: (name?: string, opts?: {
23
3
  returns?: string;
@@ -17,7 +17,6 @@
17
17
  * @Subscription() events() { ... }
18
18
  * }
19
19
  */
20
- import "reflect-metadata";
21
20
  import type { ResolverClassRecord } from "../types.js";
22
21
  export declare function Resolver(typeName?: string): ClassDecorator;
23
22
  /** Return all classes decorated with `@Resolver`. */
@@ -1,32 +1,3 @@
1
- /**
2
- * `GraphQLModule` — drop-in GraphQL endpoint.
3
- *
4
- * @Module({
5
- * imports: [
6
- * GraphQLModule.forRoot({
7
- * typeDefs: `
8
- * type Query { hello: String! }
9
- * `,
10
- * resolvers: {
11
- * Query: {
12
- * hello: () => "world",
13
- * },
14
- * },
15
- * }),
16
- * ],
17
- * })
18
- * export class AppModule {}
19
- *
20
- * After boot, the framework exposes:
21
- *
22
- * POST /graphql — queries + mutations
23
- * GET /graphql — GraphiQL UI (or a query, if `?query=...` is set)
24
- * GET /graphql/schema — the schema as SDL (debug)
25
- *
26
- * Resolvers can also be declared via the `@Resolver` + `@Query` /
27
- * `@Mutation` / `@Subscription` decorators — see the user guide.
28
- */
29
- import "reflect-metadata";
30
1
  import { GraphQLService } from "./graphql.service.js";
31
2
  import type { GraphQLConfig } from "./types.js";
32
3
  export declare class GraphQLModule {
@@ -12,7 +12,6 @@
12
12
  * `graphql` (a peer-dep). If the user hasn't installed it, we
13
13
  * throw a clear error from the first attempt.
14
14
  */
15
- import "reflect-metadata";
16
15
  import type { GraphQLConfig, GraphQLContext, GraphQLExecutionResult, ResolverMap } from "./types.js";
17
16
  interface GraphQLJs {
18
17
  parse: (s: string) => unknown;
package/dist/index.js CHANGED
@@ -26,11 +26,8 @@ var __legacyDecorateClassTS = function(decorators, target, key, desc) {
26
26
  return c > 3 && r && Object.defineProperty(target, key, r), r;
27
27
  };
28
28
  var __require = import.meta.require;
29
- // packages/graphql/src/graphql.service.ts
30
- import"reflect-metadata";
31
-
32
29
  // packages/graphql/src/decorators/resolver.ts
33
- import"reflect-metadata";
30
+ import { safeGetMeta, safeDefineMeta, safeHasMeta } from "@nexusts/core/di/safe-reflect";
34
31
  var RESOLVER_KEY = Symbol.for("nexus:GraphQL:Resolver");
35
32
  var FIELDS_KEY = Symbol.for("nexus:GraphQL:Fields");
36
33
  var TYPENAME_KEY = Symbol.for("nexus:GraphQL:TypeName");
@@ -39,10 +36,10 @@ function Resolver(typeName) {
39
36
  return (target) => {
40
37
  const ctor = target;
41
38
  const inferred = typeName ?? ctor.name.replace(/Resolver$/, "");
42
- Reflect.defineMetadata(RESOLVER_KEY, true, ctor);
43
- Reflect.defineMetadata(TYPENAME_KEY, inferred, ctor);
44
- if (!Reflect.hasMetadata(FIELDS_KEY, ctor)) {
45
- Reflect.defineMetadata(FIELDS_KEY, [], ctor);
39
+ safeDefineMeta(RESOLVER_KEY, true, ctor);
40
+ safeDefineMeta(TYPENAME_KEY, inferred, ctor);
41
+ if (!safeHasMeta(FIELDS_KEY, ctor)) {
42
+ safeDefineMeta(FIELDS_KEY, [], ctor);
46
43
  }
47
44
  _resolverRegistry.add(ctor);
48
45
  };
@@ -55,7 +52,7 @@ function clearResolverRegistry() {
55
52
  }
56
53
  function getResolverTypeName(target) {
57
54
  const t = target.prototype ?? target;
58
- const fromMeta = Reflect.getMetadata(TYPENAME_KEY, t);
55
+ const fromMeta = safeGetMeta(TYPENAME_KEY, t);
59
56
  if (fromMeta)
60
57
  return fromMeta;
61
58
  const ctor = t.constructor;
@@ -63,36 +60,33 @@ function getResolverTypeName(target) {
63
60
  }
64
61
  function pushResolverField(target, field) {
65
62
  const t = target.prototype ?? target;
66
- const list = Reflect.getMetadata(FIELDS_KEY, t) ?? [];
63
+ const list = safeGetMeta(FIELDS_KEY, t) ?? [];
67
64
  list.push(field);
68
- Reflect.defineMetadata(FIELDS_KEY, list, t);
65
+ safeDefineMeta(FIELDS_KEY, list, t);
69
66
  }
70
67
  function getResolverFields(target) {
71
68
  const t = target.prototype ?? target;
72
- return Reflect.getMetadata(FIELDS_KEY, t) ?? [];
69
+ return safeGetMeta(FIELDS_KEY, t) ?? [];
73
70
  }
74
71
  function isResolverClass(target) {
75
72
  const t = target.prototype ?? target;
76
- return Reflect.getMetadata(RESOLVER_KEY, t) === true;
73
+ return safeGetMeta(RESOLVER_KEY, t) === true;
77
74
  }
78
- // packages/graphql/src/decorators/query.ts
79
- import"reflect-metadata";
80
-
81
75
  // packages/graphql/src/decorators/arg.ts
82
- import"reflect-metadata";
76
+ import { safeGetMeta as safeGetMeta2, safeDefineMeta as safeDefineMeta2 } from "@nexusts/core/di/safe-reflect";
83
77
  var ARGS_KEY = Symbol.for("nexus:GraphQL:MethodArgs");
84
78
  function Arg(name, type = "String") {
85
79
  return (target, propertyKey, parameterIndex) => {
86
80
  if (propertyKey === undefined) {
87
81
  throw new Error("@Arg() can only decorate method parameters, not constructor parameters.");
88
82
  }
89
- const list = Reflect.getMetadata(ARGS_KEY, target, propertyKey) ?? [];
83
+ const list = safeGetMeta2(ARGS_KEY, target, propertyKey) ?? [];
90
84
  list.push({ name, type, index: parameterIndex });
91
- Reflect.defineMetadata(ARGS_KEY, list, target, propertyKey);
85
+ safeDefineMeta2(ARGS_KEY, list, target, propertyKey);
92
86
  };
93
87
  }
94
88
  function getMethodArgs(target, propertyKey) {
95
- return Reflect.getMetadata(ARGS_KEY, target, propertyKey) ?? [];
89
+ return safeGetMeta2(ARGS_KEY, target, propertyKey) ?? [];
96
90
  }
97
91
 
98
92
  // packages/graphql/src/decorators/query.ts
@@ -355,7 +349,6 @@ function wrapSchemaWithResolvers(schema, resolvers) {
355
349
  return schema;
356
350
  }
357
351
  // packages/graphql/src/graphql.module.ts
358
- import"reflect-metadata";
359
352
  import { Module } from "@nexusts/core";
360
353
  class GraphQLModule {
361
354
  static forRoot(config) {
@@ -539,5 +532,5 @@ export {
539
532
  Arg
540
533
  };
541
534
 
542
- //# debugId=CEE0044850E830D864756E2164756E21
535
+ //# debugId=B30BF2D35C2162C164756E2164756E21
543
536
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../src/graphql.service.ts", "../src/decorators/resolver.ts", "../src/decorators/query.ts", "../src/decorators/arg.ts", "../src/decorators/type-mapper.ts", "../src/graphql.module.ts"],
3
+ "sources": ["../src/decorators/resolver.ts", "../src/decorators/arg.ts", "../src/decorators/query.ts", "../src/decorators/type-mapper.ts", "../src/graphql.service.ts", "../src/graphql.module.ts"],
4
4
  "sourcesContent": [
5
- "/**\n * `GraphQLService` — owns the parsed schema, resolver map, and an\n * end-to-end executor.\n *\n * Most users won't instantiate this directly — they use\n * `GraphQLModule.forRoot({ typeDefs, resolvers, ... })` which puts\n * a singleton service into the DI container. The service is also\n * exported for advanced users (programmatic queries, schema\n * introspection, custom executors).\n *\n * The actual `parse` / `validate` / `execute` calls go to\n * `graphql` (a peer-dep). If the user hasn't installed it, we\n * throw a clear error from the first attempt.\n */\nimport \"reflect-metadata\";\nimport type {\n\tGraphQLConfig,\n\tGraphQLContext,\n\tGraphQLExecutionResult,\n\tFieldResolver,\n\tResolverMap,\n} from \"./types.js\";\nimport { getRegisteredResolvers, getResolverFields } from \"./decorators/index.js\";\nimport { normalizeGQLType } from \"./decorators/type-mapper.js\";\n\ninterface GraphQLJs {\n\tparse: (s: string) => unknown;\n\tbuildSchema: (sdl: string) => unknown;\n\tvalidate: (schema: unknown, doc: unknown, rules?: unknown) => unknown[];\n\t// graphql 16 takes positional args; graphql 17 takes a single\n\t// object. We always call it with the 16-style positional args\n\t// (so we wrap a `buildSchema` schema, not the resolver-builder\n\t// schema), but the type reflects both possibilities.\n\texecute: (...args: any[]) => Promise<GraphQLExecutionResult> | GraphQLExecutionResult;\n\tspecifiedRules?: unknown;\n\tgetOperationAST?: (doc: unknown, operationName?: string) => unknown;\n\tGraphQLSchema: unknown;\n\tGraphQLObjectType: unknown;\n\tGraphQLString: unknown;\n\tGraphQLNonNull: unknown;\n\tGraphQLList: unknown;\n\tGraphQLInt: unknown;\n\tGraphQLFloat: unknown;\n\tGraphQLBoolean: unknown;\n\tGraphQLID: unknown;\n\tGraphQLError: unknown;\n\tGraphQLScalarType: unknown;\n\tparseType: (s: string) => unknown;\n\tGraphQLSchemaConfig: unknown;\n}\n\nlet _graphql: GraphQLJs | null = null;\nlet _loadAttempted = false;\n\n/** Lazy-load the `graphql` package. Throws a clear error if missing. */\nexport async function loadGraphQLJs(): Promise<GraphQLJs> {\n\tif (_graphql) return _graphql;\n\tif (_loadAttempted) {\n\t\tthrow new Error(\n\t\t\t\"[nexusjs/graphql] The optional `graphql` package failed to load. \" +\n\t\t\t\t\"Install it with `bun add graphql` to use the GraphQL module.\",\n\t\t);\n\t}\n\t_loadAttempted = true;\n\ttry {\n\t\tconst mod = (await import(\"graphql\")) as unknown as GraphQLJs;\n\t\t_graphql = mod;\n\t\treturn mod;\n\t} catch (err) {\n\t\tthrow new Error(\n\t\t\t\"[nexusjs/graphql] The `graphql` package is required for execution. \" +\n\t\t\t\t\"Install it with `bun add graphql`. \" +\n\t\t\t\t\"Original error: \" + (err as Error).message,\n\t\t);\n\t}\n}\n\nexport class GraphQLService {\n\t/** The raw config the module was booted with. */\n\treadonly config: GraphQLConfig;\n\t/** Optional DI handle. */\n\tstatic readonly TOKEN = Symbol.for(\"nexus:GraphQL\");\n\n\tconstructor(config: GraphQLConfig = {}) {\n\t\tthis.config = {\n\t\t\tplayground: \"graphiql\",\n\t\t\tendpoint: { path: \"/graphql\", enableGet: true },\n\t\t\texposeSchemaSDL: true,\n\t\t\tintrospection: true,\n\t\t\t...config,\n\t\t};\n\t}\n\n\tprivate _schema: any = null;\n\tprivate _resolvers: ResolverMap = {};\n\tprivate _bootstrapPromise: Promise<void> | null = null;\n\n\t/**\n\t * Register a resolver map (or add to the existing one). Safe to\n\t * call multiple times — the maps are merged.\n\t */\n\taddResolvers(map: ResolverMap): void {\n\t\tfor (const [typeName, fields] of Object.entries(map)) {\n\t\t\tthis._resolvers[typeName] = {\n\t\t\t\t...this._resolvers[typeName],\n\t\t\t\t...fields,\n\t\t\t};\n\t\t}\n\t}\n\n\tprivate async _buildSchema(sdl: string[]): Promise<any> {\n\t\tconst g = await loadGraphQLJs();\n\t\tconst merged = this.mergeSDLWithDecorators(sdl);\n\t\t// graphql-js's `buildSchema` produces a `GraphQLSchema` whose\n\t\t// fields' `resolve` is `undefined` by default — graphql-js's\n\t\t// execution layer looks up fields on the parent object in\n\t\t// that case. To wire our `ResolverMap`, we set each field's\n\t\t// `resolve` directly. This works for graphql 16 and 17.\n\t\tconst schema = (g.buildSchema as Function)(merged);\n\t\t// Deep-merge resolver maps: auto-wired < addResolvers() < config.resolvers.\n\t\t// Shallow spread would clobber an entire type object (e.g. the Query key)\n\t\t// when two sources contribute fields to the same type.\n\t\tconst autoWired = this.config.autoSchema ? this._autoWireResolvers() : {};\n\t\tconst final = mergeResolverMaps(autoWired, this._resolvers, this.config.resolvers ?? {});\n\t\twrapSchemaWithResolvers(schema, final);\n\t\treturn schema;\n\t}\n\n\t/**\n\t * Instantiate each registered `@Resolver` class and map its `@Query` /\n\t * `@Mutation` / `@Subscription` methods into a `ResolverMap`.\n\t *\n\t * For methods decorated with `@Arg`, positional arguments are extracted\n\t * from the graphql-js `args` object by name and forwarded positionally.\n\t * For methods without `@Arg`, the standard graphql-js 4-tuple\n\t * `(parent, args, ctx, info)` is passed through unchanged.\n\t */\n\tprivate _autoWireResolvers(): ResolverMap {\n\t\tconst map: ResolverMap = {};\n\t\tfor (const resolverClass of getRegisteredResolvers()) {\n\t\t\tconst fields = getResolverFields(resolverClass);\n\t\t\tconst instance = new (resolverClass as any)();\n\t\t\tfor (const f of fields) {\n\t\t\t\tlet typeName: string;\n\t\t\t\tif (f.kind === \"query\") typeName = \"Query\";\n\t\t\t\telse if (f.kind === \"mutation\") typeName = \"Mutation\";\n\t\t\t\telse typeName = \"Subscription\";\n\n\t\t\t\tif (!map[typeName]) map[typeName] = {};\n\n\t\t\t\tconst method = (instance as any)[f.propertyKey];\n\t\t\t\tif (typeof method !== \"function\") continue;\n\n\t\t\t\tconst argNames = f.args.map((a) => a.name);\n\t\t\t\tif (argNames.length === 0) {\n\t\t\t\t\t// No @Arg — pass graphql-js 4-tuple as-is.\n\t\t\t\t\tmap[typeName][f.name] = (parent: any, args: any, ctx: any, info: any) =>\n\t\t\t\t\t\tmethod.call(instance, parent, args, ctx, info);\n\t\t\t\t} else {\n\t\t\t\t\t// @Arg present — extract each value from the args object by\n\t\t\t\t\t// name and call the method with positional parameters.\n\t\t\t\t\tmap[typeName][f.name] = (_parent: any, args: any) => {\n\t\t\t\t\t\tconst positional = argNames.map((n) => args[n]);\n\t\t\t\t\t\treturn method.call(instance, ...positional);\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}\n\n\t/**\n\t * Build (or rebuild) the underlying GraphQL schema. Idempotent.\n\t * Returns the `graphql` schema instance.\n\t */\n\tasync ensureSchema(): Promise<any> {\n\t\tif (this._schema) return this._schema;\n\t\tif (this._bootstrapPromise) return this._bootstrapPromise.then(() => this._schema);\n\t\tthis._bootstrapPromise = (async () => {\n\t\t\tconst sdl = this.normaliseTypeDefs(this.config.typeDefs);\n\t\t\tconst autoSchema = this.config.autoSchema ?? false;\n\t\t\tconst hasResolvers = getRegisteredResolvers().length > 0;\n\n\t\t\tif (sdl.length === 0 && !autoSchema && !hasResolvers) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"[nexusjs/graphql] No typeDefs configured. \" +\n\t\t\t\t\t\t\"Pass `typeDefs: '...'` to GraphQLModule.forRoot(), \" +\n\t\t\t\t\t\t\"or set `autoSchema: true` and use `@Resolver` + `@Query` / `@Mutation` decorators.\",\n\t\t\t\t);\n\t\t\t}\n\t\t\tthis._schema = await this._buildSchema(sdl);\n\t\t})();\n\t\tawait this._bootstrapPromise;\n\t\treturn this._schema;\n\t}\n\n\t/**\n\t * Validate + execute a GraphQL document. Returns the raw\n\t * `execute()` result envelope (data, errors, extensions).\n\t */\n\tasync execute(\n\t\tsource: string,\n\t\tvariableValues: Record<string, unknown> = {},\n\t\toperationName?: string,\n\t\tcontextValue?: GraphQLContext,\n\t): Promise<GraphQLExecutionResult> {\n\t\tconst g = await loadGraphQLJs();\n\t\tconst schema = await this.ensureSchema();\n\t\tconst document = (g.parse as Function)(source);\n\t\tconst errors = (g.validate as Function)(schema, document, g.specifiedRules) as unknown[];\n\t\tif (errors.length > 0) {\n\t\t\treturn {\n\t\t\t\terrors: (errors as any[]).map((e: any) => ({\n\t\t\t\t\tmessage: e.message,\n\t\t\t\t\tlocations: e.locations,\n\t\t\t\t})),\n\t\t\t};\n\t\t}\n\t\t// If the user didn't pass a context and the service has a\n\t\t// `context()` factory, build a synthetic context (with a\n\t\t// stub Hono ctx) so resolvers that depend on `ctx.state` work\n\t\t// in `execute()` calls outside of an HTTP request.\n\t\tlet ctx = contextValue;\n\t\tif (!ctx && this.config.context) {\n\t\t\tconst fakeHono = { req: { url: \"\", method: \"EXECUTE\", header: () => \"\" } };\n\t\t\tctx = {\n\t\t\t\thono: fakeHono as any,\n\t\t\t\tstate: await this.config.context(fakeHono as any),\n\t\t\t};\n\t\t}\n\t\tconst rootValue = undefined;\n\t\treturn await (g.execute as any)({\n\t\t\tschema,\n\t\t\tdocument,\n\t\t\trootValue,\n\t\t\tcontextValue: ctx,\n\t\t\tvariableValues,\n\t\t\toperationName,\n\t\t});\n\t}\n\n\t/**\n\t * Produce a `GraphQLContext` from an inbound Hono request.\n\t * Calls the user's `context()` factory if provided.\n\t */\n\tasync buildContext(c: any): Promise<GraphQLContext> {\n\t\tconst state = this.config.context\n\t\t\t? await this.config.context(c)\n\t\t\t: {};\n\t\treturn { hono: c, state };\n\t}\n\n\t/**\n\t * Read the parsed SDL back as a string. Useful for the\n\t * `/graphql/schema` debug endpoint and for tests.\n\t */\n\tgetSchemaSDL(): string {\n\t\treturn this.normaliseTypeDefs(this.config.typeDefs).join(\"\\n\");\n\t}\n\n\tprivate normaliseTypeDefs(td?: string | string[]): string[] {\n\t\tif (!td) return [];\n\t\treturn Array.isArray(td) ? td : [td];\n\t}\n\n\t/**\n\t * Synthesise SDL snippets from `@Resolver` / `@Query` / `@Mutation` /\n\t * `@Subscription` decorator metadata and merge them with any\n\t * user-supplied `typeDefs`.\n\t *\n\t * - If the user's SDL already defines `type Query`, decorator-added\n\t * fields are appended with `extend type Query { ... }` to avoid\n\t * duplicate-type errors.\n\t * - Unknown return types or argument types are passed through as-is\n\t * (they are treated as user-defined object types).\n\t */\n\tprivate mergeSDLWithDecorators(sdl: string[]): string {\n\t\tconst registered = getRegisteredResolvers();\n\t\tif (registered.length === 0) return sdl.join(\"\\n\");\n\n\t\tconst queryFields: string[] = [];\n\t\tconst mutationFields: string[] = [];\n\t\tconst subscriptionFields: string[] = [];\n\n\t\tfor (const resolverClass of registered) {\n\t\t\tconst fields = getResolverFields(resolverClass);\n\t\t\tfor (const f of fields) {\n\t\t\t\tconst argStr =\n\t\t\t\t\tf.args.length > 0\n\t\t\t\t\t\t? `(${f.args.map((a) => `${a.name}: ${normalizeGQLType(a.type)}`).join(\", \")})`\n\t\t\t\t\t\t: \"\";\n\t\t\t\tconst line = ` ${f.name}${argStr}: ${normalizeGQLType(f.returnTypeName)}`;\n\t\t\t\tif (f.kind === \"query\") queryFields.push(line);\n\t\t\t\telse if (f.kind === \"mutation\") mutationFields.push(line);\n\t\t\t\telse if (f.kind === \"subscription\") subscriptionFields.push(line);\n\t\t\t}\n\t\t}\n\n\t\tconst userSDL = sdl.join(\"\\n\");\n\t\tconst generated: string[] = [];\n\n\t\tif (queryFields.length > 0) {\n\t\t\tconst keyword = /type\\s+Query\\s*\\{/.test(userSDL) ? \"extend type\" : \"type\";\n\t\t\tgenerated.push(`${keyword} Query {\\n${queryFields.join(\"\\n\")}\\n}`);\n\t\t}\n\t\tif (mutationFields.length > 0) {\n\t\t\tconst keyword = /type\\s+Mutation\\s*\\{/.test(userSDL) ? \"extend type\" : \"type\";\n\t\t\tgenerated.push(`${keyword} Mutation {\\n${mutationFields.join(\"\\n\")}\\n}`);\n\t\t}\n\t\tif (subscriptionFields.length > 0) {\n\t\t\tconst keyword = /type\\s+Subscription\\s*\\{/.test(userSDL) ? \"extend type\" : \"type\";\n\t\t\tgenerated.push(`${keyword} Subscription {\\n${subscriptionFields.join(\"\\n\")}\\n}`);\n\t\t}\n\n\t\treturn [userSDL, ...generated].filter(Boolean).join(\"\\n\");\n\t}\n}\n\n/** Deep-merge multiple `ResolverMap`s. Later entries win at the field level. */\nfunction mergeResolverMaps(...maps: ResolverMap[]): ResolverMap {\n\tconst result: ResolverMap = {};\n\tfor (const map of maps) {\n\t\tfor (const [typeName, fields] of Object.entries(map)) {\n\t\t\tresult[typeName] = { ...result[typeName], ...fields };\n\t\t}\n\t}\n\treturn result;\n}\n\n/**\n * Wrap a parsed schema with the user's resolver map. graphql-js's\n * `buildSchema` produces a schema with default resolvers (which look\n * up fields on the `rootValue`). For our use case, we want field-level\n * resolvers that pull from the registered `ResolverMap`.\n */\nfunction wrapSchemaWithResolvers(schema: any, resolvers: ResolverMap): any {\n\t// graphql-js schemas are immutable. We replace the resolver map\n\t// via a tiny proxy: when a field is queried, graphql-js's default\n\t// resolver calls our `defaultFieldResolver` (which simply looks\n\t// up the value in the parent). To wire our resolvers, we set\n\t// each field's `resolve` to the entry from the resolver map.\n\tconst typeMap = schema.getTypeMap?.() ?? {};\n\tfor (const [typeName, fields] of Object.entries(resolvers)) {\n\t\tconst type = typeMap[typeName];\n\t\tif (!type || typeof type.getFields !== \"function\") continue;\n\t\tconst fieldMap = type.getFields();\n\t\tfor (const [fieldName, resolver] of Object.entries(fields)) {\n\t\t\tconst field = fieldMap[fieldName];\n\t\t\tif (!field) continue;\n\t\t\tconst fn: FieldResolver =\n\t\t\t\ttypeof resolver === \"function\"\n\t\t\t\t\t? (resolver as FieldResolver)\n\t\t\t\t\t: ((resolver as { resolve: FieldResolver }).resolve as FieldResolver);\n\t\t\tfield.resolve = function (parent: any, args: any, ctx: any, info: any) {\n\t\t\t\treturn fn(parent, args, ctx, info);\n\t\t\t};\n\t\t}\n\t}\n\treturn schema;\n}\n",
6
- "/**\n * @Resolver(typeName?) decorator.\n *\n * Marks a class as a GraphQL resolver. The optional `typeName` argument\n * declares the GraphQL type this class is responsible for. If\n * omitted, the type name defaults to the class name (e.g.\n * `UserResolver` type `User`).\n *\n * The framework's GraphQL scanner picks up every class with this\n * decorator and reads the field methods off it (decorators from\n * `./query.js`, `./mutation.js`, `./subscription.js`).\n *\n * @Resolver(\"User\")\n * class UserResolver {\n * @Query() me() { ... }\n * @Mutation() signup(@Arg(\"email\") e: string) { ... }\n * @Subscription() events() { ... }\n * }\n */\nimport \"reflect-metadata\";\nimport type { ResolverClassRecord } from \"../types.js\";\n\nconst RESOLVER_KEY = Symbol.for(\"nexus:GraphQL:Resolver\");\nconst FIELDS_KEY = Symbol.for(\"nexus:GraphQL:Fields\");\nconst TYPENAME_KEY = Symbol.for(\"nexus:GraphQL:TypeName\");\n\n// Global registry of all @Resolver-decorated classes. Populated at\n// decorator evaluation time so the SDL synthesiser can enumerate them\n// without needing a separate scan pass.\nconst _resolverRegistry = new Set<Function>();\n\nexport function Resolver(typeName?: string): ClassDecorator {\n\treturn (target: Function) => {\n\t\tconst ctor = target as unknown as new (...args: any[]) => any;\n\t\tconst inferred = typeName ?? ctor.name.replace(/Resolver$/, \"\");\n\t\tReflect.defineMetadata(RESOLVER_KEY, true, ctor);\n\t\tReflect.defineMetadata(TYPENAME_KEY, inferred, ctor);\n\t\tif (!Reflect.hasMetadata(FIELDS_KEY, ctor)) {\n\t\t\tReflect.defineMetadata(FIELDS_KEY, [], ctor);\n\t\t}\n\t\t_resolverRegistry.add(ctor);\n\t};\n}\n\n/** Return all classes decorated with `@Resolver`. */\nexport function getRegisteredResolvers(): Function[] {\n\treturn [..._resolverRegistry];\n}\n\n/** Remove all entries from the registry. Intended for use in tests only. */\nexport function clearResolverRegistry(): void {\n\t_resolverRegistry.clear();\n}\n\n/** Read the type-name this resolver is for. */\nexport function getResolverTypeName(target: object): string | undefined {\n\tconst t = (target as { prototype?: object }).prototype ?? target;\n\tconst fromMeta = Reflect.getMetadata(TYPENAME_KEY, t);\n\tif (fromMeta) return fromMeta as string;\n\t// Fallback: derive from the class name (drop \"Resolver\" suffix).\n\tconst ctor = (t as { constructor?: { name: string } }).constructor;\n\treturn ctor?.name.replace(/Resolver$/, \"\");\n}\n\n/** Append a field method to the resolver class's metadata. */\nexport function pushResolverField(\n\ttarget: object,\n\tfield: ResolverClassRecord[\"fields\"][number],\n): void {\n\tconst t = (target as { prototype?: object }).prototype ?? target;\n\tconst list = (Reflect.getMetadata(FIELDS_KEY, t) as ResolverClassRecord[\"fields\"]) ?? [];\n\tlist.push(field);\n\tReflect.defineMetadata(FIELDS_KEY, list, t);\n}\n\n/** Read the field metadata for a resolver class. */\nexport function getResolverFields(target: object): ResolverClassRecord[\"fields\"] {\n\tconst t = (target as { prototype?: object }).prototype ?? target;\n\treturn (Reflect.getMetadata(FIELDS_KEY, t) as ResolverClassRecord[\"fields\"]) ?? [];\n}\n\n/** True if `target` was decorated with `@Resolver`. */\nexport function isResolverClass(target: object): boolean {\n\tconst t = (target as { prototype?: object }).prototype ?? target;\n\treturn Reflect.getMetadata(RESOLVER_KEY, t) === true;\n}\n",
7
- "/**\n * `@Query(name?)` / `@Mutation(name?)` / `@Subscription(name?)`\n *\n * Method decorators that mark a resolver method as a GraphQL operation.\n * The optional `name` argument overrides the field name in the schema\n * (defaults to the method name).\n *\n * @Resolver(\"User\")\n * class UserResolver {\n * @Query(\"currentUser\")\n * me() { return ctx.state.user; }\n *\n * @Mutation()\n * updateProfile(@Arg(\"name\") name: string) { ... }\n *\n * @Subscription()\n * events() { return pubsub.asyncIterator(\"EVENTS\"); }\n * }\n */\nimport \"reflect-metadata\";\nimport { pushResolverField } from \"./resolver.js\";\nimport { getMethodArgs } from \"./arg.js\";\nimport type { ResolverClassRecord } from \"../types.js\";\n\ntype OperationKind = \"query\" | \"mutation\" | \"subscription\";\n\n/**\n * Common implementation. `decorator` is a factory the user calls as\n * `@Query(name?, opts?)` / `@Mutation(name?, opts?)` etc.\n *\n * `opts.returns` — explicit GraphQL return type string, e.g. `\"String!\"`.\n * Defaults to `\"JSON\"` when omitted (safe fallback; set explicitly for\n * code-first schemas that use `autoSchema: true`).\n */\nfunction makeOperationDecorator(kind: OperationKind) {\n\treturn function (name?: string, opts?: { returns?: string }) {\n\t\treturn (\n\t\t\ttarget: object,\n\t\t\tpropertyKey: string | symbol,\n\t\t\t_descriptor: TypedPropertyDescriptor<any>,\n\t\t): void => {\n\t\t\tconst argsMeta = getMethodArgs(target, propertyKey);\n\t\t\tpushResolverField(target, {\n\t\t\t\tpropertyKey: String(propertyKey),\n\t\t\t\tkind,\n\t\t\t\tname: name ?? String(propertyKey),\n\t\t\t\treturnTypeName: opts?.returns ?? \"JSON\",\n\t\t\t\targs: argsMeta\n\t\t\t\t\t.sort((a, b) => a.index - b.index)\n\t\t\t\t\t.map((a) => ({ name: a.name, type: a.type })),\n\t\t\t});\n\t\t};\n\t};\n}\n\nexport const Query = makeOperationDecorator(\"query\");\nexport const Mutation = makeOperationDecorator(\"mutation\");\nexport const Subscription = makeOperationDecorator(\"subscription\");\n\n/** Public helper for the scanner. */\nexport type AnyField = ResolverClassRecord[\"fields\"][number];\n",
8
- "/**\n * `@Arg(name, type?)` parameter decorator.\n *\n * Declares a method parameter as a GraphQL field argument. Used on\n * resolver methods marked with `@Query`/`@Mutation`/`@Subscription`.\n *\n * @Mutation()\n * updateProfile(\n * @Arg(\"name\") name: string,\n * @Arg(\"email\", \"String!\") email: string,\n * ) { ... }\n *\n * The optional `type` argument is the SDL type (e.g. `\"String!\"`,\n * `\"Int\"`, `\"[User!]!\"`). When omitted, the framework uses `\"String\"`\n * as a safe default — explicit is better than implicit.\n */\nimport \"reflect-metadata\";\nimport { pushResolverField, getResolverTypeName } from \"./resolver.js\";\n\nconst ARGS_KEY = Symbol.for(\"nexus:GraphQL:MethodArgs\");\n\nexport function Arg(name: string, type: string = \"String\"): ParameterDecorator {\n\treturn (\n\t\ttarget: object,\n\t\tpropertyKey: string | symbol | undefined,\n\t\tparameterIndex: number,\n\t) => {\n\t\tif (propertyKey === undefined) {\n\t\t\tthrow new Error(\n\t\t\t\t\"@Arg() can only decorate method parameters, not constructor parameters.\",\n\t\t\t);\n\t\t}\n\t\tconst list = (Reflect.getMetadata(ARGS_KEY, target, propertyKey) as\n\t\t\t| Array<{ name: string; type: string; index: number }>\n\t\t\t| undefined) ?? [];\n\t\tlist.push({ name, type, index: parameterIndex });\n\t\tReflect.defineMetadata(ARGS_KEY, list, target, propertyKey);\n\t};\n}\n\n/** Read `@Arg` metadata for a specific method. */\nexport function getMethodArgs(\n\ttarget: object,\n\tpropertyKey: string | symbol,\n): Array<{ name: string; type: string; index: number }> {\n\treturn (Reflect.getMetadata(ARGS_KEY, target, propertyKey) as\n\t\t| Array<{ name: string; type: string; index: number }>\n\t\t| undefined) ?? [];\n}\n",
5
+ "/**\n * @Resolver(typeName?) decorator.\n *\n * Marks a class as a GraphQL resolver. The optional `typeName` argument\n * declares the GraphQL type this class is responsible for. If\n * omitted, the type name defaults to the class name (e.g.\n * `UserResolver` → type `User`).\n *\n * The framework's GraphQL scanner picks up every class with this\n * decorator and reads the field methods off it (decorators from\n * `./query.js`, `./mutation.js`, `./subscription.js`).\n *\n * @Resolver(\"User\")\n * class UserResolver {\n * @Query() me() { ... }\n * @Mutation() signup(@Arg(\"email\") e: string) { ... }\n * @Subscription() events() { ... }\n * }\n */\nimport type { ResolverClassRecord } from \"../types.js\";\nimport { safeGetMeta, safeDefineMeta, safeHasMeta } from \"@nexusts/core/di/safe-reflect\";\n\nconst RESOLVER_KEY = Symbol.for(\"nexus:GraphQL:Resolver\");\nconst FIELDS_KEY = Symbol.for(\"nexus:GraphQL:Fields\");\nconst TYPENAME_KEY = Symbol.for(\"nexus:GraphQL:TypeName\");\n\n// Global registry of all @Resolver-decorated classes. Populated at\n// decorator evaluation time so the SDL synthesiser can enumerate them\n// without needing a separate scan pass.\nconst _resolverRegistry = new Set<Function>();\n\nexport function Resolver(typeName?: string): ClassDecorator {\n\treturn (target: Function) => {\n\t\tconst ctor = target as unknown as new (...args: any[]) => any;\n\t\tconst inferred = typeName ?? ctor.name.replace(/Resolver$/, \"\");\n\t\tsafeDefineMeta(RESOLVER_KEY, true, ctor);\n\t\tsafeDefineMeta(TYPENAME_KEY, inferred, ctor);\n\t\tif (!safeHasMeta(FIELDS_KEY, ctor)) {\n\t\t\tsafeDefineMeta(FIELDS_KEY, [], ctor);\n\t\t}\n\t\t_resolverRegistry.add(ctor);\n\t};\n}\n\n/** Return all classes decorated with `@Resolver`. */\nexport function getRegisteredResolvers(): Function[] {\n\treturn [..._resolverRegistry];\n}\n\n/** Remove all entries from the registry. Intended for use in tests only. */\nexport function clearResolverRegistry(): void {\n\t_resolverRegistry.clear();\n}\n\n/** Read the type-name this resolver is for. */\nexport function getResolverTypeName(target: object): string | undefined {\n\tconst t = (target as { prototype?: object }).prototype ?? target;\n\tconst fromMeta = safeGetMeta(TYPENAME_KEY, t);\n\tif (fromMeta) return fromMeta as string;\n\t// Fallback: derive from the class name (drop \"Resolver\" suffix).\n\tconst ctor = (t as { constructor?: { name: string } }).constructor;\n\treturn ctor?.name.replace(/Resolver$/, \"\");\n}\n\n/** Append a field method to the resolver class's metadata. */\nexport function pushResolverField(\n\ttarget: object,\n\tfield: ResolverClassRecord[\"fields\"][number],\n): void {\n\tconst t = (target as { prototype?: object }).prototype ?? target;\n\tconst list = (safeGetMeta(FIELDS_KEY, t) as ResolverClassRecord[\"fields\"]) ?? [];\n\tlist.push(field);\n\tsafeDefineMeta(FIELDS_KEY, list, t);\n}\n\n/** Read the field metadata for a resolver class. */\nexport function getResolverFields(target: object): ResolverClassRecord[\"fields\"] {\n\tconst t = (target as { prototype?: object }).prototype ?? target;\n\treturn (safeGetMeta(FIELDS_KEY, t) as ResolverClassRecord[\"fields\"]) ?? [];\n}\n\n/** True if `target` was decorated with `@Resolver`. */\nexport function isResolverClass(target: object): boolean {\n\tconst t = (target as { prototype?: object }).prototype ?? target;\n\treturn safeGetMeta(RESOLVER_KEY, t) === true;\n}\n",
6
+ "/**\n * `@Arg(name, type?)` parameter decorator.\n *\n * Declares a method parameter as a GraphQL field argument. Used on\n * resolver methods marked with `@Query`/`@Mutation`/`@Subscription`.\n *\n * @Mutation()\n * updateProfile(\n * @Arg(\"name\") name: string,\n * @Arg(\"email\", \"String!\") email: string,\n * ) { ... }\n *\n * The optional `type` argument is the SDL type (e.g. `\"String!\"`,\n * `\"Int\"`, `\"[User!]!\"`). When omitted, the framework uses `\"String\"`\n * as a safe default explicit is better than implicit.\n */\nimport { pushResolverField, getResolverTypeName } from \"./resolver.js\";\nimport { safeGetMeta, safeDefineMeta, safeHasMeta } from \"@nexusts/core/di/safe-reflect\";\n\nconst ARGS_KEY = Symbol.for(\"nexus:GraphQL:MethodArgs\");\n\nexport function Arg(name: string, type: string = \"String\"): ParameterDecorator {\n\treturn (\n\t\ttarget: object,\n\t\tpropertyKey: string | symbol | undefined,\n\t\tparameterIndex: number,\n\t) => {\n\t\tif (propertyKey === undefined) {\n\t\t\tthrow new Error(\n\t\t\t\t\"@Arg() can only decorate method parameters, not constructor parameters.\",\n\t\t\t);\n\t\t}\n\t\tconst list = (safeGetMeta(ARGS_KEY, target, propertyKey) as\n\t\t\t| Array<{ name: string; type: string; index: number }>\n\t\t\t| undefined) ?? [];\n\t\tlist.push({ name, type, index: parameterIndex });\n\t\tsafeDefineMeta(ARGS_KEY, list, target, propertyKey);\n\t};\n}\n\n/** Read `@Arg` metadata for a specific method. */\nexport function getMethodArgs(\n\ttarget: object,\n\tpropertyKey: string | symbol,\n): Array<{ name: string; type: string; index: number }> {\n\treturn (safeGetMeta(ARGS_KEY, target, propertyKey) as\n\t\t| Array<{ name: string; type: string; index: number }>\n\t\t| undefined) ?? [];\n}\n",
7
+ "/**\n * `@Query(name?)` / `@Mutation(name?)` / `@Subscription(name?)`\n *\n * Method decorators that mark a resolver method as a GraphQL operation.\n * The optional `name` argument overrides the field name in the schema\n * (defaults to the method name).\n *\n * @Resolver(\"User\")\n * class UserResolver {\n * @Query(\"currentUser\")\n * me() { return ctx.state.user; }\n *\n * @Mutation()\n * updateProfile(@Arg(\"name\") name: string) { ... }\n *\n * @Subscription()\n * events() { return pubsub.asyncIterator(\"EVENTS\"); }\n * }\n */\nimport { pushResolverField } from \"./resolver.js\";\nimport { getMethodArgs } from \"./arg.js\";\nimport type { ResolverClassRecord } from \"../types.js\";\nimport { safeGetMeta, safeDefineMeta, safeHasMeta } from \"@nexusts/core/di/safe-reflect\";\n\ntype OperationKind = \"query\" | \"mutation\" | \"subscription\";\n\n/**\n * Common implementation. `decorator` is a factory the user calls as\n * `@Query(name?, opts?)` / `@Mutation(name?, opts?)` etc.\n *\n * `opts.returns` — explicit GraphQL return type string, e.g. `\"String!\"`.\n * Defaults to `\"JSON\"` when omitted (safe fallback; set explicitly for\n * code-first schemas that use `autoSchema: true`).\n */\nfunction makeOperationDecorator(kind: OperationKind) {\n\treturn function (name?: string, opts?: { returns?: string }) {\n\t\treturn (\n\t\t\ttarget: object,\n\t\t\tpropertyKey: string | symbol,\n\t\t\t_descriptor: TypedPropertyDescriptor<any>,\n\t\t): void => {\n\t\t\tconst argsMeta = getMethodArgs(target, propertyKey);\n\t\t\tpushResolverField(target, {\n\t\t\t\tpropertyKey: String(propertyKey),\n\t\t\t\tkind,\n\t\t\t\tname: name ?? String(propertyKey),\n\t\t\t\treturnTypeName: opts?.returns ?? \"JSON\",\n\t\t\t\targs: argsMeta\n\t\t\t\t\t.sort((a, b) => a.index - b.index)\n\t\t\t\t\t.map((a) => ({ name: a.name, type: a.type })),\n\t\t\t});\n\t\t};\n\t};\n}\n\nexport const Query = makeOperationDecorator(\"query\");\nexport const Mutation = makeOperationDecorator(\"mutation\");\nexport const Subscription = makeOperationDecorator(\"subscription\");\n\n/** Public helper for the scanner. */\nexport type AnyField = ResolverClassRecord[\"fields\"][number];\n",
9
8
  "/**\n * Maps TypeScript primitive type names to their GraphQL scalar equivalents.\n *\n * Bun does not emit `design:returntype`/`design:paramtypes` metadata, so\n * full automatic type inference is unavailable. Users supply type strings\n * explicitly via `@Query(\"field\", { returns: \"String!\" })` or\n * `@Arg(\"arg\", \"Int!\")`. This utility normalises common TypeScript aliases\n * to their canonical GraphQL scalar names.\n */\nconst TS_TO_GQL: Record<string, string> = {\n\tstring: \"String\",\n\tnumber: \"Float\",\n\tint: \"Int\",\n\tfloat: \"Float\",\n\tboolean: \"Boolean\",\n\tbool: \"Boolean\",\n\tid: \"ID\",\n};\n\n/**\n * Normalise a raw type string to its GraphQL scalar name.\n *\n * - Known TypeScript aliases are converted: `string` → `String`, etc.\n * - Unknown types (user-defined object types) are returned unchanged.\n * - Non-null (`!`) suffixes and list (`[...]`) wrappers are preserved.\n *\n * @example\n * normalizeGQLType(\"string\") // \"String\"\n * normalizeGQLType(\"string!\") // \"String!\"\n * normalizeGQLType(\"[int!]!\") // \"[Int!]!\"\n * normalizeGQLType(\"String!\") // \"String!\" (already canonical — unchanged)\n * normalizeGQLType(\"User\") // \"User\" (user-defined type — unchanged)\n */\nexport function normalizeGQLType(raw: string): string {\n\tconst nonNull = raw.endsWith(\"!\");\n\tconst base = nonNull ? raw.slice(0, -1) : raw;\n\tconst trimmed = base.trim();\n\n\tif (trimmed.startsWith(\"[\") && trimmed.endsWith(\"]\")) {\n\t\tconst inner = trimmed.slice(1, -1);\n\t\treturn `[${normalizeGQLType(inner)}]${nonNull ? \"!\" : \"\"}`;\n\t}\n\n\tconst mapped = TS_TO_GQL[trimmed.toLowerCase()];\n\treturn (mapped ?? trimmed) + (nonNull ? \"!\" : \"\");\n}\n",
10
- "/**\n * `GraphQLModule` — drop-in GraphQL endpoint.\n *\n * @Module({\n * imports: [\n * GraphQLModule.forRoot({\n * typeDefs: `\n * type Query { hello: String! }\n * `,\n * resolvers: {\n * Query: {\n * hello: () => \"world\",\n * },\n * },\n * }),\n * ],\n * })\n * export class AppModule {}\n *\n * After boot, the framework exposes:\n *\n * POST /graphql — queries + mutations\n * GET /graphql — GraphiQL UI (or a query, if `?query=...` is set)\n * GET /graphql/schema — the schema as SDL (debug)\n *\n * Resolvers can also be declared via the `@Resolver` + `@Query` /\n * `@Mutation` / `@Subscription` decorators — see the user guide.\n */\nimport \"reflect-metadata\";\nimport type { Context } from \"hono\";\nimport { Module } from \"@nexusts/core\";\nimport { GraphQLService } from \"./graphql.service.js\";\nimport type { GraphQLConfig } from \"./types.js\";\n\n@Module({\n\tproviders: [\n\t\tGraphQLService,\n\t\t{ provide: GraphQLService.TOKEN, useExisting: GraphQLService },\n\t],\n\texports: [GraphQLService, GraphQLService.TOKEN],\n})\nexport class GraphQLModule {\n\tstatic forRoot(config: GraphQLConfig) {\n\t\tconst factory = () => new GraphQLService(config);\n\t\t@Module({\n\t\t\tproviders: [\n\t\t\t\t{\n\t\t\t\t\tprovide: GraphQLService.TOKEN,\n\t\t\t\t\tuseFactory: factory,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tprovide: GraphQLService,\n\t\t\t\t\tuseFactory: factory,\n\t\t\t\t},\n\t\t\t\t{ provide: \"GRAPHQL_CONFIG\", useValue: config },\n\t\t\t],\n\t\t\texports: [GraphQLService, GraphQLService.TOKEN],\n\t\t})\n\t\tclass ConfiguredGraphQLModule {}\n\t\tObject.defineProperty(ConfiguredGraphQLModule, \"name\", {\n\t\t\tvalue: \"ConfiguredGraphQLModule\",\n\t\t});\n\t\treturn ConfiguredGraphQLModule;\n\t}\n\n\t/**\n\t * Manually mount the GraphQL endpoint onto a Hono-compatible app.\n\t * Used by `main.ts` setups that don't go through `@Module`.\n\t */\n\tstatic async mount(\n\t\tapp: {\n\t\t\tpost: (path: string, ...h: any[]) => any;\n\t\t\tget: (path: string, ...h: any[]) => any;\n\t\t\tuse: (path: string, ...h: any[]) => any;\n\t\t},\n\t\tsvc: GraphQLService,\n\t): Promise<void> {\n\t\tconst path = svc.config.endpoint?.path ?? \"/graphql\";\n\t\tconst enableGet = svc.config.endpoint?.enableGet ?? true;\n\t\tconst exposeSDL = svc.config.exposeSchemaSDL ?? true;\n\t\tconst playground = svc.config.playground ?? \"graphiql\";\n\n\t\t// POST /graphql — queries + mutations.\n\t\tapp.post(path, async (c: Context) => {\n\t\t\tconst body = await readRequestBody(c);\n\t\t\tconst ctx = await svc.buildContext(c);\n\t\t\tconst result = await svc.execute(\n\t\t\t\tbody.query,\n\t\t\t\tparseJSONField(body.variables) ?? {},\n\t\t\t\tbody.operationName || undefined,\n\t\t\t\tctx,\n\t\t\t);\n\t\t\treturn c.json(result, statusFor(result) as any);\n\t\t});\n\n\t\t// GET /graphql — playground / pre-baked query (?query=...&variables=...).\n\t\tif (enableGet) {\n\t\t\tapp.get(path, async (c: Context) => {\n\t\t\t\tconst query = c.req.query(\"query\");\n\t\t\t\tif (!query) {\n\t\t\t\t\tif (playground === \"none\") {\n\t\t\t\t\t\treturn c.text(\"GraphQL endpoint. Pass ?query=... for a pre-baked query.\", 200);\n\t\t\t\t\t}\n\t\t\t\t\treturn c.html(graphiqlHtml({ endpoint: path }), 200, {\n\t\t\t\t\t\t\"Content-Type\": \"text/html; charset=utf-8\",\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tconst ctx = await svc.buildContext(c);\n\t\t\t\tconst result = await svc.execute(\n\t\t\t\t\tquery,\n\t\t\t\t\tparseJSONField(c.req.query(\"variables\") ?? \"\") ?? {},\n\t\t\t\t\tc.req.query(\"operationName\") ?? undefined,\n\t\t\t\t\tctx,\n\t\t\t\t);\n\t\t\t\treturn c.json(result, statusFor(result) as any);\n\t\t\t});\n\t\t}\n\n\t\t// GET /graphql/schema — debug: print the raw SDL.\n\t\tif (exposeSDL) {\n\t\t\tapp.get(`${path}/schema`, (c: Context) => {\n\t\t\t\treturn c.text(svc.getSchemaSDL(), 200, {\n\t\t\t\t\t\"Content-Type\": \"text/plain; charset=utf-8\",\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\t// Force schema bootstrap so the first request isn't slow.\n\t\tawait svc.ensureSchema();\n\t}\n}\n\n/** Read a GraphQL request body. Accepts JSON or form-urlencoded. */\nasync function readRequestBody(\n\tc: Context,\n): Promise<{ query: string; variables: string; operationName: string }> {\n\tconst ct = c.req.header(\"content-type\") ?? \"\";\n\tif (ct.includes(\"application/json\")) {\n\t\ttry {\n\t\t\tconst j = await c.req.json() as Record<string, unknown>;\n\t\t\treturn {\n\t\t\t\tquery: String(j.query ?? \"\"),\n\t\t\t\tvariables: j.variables ? JSON.stringify(j.variables) : \"\",\n\t\t\t\toperationName: j.operationName ? String(j.operationName) : \"\",\n\t\t\t};\n\t\t} catch {\n\t\t\treturn { query: \"\", variables: \"\", operationName: \"\" };\n\t\t}\n\t}\n\tif (ct.includes(\"application/x-www-form-urlencoded\")) {\n\t\tconst text = await c.req.text();\n\t\tconst params = new URLSearchParams(text);\n\t\treturn {\n\t\t\tquery: params.get(\"query\") ?? \"\",\n\t\t\tvariables: params.get(\"variables\") ?? \"\",\n\t\t\toperationName: params.get(\"operationName\") ?? \"\",\n\t\t};\n\t}\n\t// Default: assume form-urlencoded.\n\tconst text = await c.req.text();\n\tconst params = new URLSearchParams(text);\n\treturn {\n\t\tquery: params.get(\"query\") ?? \"\",\n\t\tvariables: params.get(\"variables\") ?? \"\",\n\t\toperationName: params.get(\"operationName\") ?? \"\",\n\t};\n}\n\nfunction parseJSONField(raw: string): Record<string, unknown> | undefined {\n\tif (!raw) return undefined;\n\ttry {\n\t\tconst parsed = JSON.parse(raw);\n\t\tif (parsed && typeof parsed === \"object\") {\n\t\t\treturn parsed as Record<string, unknown>;\n\t\t}\n\t} catch {\n\t\t/* fall through */\n\t}\n\treturn undefined;\n}\n\nfunction statusFor(result: { errors?: unknown[]; data?: unknown }): number {\n\tif (result.errors && (result.errors as unknown[]).length > 0 && !result.data) return 400;\n\treturn 200;\n}\n\n/** Minimal GraphiQL HTML — single-page, no CDN, no external assets. */\nfunction graphiqlHtml(opts: { endpoint: string }): string {\n\treturn `<!doctype html>\n<html lang=\"en\">\n<head>\n <meta charset=\"utf-8\">\n <title>GraphiQL</title>\n <style>\n body { font-family: system-ui, sans-serif; margin: 0; padding: 1em; }\n pre { background: #f5f5f5; padding: 0.6em; border-radius: 4px; overflow: auto; }\n .row { display: flex; gap: 1em; }\n textarea { width: 100%; min-height: 8em; font-family: ui-monospace, monospace; }\n button { padding: 0.4em 0.8em; }\n </style>\n</head>\n<body>\n <h2>GraphiQL (lightweight)</h2>\n <p>POST <code>${opts.endpoint}</code> · this is a no-deps playground built into\n <code>@nexusts/graphql</code>. For the full GraphiQL\n experience, see <code>graphiql</code> on npm.</p>\n <div class=\"row\">\n <textarea id=\"q\" placeholder=\"query { hello }\">{ hello }</textarea>\n </div>\n <p><button id=\"run\">Run</button> <span id=\"status\"></span></p>\n <pre id=\"out\"></pre>\n <script>\n const $q = document.getElementById(\"q\");\n const $out = document.getElementById(\"out\");\n const $status = document.getElementById(\"status\");\n document.getElementById(\"run\").onclick = async () => {\n $status.textContent = \"running…\";\n $out.textContent = \"\";\n const res = await fetch(${JSON.stringify(opts.endpoint)}, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({ query: $q.value }),\n });\n const j = await res.json();\n $status.textContent = res.status + \" \" + res.statusText;\n $out.textContent = JSON.stringify(j, null, 2);\n };\n </script>\n</body>\n</html>`;\n}\n"
9
+ "/**\n * `GraphQLService` — owns the parsed schema, resolver map, and an\n * end-to-end executor.\n *\n * Most users won't instantiate this directly — they use\n * `GraphQLModule.forRoot({ typeDefs, resolvers, ... })` which puts\n * a singleton service into the DI container. The service is also\n * exported for advanced users (programmatic queries, schema\n * introspection, custom executors).\n *\n * The actual `parse` / `validate` / `execute` calls go to\n * `graphql` (a peer-dep). If the user hasn't installed it, we\n * throw a clear error from the first attempt.\n */\nimport type {\n\tGraphQLConfig,\n\tGraphQLContext,\n\tGraphQLExecutionResult,\n\tFieldResolver,\n\tResolverMap,\n} from \"./types.js\";\nimport { getRegisteredResolvers, getResolverFields } from \"./decorators/index.js\";\nimport { normalizeGQLType } from \"./decorators/type-mapper.js\";\nimport { safeGetMeta, safeDefineMeta, safeHasMeta } from \"@nexusts/core/di/safe-reflect\";\n\ninterface GraphQLJs {\n\tparse: (s: string) => unknown;\n\tbuildSchema: (sdl: string) => unknown;\n\tvalidate: (schema: unknown, doc: unknown, rules?: unknown) => unknown[];\n\t// graphql 16 takes positional args; graphql 17 takes a single\n\t// object. We always call it with the 16-style positional args\n\t// (so we wrap a `buildSchema` schema, not the resolver-builder\n\t// schema), but the type reflects both possibilities.\n\texecute: (...args: any[]) => Promise<GraphQLExecutionResult> | GraphQLExecutionResult;\n\tspecifiedRules?: unknown;\n\tgetOperationAST?: (doc: unknown, operationName?: string) => unknown;\n\tGraphQLSchema: unknown;\n\tGraphQLObjectType: unknown;\n\tGraphQLString: unknown;\n\tGraphQLNonNull: unknown;\n\tGraphQLList: unknown;\n\tGraphQLInt: unknown;\n\tGraphQLFloat: unknown;\n\tGraphQLBoolean: unknown;\n\tGraphQLID: unknown;\n\tGraphQLError: unknown;\n\tGraphQLScalarType: unknown;\n\tparseType: (s: string) => unknown;\n\tGraphQLSchemaConfig: unknown;\n}\n\nlet _graphql: GraphQLJs | null = null;\nlet _loadAttempted = false;\n\n/** Lazy-load the `graphql` package. Throws a clear error if missing. */\nexport async function loadGraphQLJs(): Promise<GraphQLJs> {\n\tif (_graphql) return _graphql;\n\tif (_loadAttempted) {\n\t\tthrow new Error(\n\t\t\t\"[nexusjs/graphql] The optional `graphql` package failed to load. \" +\n\t\t\t\t\"Install it with `bun add graphql` to use the GraphQL module.\",\n\t\t);\n\t}\n\t_loadAttempted = true;\n\ttry {\n\t\tconst mod = (await import(\"graphql\")) as unknown as GraphQLJs;\n\t\t_graphql = mod;\n\t\treturn mod;\n\t} catch (err) {\n\t\tthrow new Error(\n\t\t\t\"[nexusjs/graphql] The `graphql` package is required for execution. \" +\n\t\t\t\t\"Install it with `bun add graphql`. \" +\n\t\t\t\t\"Original error: \" + (err as Error).message,\n\t\t);\n\t}\n}\n\nexport class GraphQLService {\n\t/** The raw config the module was booted with. */\n\treadonly config: GraphQLConfig;\n\t/** Optional DI handle. */\n\tstatic readonly TOKEN = Symbol.for(\"nexus:GraphQL\");\n\n\tconstructor(config: GraphQLConfig = {}) {\n\t\tthis.config = {\n\t\t\tplayground: \"graphiql\",\n\t\t\tendpoint: { path: \"/graphql\", enableGet: true },\n\t\t\texposeSchemaSDL: true,\n\t\t\tintrospection: true,\n\t\t\t...config,\n\t\t};\n\t}\n\n\tprivate _schema: any = null;\n\tprivate _resolvers: ResolverMap = {};\n\tprivate _bootstrapPromise: Promise<void> | null = null;\n\n\t/**\n\t * Register a resolver map (or add to the existing one). Safe to\n\t * call multiple times — the maps are merged.\n\t */\n\taddResolvers(map: ResolverMap): void {\n\t\tfor (const [typeName, fields] of Object.entries(map)) {\n\t\t\tthis._resolvers[typeName] = {\n\t\t\t\t...this._resolvers[typeName],\n\t\t\t\t...fields,\n\t\t\t};\n\t\t}\n\t}\n\n\tprivate async _buildSchema(sdl: string[]): Promise<any> {\n\t\tconst g = await loadGraphQLJs();\n\t\tconst merged = this.mergeSDLWithDecorators(sdl);\n\t\t// graphql-js's `buildSchema` produces a `GraphQLSchema` whose\n\t\t// fields' `resolve` is `undefined` by default — graphql-js's\n\t\t// execution layer looks up fields on the parent object in\n\t\t// that case. To wire our `ResolverMap`, we set each field's\n\t\t// `resolve` directly. This works for graphql 16 and 17.\n\t\tconst schema = (g.buildSchema as Function)(merged);\n\t\t// Deep-merge resolver maps: auto-wired < addResolvers() < config.resolvers.\n\t\t// Shallow spread would clobber an entire type object (e.g. the Query key)\n\t\t// when two sources contribute fields to the same type.\n\t\tconst autoWired = this.config.autoSchema ? this._autoWireResolvers() : {};\n\t\tconst final = mergeResolverMaps(autoWired, this._resolvers, this.config.resolvers ?? {});\n\t\twrapSchemaWithResolvers(schema, final);\n\t\treturn schema;\n\t}\n\n\t/**\n\t * Instantiate each registered `@Resolver` class and map its `@Query` /\n\t * `@Mutation` / `@Subscription` methods into a `ResolverMap`.\n\t *\n\t * For methods decorated with `@Arg`, positional arguments are extracted\n\t * from the graphql-js `args` object by name and forwarded positionally.\n\t * For methods without `@Arg`, the standard graphql-js 4-tuple\n\t * `(parent, args, ctx, info)` is passed through unchanged.\n\t */\n\tprivate _autoWireResolvers(): ResolverMap {\n\t\tconst map: ResolverMap = {};\n\t\tfor (const resolverClass of getRegisteredResolvers()) {\n\t\t\tconst fields = getResolverFields(resolverClass);\n\t\t\tconst instance = new (resolverClass as any)();\n\t\t\tfor (const f of fields) {\n\t\t\t\tlet typeName: string;\n\t\t\t\tif (f.kind === \"query\") typeName = \"Query\";\n\t\t\t\telse if (f.kind === \"mutation\") typeName = \"Mutation\";\n\t\t\t\telse typeName = \"Subscription\";\n\n\t\t\t\tif (!map[typeName]) map[typeName] = {};\n\n\t\t\t\tconst method = (instance as any)[f.propertyKey];\n\t\t\t\tif (typeof method !== \"function\") continue;\n\n\t\t\t\tconst argNames = f.args.map((a) => a.name);\n\t\t\t\tif (argNames.length === 0) {\n\t\t\t\t\t// No @Arg — pass graphql-js 4-tuple as-is.\n\t\t\t\t\tmap[typeName][f.name] = (parent: any, args: any, ctx: any, info: any) =>\n\t\t\t\t\t\tmethod.call(instance, parent, args, ctx, info);\n\t\t\t\t} else {\n\t\t\t\t\t// @Arg present — extract each value from the args object by\n\t\t\t\t\t// name and call the method with positional parameters.\n\t\t\t\t\tmap[typeName][f.name] = (_parent: any, args: any) => {\n\t\t\t\t\t\tconst positional = argNames.map((n) => args[n]);\n\t\t\t\t\t\treturn method.call(instance, ...positional);\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}\n\n\t/**\n\t * Build (or rebuild) the underlying GraphQL schema. Idempotent.\n\t * Returns the `graphql` schema instance.\n\t */\n\tasync ensureSchema(): Promise<any> {\n\t\tif (this._schema) return this._schema;\n\t\tif (this._bootstrapPromise) return this._bootstrapPromise.then(() => this._schema);\n\t\tthis._bootstrapPromise = (async () => {\n\t\t\tconst sdl = this.normaliseTypeDefs(this.config.typeDefs);\n\t\t\tconst autoSchema = this.config.autoSchema ?? false;\n\t\t\tconst hasResolvers = getRegisteredResolvers().length > 0;\n\n\t\t\tif (sdl.length === 0 && !autoSchema && !hasResolvers) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"[nexusjs/graphql] No typeDefs configured. \" +\n\t\t\t\t\t\t\"Pass `typeDefs: '...'` to GraphQLModule.forRoot(), \" +\n\t\t\t\t\t\t\"or set `autoSchema: true` and use `@Resolver` + `@Query` / `@Mutation` decorators.\",\n\t\t\t\t);\n\t\t\t}\n\t\t\tthis._schema = await this._buildSchema(sdl);\n\t\t})();\n\t\tawait this._bootstrapPromise;\n\t\treturn this._schema;\n\t}\n\n\t/**\n\t * Validate + execute a GraphQL document. Returns the raw\n\t * `execute()` result envelope (data, errors, extensions).\n\t */\n\tasync execute(\n\t\tsource: string,\n\t\tvariableValues: Record<string, unknown> = {},\n\t\toperationName?: string,\n\t\tcontextValue?: GraphQLContext,\n\t): Promise<GraphQLExecutionResult> {\n\t\tconst g = await loadGraphQLJs();\n\t\tconst schema = await this.ensureSchema();\n\t\tconst document = (g.parse as Function)(source);\n\t\tconst errors = (g.validate as Function)(schema, document, g.specifiedRules) as unknown[];\n\t\tif (errors.length > 0) {\n\t\t\treturn {\n\t\t\t\terrors: (errors as any[]).map((e: any) => ({\n\t\t\t\t\tmessage: e.message,\n\t\t\t\t\tlocations: e.locations,\n\t\t\t\t})),\n\t\t\t};\n\t\t}\n\t\t// If the user didn't pass a context and the service has a\n\t\t// `context()` factory, build a synthetic context (with a\n\t\t// stub Hono ctx) so resolvers that depend on `ctx.state` work\n\t\t// in `execute()` calls outside of an HTTP request.\n\t\tlet ctx = contextValue;\n\t\tif (!ctx && this.config.context) {\n\t\t\tconst fakeHono = { req: { url: \"\", method: \"EXECUTE\", header: () => \"\" } };\n\t\t\tctx = {\n\t\t\t\thono: fakeHono as any,\n\t\t\t\tstate: await this.config.context(fakeHono as any),\n\t\t\t};\n\t\t}\n\t\tconst rootValue = undefined;\n\t\treturn await (g.execute as any)({\n\t\t\tschema,\n\t\t\tdocument,\n\t\t\trootValue,\n\t\t\tcontextValue: ctx,\n\t\t\tvariableValues,\n\t\t\toperationName,\n\t\t});\n\t}\n\n\t/**\n\t * Produce a `GraphQLContext` from an inbound Hono request.\n\t * Calls the user's `context()` factory if provided.\n\t */\n\tasync buildContext(c: any): Promise<GraphQLContext> {\n\t\tconst state = this.config.context\n\t\t\t? await this.config.context(c)\n\t\t\t: {};\n\t\treturn { hono: c, state };\n\t}\n\n\t/**\n\t * Read the parsed SDL back as a string. Useful for the\n\t * `/graphql/schema` debug endpoint and for tests.\n\t */\n\tgetSchemaSDL(): string {\n\t\treturn this.normaliseTypeDefs(this.config.typeDefs).join(\"\\n\");\n\t}\n\n\tprivate normaliseTypeDefs(td?: string | string[]): string[] {\n\t\tif (!td) return [];\n\t\treturn Array.isArray(td) ? td : [td];\n\t}\n\n\t/**\n\t * Synthesise SDL snippets from `@Resolver` / `@Query` / `@Mutation` /\n\t * `@Subscription` decorator metadata and merge them with any\n\t * user-supplied `typeDefs`.\n\t *\n\t * - If the user's SDL already defines `type Query`, decorator-added\n\t * fields are appended with `extend type Query { ... }` to avoid\n\t * duplicate-type errors.\n\t * - Unknown return types or argument types are passed through as-is\n\t * (they are treated as user-defined object types).\n\t */\n\tprivate mergeSDLWithDecorators(sdl: string[]): string {\n\t\tconst registered = getRegisteredResolvers();\n\t\tif (registered.length === 0) return sdl.join(\"\\n\");\n\n\t\tconst queryFields: string[] = [];\n\t\tconst mutationFields: string[] = [];\n\t\tconst subscriptionFields: string[] = [];\n\n\t\tfor (const resolverClass of registered) {\n\t\t\tconst fields = getResolverFields(resolverClass);\n\t\t\tfor (const f of fields) {\n\t\t\t\tconst argStr =\n\t\t\t\t\tf.args.length > 0\n\t\t\t\t\t\t? `(${f.args.map((a) => `${a.name}: ${normalizeGQLType(a.type)}`).join(\", \")})`\n\t\t\t\t\t\t: \"\";\n\t\t\t\tconst line = ` ${f.name}${argStr}: ${normalizeGQLType(f.returnTypeName)}`;\n\t\t\t\tif (f.kind === \"query\") queryFields.push(line);\n\t\t\t\telse if (f.kind === \"mutation\") mutationFields.push(line);\n\t\t\t\telse if (f.kind === \"subscription\") subscriptionFields.push(line);\n\t\t\t}\n\t\t}\n\n\t\tconst userSDL = sdl.join(\"\\n\");\n\t\tconst generated: string[] = [];\n\n\t\tif (queryFields.length > 0) {\n\t\t\tconst keyword = /type\\s+Query\\s*\\{/.test(userSDL) ? \"extend type\" : \"type\";\n\t\t\tgenerated.push(`${keyword} Query {\\n${queryFields.join(\"\\n\")}\\n}`);\n\t\t}\n\t\tif (mutationFields.length > 0) {\n\t\t\tconst keyword = /type\\s+Mutation\\s*\\{/.test(userSDL) ? \"extend type\" : \"type\";\n\t\t\tgenerated.push(`${keyword} Mutation {\\n${mutationFields.join(\"\\n\")}\\n}`);\n\t\t}\n\t\tif (subscriptionFields.length > 0) {\n\t\t\tconst keyword = /type\\s+Subscription\\s*\\{/.test(userSDL) ? \"extend type\" : \"type\";\n\t\t\tgenerated.push(`${keyword} Subscription {\\n${subscriptionFields.join(\"\\n\")}\\n}`);\n\t\t}\n\n\t\treturn [userSDL, ...generated].filter(Boolean).join(\"\\n\");\n\t}\n}\n\n/** Deep-merge multiple `ResolverMap`s. Later entries win at the field level. */\nfunction mergeResolverMaps(...maps: ResolverMap[]): ResolverMap {\n\tconst result: ResolverMap = {};\n\tfor (const map of maps) {\n\t\tfor (const [typeName, fields] of Object.entries(map)) {\n\t\t\tresult[typeName] = { ...result[typeName], ...fields };\n\t\t}\n\t}\n\treturn result;\n}\n\n/**\n * Wrap a parsed schema with the user's resolver map. graphql-js's\n * `buildSchema` produces a schema with default resolvers (which look\n * up fields on the `rootValue`). For our use case, we want field-level\n * resolvers that pull from the registered `ResolverMap`.\n */\nfunction wrapSchemaWithResolvers(schema: any, resolvers: ResolverMap): any {\n\t// graphql-js schemas are immutable. We replace the resolver map\n\t// via a tiny proxy: when a field is queried, graphql-js's default\n\t// resolver calls our `defaultFieldResolver` (which simply looks\n\t// up the value in the parent). To wire our resolvers, we set\n\t// each field's `resolve` to the entry from the resolver map.\n\tconst typeMap = schema.getTypeMap?.() ?? {};\n\tfor (const [typeName, fields] of Object.entries(resolvers)) {\n\t\tconst type = typeMap[typeName];\n\t\tif (!type || typeof type.getFields !== \"function\") continue;\n\t\tconst fieldMap = type.getFields();\n\t\tfor (const [fieldName, resolver] of Object.entries(fields)) {\n\t\t\tconst field = fieldMap[fieldName];\n\t\t\tif (!field) continue;\n\t\t\tconst fn: FieldResolver =\n\t\t\t\ttypeof resolver === \"function\"\n\t\t\t\t\t? (resolver as FieldResolver)\n\t\t\t\t\t: ((resolver as { resolve: FieldResolver }).resolve as FieldResolver);\n\t\t\tfield.resolve = function (parent: any, args: any, ctx: any, info: any) {\n\t\t\t\treturn fn(parent, args, ctx, info);\n\t\t\t};\n\t\t}\n\t}\n\treturn schema;\n}\n",
10
+ "/**\n * `GraphQLModule` — drop-in GraphQL endpoint.\n *\n * @Module({\n * imports: [\n * GraphQLModule.forRoot({\n * typeDefs: `\n * type Query { hello: String! }\n * `,\n * resolvers: {\n * Query: {\n * hello: () => \"world\",\n * },\n * },\n * }),\n * ],\n * })\n * export class AppModule {}\n *\n * After boot, the framework exposes:\n *\n * POST /graphql — queries + mutations\n * GET /graphql — GraphiQL UI (or a query, if `?query=...` is set)\n * GET /graphql/schema — the schema as SDL (debug)\n *\n * Resolvers can also be declared via the `@Resolver` + `@Query` /\n * `@Mutation` / `@Subscription` decorators — see the user guide.\n */\nimport type { Context } from \"hono\";\nimport { Module } from \"@nexusts/core\";\nimport { GraphQLService } from \"./graphql.service.js\";\nimport type { GraphQLConfig } from \"./types.js\";\nimport { safeGetMeta, safeDefineMeta, safeHasMeta } from \"@nexusts/core/di/safe-reflect\";\n\n@Module({\n\tproviders: [\n\t\tGraphQLService,\n\t\t{ provide: GraphQLService.TOKEN, useExisting: GraphQLService },\n\t],\n\texports: [GraphQLService, GraphQLService.TOKEN],\n})\nexport class GraphQLModule {\n\tstatic forRoot(config: GraphQLConfig) {\n\t\tconst factory = () => new GraphQLService(config);\n\t\t@Module({\n\t\t\tproviders: [\n\t\t\t\t{\n\t\t\t\t\tprovide: GraphQLService.TOKEN,\n\t\t\t\t\tuseFactory: factory,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tprovide: GraphQLService,\n\t\t\t\t\tuseFactory: factory,\n\t\t\t\t},\n\t\t\t\t{ provide: \"GRAPHQL_CONFIG\", useValue: config },\n\t\t\t],\n\t\t\texports: [GraphQLService, GraphQLService.TOKEN],\n\t\t})\n\t\tclass ConfiguredGraphQLModule {}\n\t\tObject.defineProperty(ConfiguredGraphQLModule, \"name\", {\n\t\t\tvalue: \"ConfiguredGraphQLModule\",\n\t\t});\n\t\treturn ConfiguredGraphQLModule;\n\t}\n\n\t/**\n\t * Manually mount the GraphQL endpoint onto a Hono-compatible app.\n\t * Used by `main.ts` setups that don't go through `@Module`.\n\t */\n\tstatic async mount(\n\t\tapp: {\n\t\t\tpost: (path: string, ...h: any[]) => any;\n\t\t\tget: (path: string, ...h: any[]) => any;\n\t\t\tuse: (path: string, ...h: any[]) => any;\n\t\t},\n\t\tsvc: GraphQLService,\n\t): Promise<void> {\n\t\tconst path = svc.config.endpoint?.path ?? \"/graphql\";\n\t\tconst enableGet = svc.config.endpoint?.enableGet ?? true;\n\t\tconst exposeSDL = svc.config.exposeSchemaSDL ?? true;\n\t\tconst playground = svc.config.playground ?? \"graphiql\";\n\n\t\t// POST /graphql — queries + mutations.\n\t\tapp.post(path, async (c: Context) => {\n\t\t\tconst body = await readRequestBody(c);\n\t\t\tconst ctx = await svc.buildContext(c);\n\t\t\tconst result = await svc.execute(\n\t\t\t\tbody.query,\n\t\t\t\tparseJSONField(body.variables) ?? {},\n\t\t\t\tbody.operationName || undefined,\n\t\t\t\tctx,\n\t\t\t);\n\t\t\treturn c.json(result, statusFor(result) as any);\n\t\t});\n\n\t\t// GET /graphql — playground / pre-baked query (?query=...&variables=...).\n\t\tif (enableGet) {\n\t\t\tapp.get(path, async (c: Context) => {\n\t\t\t\tconst query = c.req.query(\"query\");\n\t\t\t\tif (!query) {\n\t\t\t\t\tif (playground === \"none\") {\n\t\t\t\t\t\treturn c.text(\"GraphQL endpoint. Pass ?query=... for a pre-baked query.\", 200);\n\t\t\t\t\t}\n\t\t\t\t\treturn c.html(graphiqlHtml({ endpoint: path }), 200, {\n\t\t\t\t\t\t\"Content-Type\": \"text/html; charset=utf-8\",\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tconst ctx = await svc.buildContext(c);\n\t\t\t\tconst result = await svc.execute(\n\t\t\t\t\tquery,\n\t\t\t\t\tparseJSONField(c.req.query(\"variables\") ?? \"\") ?? {},\n\t\t\t\t\tc.req.query(\"operationName\") ?? undefined,\n\t\t\t\t\tctx,\n\t\t\t\t);\n\t\t\t\treturn c.json(result, statusFor(result) as any);\n\t\t\t});\n\t\t}\n\n\t\t// GET /graphql/schema — debug: print the raw SDL.\n\t\tif (exposeSDL) {\n\t\t\tapp.get(`${path}/schema`, (c: Context) => {\n\t\t\t\treturn c.text(svc.getSchemaSDL(), 200, {\n\t\t\t\t\t\"Content-Type\": \"text/plain; charset=utf-8\",\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\t// Force schema bootstrap so the first request isn't slow.\n\t\tawait svc.ensureSchema();\n\t}\n}\n\n/** Read a GraphQL request body. Accepts JSON or form-urlencoded. */\nasync function readRequestBody(\n\tc: Context,\n): Promise<{ query: string; variables: string; operationName: string }> {\n\tconst ct = c.req.header(\"content-type\") ?? \"\";\n\tif (ct.includes(\"application/json\")) {\n\t\ttry {\n\t\t\tconst j = await c.req.json() as Record<string, unknown>;\n\t\t\treturn {\n\t\t\t\tquery: String(j.query ?? \"\"),\n\t\t\t\tvariables: j.variables ? JSON.stringify(j.variables) : \"\",\n\t\t\t\toperationName: j.operationName ? String(j.operationName) : \"\",\n\t\t\t};\n\t\t} catch {\n\t\t\treturn { query: \"\", variables: \"\", operationName: \"\" };\n\t\t}\n\t}\n\tif (ct.includes(\"application/x-www-form-urlencoded\")) {\n\t\tconst text = await c.req.text();\n\t\tconst params = new URLSearchParams(text);\n\t\treturn {\n\t\t\tquery: params.get(\"query\") ?? \"\",\n\t\t\tvariables: params.get(\"variables\") ?? \"\",\n\t\t\toperationName: params.get(\"operationName\") ?? \"\",\n\t\t};\n\t}\n\t// Default: assume form-urlencoded.\n\tconst text = await c.req.text();\n\tconst params = new URLSearchParams(text);\n\treturn {\n\t\tquery: params.get(\"query\") ?? \"\",\n\t\tvariables: params.get(\"variables\") ?? \"\",\n\t\toperationName: params.get(\"operationName\") ?? \"\",\n\t};\n}\n\nfunction parseJSONField(raw: string): Record<string, unknown> | undefined {\n\tif (!raw) return undefined;\n\ttry {\n\t\tconst parsed = JSON.parse(raw);\n\t\tif (parsed && typeof parsed === \"object\") {\n\t\t\treturn parsed as Record<string, unknown>;\n\t\t}\n\t} catch {\n\t\t/* fall through */\n\t}\n\treturn undefined;\n}\n\nfunction statusFor(result: { errors?: unknown[]; data?: unknown }): number {\n\tif (result.errors && (result.errors as unknown[]).length > 0 && !result.data) return 400;\n\treturn 200;\n}\n\n/** Minimal GraphiQL HTML — single-page, no CDN, no external assets. */\nfunction graphiqlHtml(opts: { endpoint: string }): string {\n\treturn `<!doctype html>\n<html lang=\"en\">\n<head>\n <meta charset=\"utf-8\">\n <title>GraphiQL</title>\n <style>\n body { font-family: system-ui, sans-serif; margin: 0; padding: 1em; }\n pre { background: #f5f5f5; padding: 0.6em; border-radius: 4px; overflow: auto; }\n .row { display: flex; gap: 1em; }\n textarea { width: 100%; min-height: 8em; font-family: ui-monospace, monospace; }\n button { padding: 0.4em 0.8em; }\n </style>\n</head>\n<body>\n <h2>GraphiQL (lightweight)</h2>\n <p>POST <code>${opts.endpoint}</code> · this is a no-deps playground built into\n <code>@nexusts/graphql</code>. For the full GraphiQL\n experience, see <code>graphiql</code> on npm.</p>\n <div class=\"row\">\n <textarea id=\"q\" placeholder=\"query { hello }\">{ hello }</textarea>\n </div>\n <p><button id=\"run\">Run</button> <span id=\"status\"></span></p>\n <pre id=\"out\"></pre>\n <script>\n const $q = document.getElementById(\"q\");\n const $out = document.getElementById(\"out\");\n const $status = document.getElementById(\"status\");\n document.getElementById(\"run\").onclick = async () => {\n $status.textContent = \"running…\";\n $out.textContent = \"\";\n const res = await fetch(${JSON.stringify(opts.endpoint)}, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({ query: $q.value }),\n });\n const j = await res.json();\n $status.textContent = res.status + \" \" + res.statusText;\n $out.textContent = JSON.stringify(j, null, 2);\n };\n </script>\n</body>\n</html>`;\n}\n"
11
11
  ],
12
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA;;;ACKA;AAGA,IAAM,eAAe,OAAO,IAAI,wBAAwB;AACxD,IAAM,aAAa,OAAO,IAAI,sBAAsB;AACpD,IAAM,eAAe,OAAO,IAAI,wBAAwB;AAKxD,IAAM,oBAAoB,IAAI;AAEvB,SAAS,QAAQ,CAAC,UAAmC;AAAA,EAC3D,OAAO,CAAC,WAAqB;AAAA,IAC5B,MAAM,OAAO;AAAA,IACb,MAAM,WAAW,YAAY,KAAK,KAAK,QAAQ,aAAa,EAAE;AAAA,IAC9D,QAAQ,eAAe,cAAc,MAAM,IAAI;AAAA,IAC/C,QAAQ,eAAe,cAAc,UAAU,IAAI;AAAA,IACnD,IAAI,CAAC,QAAQ,YAAY,YAAY,IAAI,GAAG;AAAA,MAC3C,QAAQ,eAAe,YAAY,CAAC,GAAG,IAAI;AAAA,IAC5C;AAAA,IACA,kBAAkB,IAAI,IAAI;AAAA;AAAA;AAKrB,SAAS,sBAAsB,GAAe;AAAA,EACpD,OAAO,CAAC,GAAG,iBAAiB;AAAA;AAItB,SAAS,qBAAqB,GAAS;AAAA,EAC7C,kBAAkB,MAAM;AAAA;AAIlB,SAAS,mBAAmB,CAAC,QAAoC;AAAA,EACvE,MAAM,IAAK,OAAkC,aAAa;AAAA,EAC1D,MAAM,WAAW,QAAQ,YAAY,cAAc,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AAAA;AAAA;AAAA;AAAA,kBAeU,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAeS,KAAK,UAAU,KAAK,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
13
+ "debugId": "B30BF2D35C2162C164756E2164756E21",
14
14
  "names": []
15
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexusts/graphql",
3
- "version": "0.8.4",
3
+ "version": "0.9.0",
4
4
  "description": "SDL-first GraphQL endpoint with @Resolver decorators",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -34,7 +34,7 @@
34
34
  }
35
35
  },
36
36
  "dependencies": {
37
- "@nexusts/core": "^0.8.4"
37
+ "@nexusts/core": "^0.9.0"
38
38
  },
39
39
  "repository": {
40
40
  "type": "git",