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)
22 lines (21 loc) • 555 B
TypeScript
import { GraphQLSchema } from 'graphql';
import { RenderContext } from '../common/RenderContext';
export interface ArgMap {
[arg: string]: [string, string] | undefined;
}
export interface Field {
type: string;
args?: ArgMap;
}
export interface FieldMap {
[field: string]: Field | undefined;
}
export interface Type {
name: string;
fields?: FieldMap;
scalar?: string[];
}
export interface TypeMap {
[type: string]: Type | undefined;
}
export declare const renderTypeMap: (schema: GraphQLSchema, ctx: RenderContext) => void;