graphql-mesh icon indicating copy to clipboard operation
graphql-mesh copied to clipboard

Transports should have dispose function

Open enisdenjo opened this issue 2 months ago • 0 comments

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.

enisdenjo avatar Apr 12 '24 17:04 enisdenjo