Skip to content

Commit 48f1ac6

Browse files
committed
fix(subscriptions): add keepalive timeout and log connections
1 parent 47cc39d commit 48f1ac6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ const server = new ApolloServer({
3535
context,
3636
introspection: true,
3737
playground: true,
38+
subscriptions: {
39+
keepAlive: 5000,
40+
onConnect: () => console.log('User connected to socket'),
41+
},
3842
});
3943

4044
server.applyMiddleware({app, cors: true});

0 commit comments

Comments
 (0)