import type { FastifyInstance } from 'fastify'; import type { FSWatcher, WatchOptions as ChokidarOptions } from 'chokidar'; import type { CodegenPluginsConfig } from './code'; declare const plugin: import("@graphql-codegen/plugin-helpers").PluginFunction; export { plugin }; export type {} from '@graphql-codegen/plugin-helpers'; export interface CodegenMercuriusOptions { /** * Specify the target path of the code generation. * * Relative to the directory of the executed script if targetPath isn't absolute * @example './src/graphql/generated.ts' */ targetPath: string; /** * Disable the code generation manually * * @default process.env.NODE_ENV === 'production' */ disable?: boolean; /** * Don't notify to the console */ silent?: boolean; /** * Specify GraphQL Code Generator configuration * @example * codegenConfig: { * scalars: { * DateTime: "Date", * }, * } */ codegenConfig?: CodegenPluginsConfig; /** * Add code in the beginning of the generated code */ preImportCode?: string; /** * Operations glob patterns */ operationsGlob?: string[] | string; /** * Watch Options for operations GraphQL files */ watchOptions?: { /** * Enable file watching * * @default false */ enabled?: boolean; /** * Extra Chokidar options to be passed */ chokidarOptions?: ChokidarOptions; /** * Unique watch instance * * `Specially useful for hot module replacement environments, preventing memory leaks` * * @default true */ uniqueWatch?: boolean; }; /** * Write the resulting schema as a `.gql` or `.graphql` schema file. * * If `true`, it outputs to `./schema.gql` * If a string it specified, it writes to that location * * @default false */ outputSchema?: boolean | string; } export declare function codegenMercurius(app: FastifyInstance, { disable, targetPath, silent, codegenConfig, preImportCode, operationsGlob, watchOptions, outputSchema, }: CodegenMercuriusOptions): Promise<{ closeWatcher: () => Promise; watcher: Promise; }>; export default codegenMercurius; export { gql, DeepPartial, LazyPromise, PLazy } from './utils'; export { CodegenPluginsConfig, generateCode, writeGeneratedCode } from './code'; export declare const loadSchemaFiles: typeof import('./schema').loadSchemaFiles; export type { LoadSchemaOptions, PrebuildOptions } from './schema';