diff --git a/index.js b/index.js index afeb2b8..4e5de99 100644 --- a/index.js +++ b/index.js @@ -22,6 +22,12 @@ const createDatabaseGetter = ({ } const getConnectionInfo = (database, user) => { + if (singletonDB) + return { + ...singletonDB.connection, + database: database || singleton.connection.database, + user: user || singleton.connection.user, + } const uri = process.env.POSTGRES_URI || process.env.PG_URI ||