Hey 👋
We don’t currently have an API for cancelling queries.
But this is definitely a valid use case, would you mind creating a
Feature Request?
As of now, $disconnect is the only way to disconnect the database connection which as you said would cancel all queries.