*Why* So the config for each of them can be modified in a scalable manner (by the admin server) than with just plain json files
*How*
* Use sequelize to define models for Data Source, Resolver & Data Schema * Allow env var based config for configuring sequelize to connect to postgres * Modify existing logic where json files are read in to do a 'find/findAll' on the corresponding sequelize model instead * Leverage model relationships where necessary * Ensure the model definitions are in line with what the admin ui/server will be using (ping [~peter.braun] on PRs)
NOTE: See follow up task https://issues.jboss.org/browse/AEROGEAR-3504 for changes to do hot schema update, whenever things change in the database. For this task, only the initial setup of the graphql api should be considered. However, the follow up task should be done soon afterwards. |
|