michalkvasnicak / aws-lambda-graphql

Use AWS Lambda + AWS API Gateway v2 for GraphQL subscriptions over WebSocket and AWS API Gateway v1 for HTTP
https://chat-example-app.netlify.com
MIT License
459 stars 92 forks source link

How do I listen on the socket of 'connect' 'disconnet' method ? #145

Closed allran closed 3 years ago

allran commented 3 years ago

I need add some code in the 'connect' 'disconnet' function. Is there any way to listen it ?

michalkvasnicak commented 3 years ago

You can use onWebsocketConnect, onConnect and onDisconnect. It's documented in readme.