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

Cleaning up resources in context after request

Open DrPyser opened this issue 6 years ago • 0 comments

I'm using the graphql context to pass (potentially) shared resources, like database connections, to the schema resolvers. These resources eventually need to be cleaned up(i.e. closing connections).

What's the best way to do that right now?

Thanks!

DrPyser avatar Nov 21 '18 20:11 DrPyser