title: Wrap APIs from multiple data sources in Node.js
body: <p>I'm now developing a middleware layer for new project based on Node.js. It needs to retrieve data from both the "pure backend APIs(RESTful APIs)" and some databases(MongoDB, MySQL, etc.), then mix those data with some conditional filters and expose as new APIs for all clients.</p>
  
  <p>At this moment, I just wrap those data getters as Promises and filter the data which I need. But I wonder if there's any graceful solution for that requirements. </p>
  
  <p>Here're some approach candidates:</p>
  
  <ul>
  <li><p><strong>LoopBack</strong>: LoopBack framework can define models beyond multiple data source. However, it seems like LoopBack only support "model level" multiple datasource, and doesn't support "fields level" data source, which means that we couldn't define a specific model with some fields from databases and the others from RESTful APIs.</p></li>
  <li><p><strong>GraphQL</strong>: I'm new for GraphQL, however it seems like GraphQL could have some connectors for both RESTful APIs and databases.</p></li>
  </ul>
  
  <p>Any other packages or libraries are appreciated! Thanks all!</p>