amazon-archives / aws-appsync-chat

Real-Time Offline Ready Chat App written with GraphQL, AWS AppSync, & AWS Amplify
Apache License 2.0
557 stars 295 forks source link

how to identify number of active subscribers by subscription in appsync #12

Open ghost opened 5 years ago

ghost commented 5 years ago

Need to keep count of how many subscribers are connected with each subscription.

For UserA, UserB are connected with SubscriptionA : then 2 is the total subscribers For UserA are connected with SubscriptionB : then 1 is the total subscribers

Can i know when UserA unsubscribes , subscribes, disconnects, reconnects from AppSync ?

rudyhadoux commented 4 years ago

You can add to User a boolean attribute for "a connected state". And do subscriptions linked to this attribute.