Scaling to 1M active GraphQL subscriptions on Postgres
An alternative approach is to refetch all the data for a particular query (with the appropriate authorization rules for the specific client). Data loader type patterns can alleviate the problem, but will still query the underlying Postgres database multiple times (reduces to as many nodes in the GraphQL query from as many items in the response). However, considering that we have all the application-user level session variables available at the API layer, we can actually create a single SQL query to re-fetch data for a number of clients all at once!
Source: github.com