Summary
Multiple Pinia stores create GraphQL subscriptions that are never unsubscribed, causing memory leaks that grow over the session lifetime.
Findings
Impact
Memory and connection usage grows with each auth state change. Long sessions accumulate hundreds of active subscriptions.
Suggested Fix
Create a useSubscriptionManager() composable that stores subscription references, auto-unsubscribes previous on same key, and provides cleanup on logout/unmount.
Related Issues (Memory Leak Pattern)
Summary
Multiple Pinia stores create GraphQL subscriptions that are never unsubscribed, causing memory leaks that grow over the session lifetime.
Findings
Impact
Memory and connection usage grows with each auth state change. Long sessions accumulate hundreds of active subscriptions.
Suggested Fix
Create a useSubscriptionManager() composable that stores subscription references, auto-unsubscribes previous on same key, and provides cleanup on logout/unmount.
Related Issues (Memory Leak Pattern)