UNPKG

@gqlts/cli

Version:

Generate a client sdk from your GraphQl API

14 lines (13 loc) 867 B
import { RenderContext } from '../render/common/RenderContext'; import { GraphQLNamedType, GraphQLSchema } from 'graphql'; import { BuiltInParserName } from 'prettier'; export interface TypeRenderer { (type: GraphQLNamedType, ctx: RenderContext): void; } export interface SchemaRenderer { (schema: GraphQLSchema, ctx: RenderContext): void; } export declare function toClientSchema(schemaGql: string): Promise<GraphQLSchema>; export declare function schemaRenderTest(schemaGql: string, renderer: SchemaRenderer, parser?: BuiltInParserName): Promise<string>; export declare function typeRenderTest(schemaGql: string, renderer: TypeRenderer, typeNames: string[], parser?: BuiltInParserName): Promise<string>; export declare function typeRenderTestCase(dirName: string, file: string, renderer: TypeRenderer, typeNames: string[], output?: boolean): Promise<void>;