RFC: Implementation of PubSweet versions 1.2 and 1.3
At a one day meeting in London this week, we (@tamlyn, @g-sam and myself) have come up with the following plan for versions 1.2 and 1.3 (1.1 is missing from this list as it was erroneously published while testing the new monorepo publishing system, sorry!). In summary, the plan below enacts a move to PostgreSQL as the main datastore for PubSweet (winning over our current PouchDB for reasons related to production support, data integrity, tooling and size and activity of community), and a switch to GraphQL support. As both moves are rather big, we've tried to chunk them in smaller pieces listed below. Please let us know what you think!
v1.2 “PostgreSQL”
1. Switch to PostgreSQL
- Remove relational-pouch
- Update setupdb to create the four base tables as (id INT, data JSONB)
- Update models to query PostgreSQL
2. Move fragment model into separate package
- Use real columns, not JSONB
- Introduce migrations, run in datetime order
3. Move collections into separate package
- Enhance migrations runner to be aware of package dependencies
v1.3 “GraphQL”
Server
- Define user, team, collection and fragment types
- Create graphql endpoint
- Import types and from model packages and merge them
- Define resolvers
Client
- Update pubsweet-client and components to use Apollo Client (see the graphql branches in the old repos for a starting point)
Starter app
- Update to use new package versions