Anyone thought of connecting Hasura to Discourse's Postgres database for a potentially more customised (or narrowed down) FE?

Having had a play with the inherited database, what @Falco says in this post is very evident.

Not very much of Postgres’s power is used. Almost all of the logic is done in Ruby land.

So my conclusion is that this is not entirely helpful in itself at all.

Another approach is using Hasura’s remote schema functionality but to do that Discourse would need a GraphQL API, not REST… so also in itself not very helpful.

But there is the possibility to wrap pre-existing REST APIs within a GraphQL layer. This looks more promising than the above (or rather, in combination with the above). In this article, they point to a repository with boilerplate code to get started

2 Likes