Skip to content

Commit

Permalink
feat(server): export apollo server so users can test their logic
Browse files Browse the repository at this point in the history
  • Loading branch information
bikov committed Apr 28, 2019
1 parent 27d646a commit 211dfa8
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 140 deletions.
169 changes: 30 additions & 139 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/server/graphql-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,19 @@ import { IrrelevantEntitiesExtension } from './irrelevant-entities-extension';
import { PolarisContext } from './polaris-context';

export interface GraphQLServer {
server: ApolloServer;

start(app?: Koa<any, {}>): void;

stop(): void;
}

export type contextCreator = (ctx: Koa.Context) => object;

@injectable()
export class PolarisGraphQLServer implements GraphQLServer {
server: ApolloServer;
private app: Koa;
private server: ApolloServer;
private polarisProperties: PolarisProperties;
private customContexts: contextCreator[] = [];
private httpServer?: http.Server;
Expand Down

0 comments on commit 211dfa8

Please sign in to comment.