title: What is better, single endpoint but multiple db query or multiple endpoint with single db query
body: <p>When my app loads, I will get the data from server (express) and place the result to redux (my global state). What I have now is multiple endpoint like this:</p>
  
  <ul>
  <li>api/get/hmo</li>
  <li>api/get/groups</li>
  <li>api/get/items</li>
  <li>api/get/papers</li>
  </ul>
  
  <p>each has a normal select db query.</p>
  
  <p>Is there will be a downside if I will make it a single endpoint and make a multiple select and return it to client all at once like this:</p>
  
  <ul>
  <li>api/get/allData</li>
  </ul>
  
  <p>and inside my controller something like:</p>
  
  <pre><code>const hmo = Select * from hmo;
  const groups = Select * from groups;
  const items = Select * from items;
  const papers = Select * from papers;
  
  return res.send(200).json({
     hmo,
     groups,
     items,
     papers
  })
  </code></pre>
  
  <p>What is the best practice and which is faster on the two?</p>