UNPKG

1 kBTypeScriptView Raw
1import { FileOutput, GraphQLSchema, DocumentFile, Types, CodegenPlugin } from 'graphql-codegen-core';
2export interface GenerateOutputOptions {
3 filename: string;
4 plugins: Types.ConfiguredPlugin[];
5 schema: GraphQLSchema;
6 documents: DocumentFile[];
7 pluginLoader: Types.PluginLoaderFn;
8 inheritedConfig: {
9 [key: string]: any;
10 };
11}
12export interface ExecutePluginOptions {
13 name: string;
14 config: Types.PluginConfig;
15 schema: GraphQLSchema;
16 documents: DocumentFile[];
17 outputFilename: string;
18 allPlugins: Types.ConfiguredPlugin[];
19 pluginLoader: Types.PluginLoaderFn;
20}
21export declare function executeCodegen(config: Types.Config): Promise<FileOutput[]>;
22export declare function generateOutput(options: GenerateOutputOptions): Promise<FileOutput>;
23export declare function getPluginByName(name: string, pluginLoader: Types.PluginLoaderFn): Promise<CodegenPlugin>;
24export declare function executePlugin(options: ExecutePluginOptions): Promise<string>;