pledge4future/WePledge

Improve structure of models.py and schema.py

Opened this issue · 2 comments

Currently, all of our GraphQL tables are defined in WePledge/backend/src/emissions/models.py

Django requires the tables to be defined in models.py but this is causing the file to be too big which makes looking for tables a bit complicated.

An alternate way of storing the models is described here

Since this task will require moving around all the models. we should do a thorough smoke test of the application before merging

Also restructure schema.py.

most of the schema file split is done, but in order to make sure everything is running smoothly, I wanted to redo and add more tests as well, and am currently stuck trying to import the models to tests. I think this is probably due to how I have docker setup on my laptop.

branch: 130-improve-structure-of-schemapy