Skip to content

Commit

Permalink
Fix: Remove incorrect cors option type from apollo-server-express's c…
Browse files Browse the repository at this point in the history
…onstructor

#2330 (comment)
  • Loading branch information
cheapsteak committed Feb 25, 2019
1 parent 85470d0 commit b2bfd08
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion packages/apollo-server-express/src/ApolloServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ export interface ExpressContext {
}

export interface ApolloServerExpressConfig extends Config {
cors?: CorsOptions | boolean;
context?: ContextFunction<ExpressContext, Context> | Context;
}

Expand Down
6 changes: 5 additions & 1 deletion packages/apollo-server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ export class ApolloServer extends ApolloServerBase {
private httpServer?: http.Server;
private cors?: CorsOptions | boolean;

constructor(config: ApolloServerExpressConfig) {
constructor(
config: ApolloServerExpressConfig & {
cors?: CorsOptions | boolean;
},
) {
super(config);
this.cors = config && config.cors;
}
Expand Down

0 comments on commit b2bfd08

Please sign in to comment.