Unofficial Discourse GraphQL API Plugin

discourse-graphql - GitHub - tgxworld/discourse-graphql

Hi all, I’ll like to share the discourse-graphql plugin which I’ve been working on recently as a personal project. The plugin is still a work in progress as there are only 3 query fields being exposed. Since I personally don’t use the Discourse API for integration, I’ll like to hear from potential users what queries or mutations you’ll like to see added to the plugin. Simply provide me with your use case and what fields you’re looking for in this topic so that I can add it to the plugin.

15 Likes

Hi @tgxworld, very interesting stuff.
As you already working in this direction - what do you think about
GitHub - dosco/super-graph: Super Graph - Fetch data without code!

Vikram Rangnekar - Super Graph an instant GraphQL API service in Go - YouTube

Or is it a crazy idea to use it with Discourse?
AFAIK it works with Rails in nice way, including Rails authentication supported (Redis, Memcache, Cookie). And it can be integrated in existing Rails apps, but I’m not sure if it is realistic to use it within a plugin.

What do you think?

Hi @4ong :wave:

Super Graph looks interesting but I’m not sure if it’ll fit our needs here. The main problem I see is that the SQL queries that we need to generate is not straight forward and can involve many conditional paths. Those conditions are probably not easy to express with just a GraphQL query.

3 Likes

Dear Alex,

Thank you for sharing this plugin. I learned a lot from reading your plugin code and how you approached this.

Bookmarked!

Thanks again.