UNPKG

graphql-typed-apollo-client

Version:

A tool that generates a strongly typed client library for any GraphQL endpoint. The client allows writing GraphQL queries as plain JS objects (with type safety, awesome code completion experience, custom scalar type mapping, type guards and more)

25 lines (24 loc) 851 B
import { GraphQLSchema } from 'graphql'; import { BuiltInParserName } from 'prettier'; import { Config } from '../../config'; 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): string; } export {};