Skip to main content

removeSubscription()

Closes and removes a subscription and returns the number of open subscriptions.

supabase.removeSubscription(mySubscription)

Parameters

  • subscriptionrequireddefault

    The subscription you want to close and remove.

Notes

  • Removing subscriptions is a great way to maintain the performance of your project's database. Supabase will automatically handle cleanup 30 seconds after a user is disconnected, but unused subscriptions may cause degradation as more users are simultaneously subscribed.

Examples

Remove a subscription

supabase.removeSubscription(mySubscription)