From 89ef5864b697392f5ae09d57bc1f7782348838eb Mon Sep 17 00:00:00 2001 From: Dhairy Tripathi <47829719+hexdecimal16@users.noreply.github.com> Date: Thu, 21 Oct 2021 15:02:11 +0530 Subject: [PATCH] start server before applying middleware --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 8b502d8..8d66b48 100644 --- a/src/index.ts +++ b/src/index.ts @@ -19,7 +19,7 @@ const main = async () => { const apolloServer = new ApolloServer({ schema }); const app = Express(); - + await apolloServer.start(); apolloServer.applyMiddleware({ app }); app.listen(4000, () => {