Skip to content

Commit

Permalink
Merge pull request #53 from bikov/master
Browse files Browse the repository at this point in the history
feat(server): export apollo server so users can test their logic
  • Loading branch information
bikov authored Apr 28, 2019
2 parents 3dc34a7 + 211dfa8 commit 2cbeef7
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 2cbeef7

Please sign in to comment.