graphql-typed-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)
21 lines (18 loc) • 638 B
text/typescript
import { BuildSchemaOptions, ParseOptions } from 'graphql'
import { GraphQLSchemaValidationOptions } from 'graphql/type/schema'
import { SchemaFetcher } from './schema/fetchSchema'
import { Options as SchemaPrintOptions } from 'graphql/utilities/schemaPrinter'
export interface Options {
schemaValidation?: GraphQLSchemaValidationOptions
schemaPrint?: SchemaPrintOptions
schemaBuild?: BuildSchemaOptions & ParseOptions
typeMapper?: { location: string; types: [string] }
}
export interface Config {
endpoint?: string
post?: boolean
schema?: string
output?: string
fetcher?: string | SchemaFetcher
options?: Options
}