Promise.All not return data when define multiple promises in node.js
<p>I have an endpoint with mean.js that run multiple queries passed in an array, I want to run every query and return only one promise, I am using map to create each response and finally I want to response the result of all promises with promise.all.</p>

<pre><code>var db = require(path.resolve('sequelize'));

exports.runQueries= function (req, res, queries) {

  // queries os an array

  var runQueries = function(query){
    return new Promise(resolve =&gt; db.sequelize.query(query, { type: db.Sequelize.QueryTypes.SELECT }));
  };

  var actions = queries.map(runQueries);

  Promise.all(actions).then(function(data){
    res.send(data);
  });

};
</code></pre>

<p>The problem is that each promises is in pending state and Promise.all().then never come.</p>