Skip to content

Commit

Permalink
Remove "starting" state, since it's never distinguished from "invokin…
Browse files Browse the repository at this point in the history
…g serverWillStart" state.
  • Loading branch information
sachindshinde committed Jun 25, 2021
1 parent 7ca461a commit 5eabab2
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions packages/apollo-server-core/src/ApolloServer.ts
Expand Up @@ -81,11 +81,6 @@ export type SchemaDerivedData = {

type ServerState =
| { phase: 'initialized'; schemaManager: SchemaManager }
| {
phase: 'starting';
barrier: Resolvable<void>;
schemaManager: SchemaManager;
}
| {
phase: 'invoking serverWillStart';
barrier: Resolvable<void>;
Expand Down Expand Up @@ -370,11 +365,6 @@ export class ApolloServerBase {
}
const schemaManager = this.state.schemaManager;
const barrier = resolvable();
this.state = {
phase: 'starting',
barrier,
schemaManager,
};
let loadedSchema = false;
try {
await schemaManager.start();
Expand Down Expand Up @@ -523,7 +513,6 @@ export class ApolloServerBase {
throw new Error(
'You need to call `server.start()` before using your Apollo Server.',
);
case 'starting':
case 'invoking serverWillStart':
await this.state.barrier;
// continue the while loop
Expand Down

0 comments on commit 5eabab2

Please sign in to comment.