Skip to content

Commit

Permalink
fix: Resolve promise with server in non-subscription case
Browse files Browse the repository at this point in the history
Resolve promise with server in non-subscription case
  • Loading branch information
schickling committed Feb 23, 2018
2 parents 6c0cfa1 + 6a265f3 commit d25294f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/index.ts
Expand Up @@ -233,9 +233,11 @@ export class GraphQLServer {

return new Promise((resolve, reject) => {
if (!subscriptionServerOptions) {
app.listen(this.options.port, () => {
const server = createServer(app)

server.listen(this.options.port, () => {
callbackFunc(this.options)
resolve()
resolve(server)
})
} else {
const combinedServer = createServer(app)
Expand Down

0 comments on commit d25294f

Please sign in to comment.