The Discourse API in GraphQL

So far, I’m focusing on writing it as a separate service layer on top of REST - so the backend API of Discourse remains identical to what it is today, but someone like a mobile app developer can choose to use the GraphQL API if they find it easier.

It’s important that you don’t have to write your backend in JavaScript - it would be crazy to do a complete rewrite at this point! But with the approach of an API wrapper, the developers that are using the REST API and are happy writing the backend in Rails and ActiveRecord can continue doing so.

Part of the project we are working on now is about making it very very easy to write a GraphQL wrapper around any HTTP API, so future posts will demonstrate how that applies to an API like Discourse. We’re also working on a simple yet robust GraphQL client so that it’s easy to build the backend and frontend parts of your app.

I’m excited that people see the potential here, even if there is some skepticism about the difficulty of the implementation—that’s exactly the part we want to improve :]