import { type ExecutorContext } from '@nx/devkit'; /** * Options for the build-schema executor. * Builds a GraphQL schema file from NestJS resolver classes. * * @example * // In project.json executor options: * // { * // "schemaFile": "dist/schema.graphql", * // "resolversModule": "src/app/resolvers.ts", * // "project": "my-api" * // } */ export interface IBuildSchemaExecutorSchema { /** Output path for the .graphql schema file (relative to workspace root). */ schemaFile: string; /** Path to module that exports GraphQLSchema array of NestJS resolver classes. */ resolversModule: string; /** NX project name (defaults to current project). */ project?: string; } /** * NX executor that builds a GraphQL SDL schema file from NestJS resolver classes. * Resolves and imports the resolvers module, validates the GraphQLSchema export exists, * uses NestJS's schema factory to build the GraphQL schema, and writes SDL to file. * All errors are logged via console.error and returned as success: false. * * @param options - Executor options. * @param context - NX executor context. * @returns Execution result with success flag (never throws; returns success: false on error). * @example * const result = await buildSchemaExecutor( * { schemaFile: 'dist/schema.graphql', resolversModule: 'src/app/resolvers.ts' }, * context * ); * // result: { success: true } */ export default function buildSchemaExecutor(options: IBuildSchemaExecutorSchema, context: ExecutorContext): Promise<{ success: boolean; }>; //# sourceMappingURL=executor.d.ts.map