UNPKG

@gqlts/cli

Version:

Generate a client sdk from your GraphQl API

25 lines (24 loc) 878 B
import { Config } from '../../config'; import { GraphQLSchema } from 'graphql'; import { BuiltInParserName } from 'prettier'; interface Import { isDefault: boolean; module?: string; alias?: string; } interface ImportMap { [from: string]: Import[]; } export declare class RenderContext { schema?: GraphQLSchema | undefined; config?: Config | undefined; protected codeBlocks: string[]; protected imports: ImportMap; protected importAliasCounter: number; constructor(schema?: GraphQLSchema | undefined, config?: Config | undefined); addCodeBlock(block: string): void; addImport(from: string, isDefault: boolean, module?: string, fromAbsolute?: boolean, noAlias?: boolean): string | undefined; protected getImportBlock(): string | undefined; toCode(parser?: BuiltInParserName, pretty?: boolean): Promise<string>; } export {};