graphql-mesh
graphql-mesh copied to clipboard
Transports should have dispose function
Some transports have long-living connections, like mysql and neo4j. Currently we depend on the pubsub destroy event to close the connections, but this doesn't work because:
- Not clear to the user
- Prone to errors because user might just not provide it
- pubsub is used for subscriptions, not disposal
Instead of relying on the pubsub, each transport should implement a dispose
function that closes any relevant connections during shutdown.