import express = require("express"); import { ApolloServer } from 'apollo-server-express'; import { GraphQLSchema } from 'graphql'; import UserResolver from './resolvers/user/UserResolver'; import { Connection, ConnectionOptions, BaseEntity } from 'typeorm'; import User from './models/User'; import { ExpressContext } from 'apollo-server-express/dist/ApolloServer'; import { UserService } from './services/UserService'; import { Tracer } from "tracer"; import GrapheneConfig from './models/GrapheneConfig'; export interface GrapheneContext extends ExpressContext { user: { id?: string; }; } export interface GrapheneOptions { entities?: (typeof BaseEntity)[]; resolvers?: (string | Function)[]; connection?: ConnectionOptions; port?: number; hostname?: string; secret?: string; adminPassword?: string; customHead?: string; customEndpoint?: string; customUser?: typeof User; customUserResolver?: typeof UserResolver; customUserService?: typeof UserService; inputRenderers?: Record; cellRenderers?: Record; hiddenContentTypes?: string[]; demoMode?: boolean; authExpire?: number; } export declare class GrapheneServer { logger: Tracer.Logger; options: GrapheneOptions; schema: GraphQLSchema; apollo: ApolloServer; express: express.Express; orm: Connection; clientConfig: GrapheneConfig; private constructor(); static create(opts?: GrapheneOptions): Promise; private createAdminUser; listen(): Promise; }