The Discourse API in GraphQL

Thanks sashco, I’m really glad that you are looking into this. One of the reasons I’m focusing my time on looking at discourse is to investigate these kinds of issues as they reply to a well-engineered real world application and it’s great to see that other folk are doing the same.

I don’t know if there is anything practical here for the discourse team, but discourse is a great starting point to explore this.

I would like to mention breeze.js and jaydata as things to possibly look at as odata has been around for years and never seems to get mentioned with graphql, but covers the same use cases and is pretty mature. Graphql seems cleaner, but we are missing an opportunity to relate their approaches if we just forget about it or don’t know that it exists.

I thought breeze was interesting. It worked out of the box if you were using sql server and entity framework as it used the entity frameworks metadata (with a big caveat about version matching), but then they extracted that part out into a javascript library so that you could put the javascript library on the server and use it there to create your own metadata by script or by hand when using mongo or postgres.

This is a quick overview of the idea

I think that the biggest problems graphql will face are similar, crafting the schemas in particular, then authentication and authorization and finally the simple but necessary mapping of the different server side language conventions to javascript. If I’m right the graphql structure makes it so that cycles are not a problem, is that right?

Probably just for any trivia buffs in the end, but I thought it was at least worth mentioning. I’ll be following what you do here for sure.