UNPKG

graphql-gene

Version:

Generates automatically an executable schema out of your ORM models

17 lines (16 loc) 626 B
import { GraphQLSchema, DocumentNode } from 'graphql'; import { AnyObject } from './types/typeUtils'; import { GenePlugin, Resolvers, ResolversOrScalars } from './types'; export declare function generateSchema<SchemaTypes extends AnyObject, DataTypes extends AnyObject>(options: { schema?: GraphQLSchema | DocumentNode | string; resolvers?: ResolversOrScalars; plugins?: GenePlugin[]; types: SchemaTypes; dataTypeMap?: DataTypes; }): { schema: GraphQLSchema; readonly schemaString: string; readonly typeDefs: DocumentNode; readonly resolvers: Resolvers; readonly schemaHtml: string; };