Headless GraphQL CMS

stereobooster - Apr 7 '19 - - Dev Community

What I'm looking for?

CMS - admin section of a website to edit the content (CRUD operations). This task was solved so many times, I don't want to do it again, I want to use something existing, something that works out of the box.

Headless CMS - means that CMS doesn't provide frontend section of the website it only provides the backend for editing. For example, Wordpress is not headless by default, it generates also the website.

GraphQL has many aspects, but I'm interested in it as API specification. It is possible to generate type signatures from GraphQL specification or generate validators (like io-ts) so it creates "end-to-end type checking" experience. From this point of view, OpenAPI as specification would also work.

Open source - I would like to be able to deploy it myself, for example, to use it in intranet application.

Relational database support - I would like to be able to backup my content or use it in a different application. A relational database is a well-understood abstraction. It is easy to backup, replicate, inspect with SQL client, visualize with superset, build ER diagram for it. For example, ponzu (awesome project) but it uses its own internal database, which stops me from using it.

S3 for assets (optional) - it would be nice if CMS could upload assets to S3 bucket (or similar service) so I wouldn't need to worry about storing files, backups, and migration.

Not a priority for me (but maybe a priority for others):

Access control - I don't need granular permissions.

High load support or rate limiting - API will be used to generate static website so I don't care about the high load.

Mutations - I don't need to write or modify data through API.

Options

CMS which were built with this use case in mind and provide all feature out of the box, for example, strapi, prime, etc.

Headless CMS without GraphQL + some proxy to convert API to GraphQL, for example, Ghost + Gatsby's Ghost plugin.

Headless CMS without GraphQL + Postgraphile or Hasura.

Framework to generate headless CMS + Postgraphile or Hasura, for example, Rails frameworks.

What I found

I did a small research and found some options but will be grateful for additional hints. I used docker-compose for my experiments. All intermediate results documented in the repo.

Strapi

Website: https://strapi.io/
Technology: ECMAScript, MongoDB or MySQL or MariaDB or PostgreSQL

One which actually works (I had problems starting some other projects). I had only one question: why does it need to restart after every change in schema or plugin installation, it feels they doing some hacks there.

Prime

Website: https://docs.primecms.app/
Technology: TypeScript, PostgreSQL

Looks cool, but I wasn't able to start it. The project is young - there is only one core maintainer. The author doing cool things, but documentation is still lagging behind and first-time user experience could be better.

Cockpit

Website: https://getcockpit.com/
Technology: PHP, ECMAScript, SQLite or MongoDB, Apache

It seems it is not actively maintained. I wasn't able to figure out how to install GraphQL plugin.

WordPress as headless CMS

Website: https://wordpress.org/
Technology: PHP, ECMAScript, MySQL

People from postlight have extended article about this option. I don't like this solution - WordPress wasn't built for this use case. It is possible to add 2-3 plugins to make it work, but it feels hackish and UX is clumsy.

Ghost as CMS

Website: https://ghost.org/
Technology: ECMAScript, MySQL

Doesn't provide GraphQL, but it is possible to use Gatsby development server as GraphQL proxy. Doesn't support the custom types of content.

Directus as CMS

Website: https://directus.io/
Technology: PHP, ECMAScript, Vue, MySQL

Doesn't provide GraphQL API.

Rails-based admin section

Technology: Ruby on Rails, relational database

There a lot of solutions for the automatic or semiautomatic generation of CMS for Rails, for example:

But not so good with GraphQL API generation (at least I don't know about it). So the trick is to use Rails for CMS and use something else for GraphQL API, for example, postgraphile.

Postgraphile (PostgreSQL-based API)

Website: https://www.graphile.org/postgraphile/

PostGraphile automatically detects tables, columns, indexes, relationships, views, types, functions, comments, and more — providing a GraphQL server that is highly intelligent about your data, and that automatically updates itself without restarting when you modify your database

Can be used together with any CMS which works with PostgreSQL. I also tried to use it with react-admin, but this attempt failed.

Tried to use CockroachDB instead of PostgreSQL, but no luck.

Hasura (PostgreSQL-based API)

Website: https://hasura.io/

Instant Real-time GraphQL on Postgres

Looks impressive. Has built-in CMS (I guess quite primitive, but this is better than nothing).

Can be used together with any CMS which works with PostgreSQL.

Help

What do I miss? Are there good CMSes with GraphQL or OpenAPI support that I'm not aware of? Are there good API providers for databases?

Photo by Mika on Unsplash

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player