How to handle Database connections in MONGO-GRAPHQL-MONGOOSE-NODE
I am developing an app using the above techs. I have a doubt about handling mongodb connections. Which one is the best
- Create Mongooose connection on beginnning and use it
- Create connection for each resolve and close it inside
- Or anything better