Visual query builder from Graphql schema
Hello, I am quite new at graphql, but I love the way we can query the graphql API with the graphiql interface so easily. I would like to push this concept forward, and make an interface designed for non-developers who don't like to see a single line of code: I was wondering if it would make sense to you, and would be technically possible, to automatically create a visual query builder similar to the JQuery Builder (https://querybuilder.js.org/) based on graphql schemas? And what would be the limitations of such tool? It looks feasible to me, but I have searched for some implementations but found nothing. I was wondering if anyone is aware of such visual query builder interface or would like to contribute to build one?
I've been meaning to open source this https://youtu.be/C6-Uu9Ljh9U?t=61 (try it here https://graphiql.onegraphapp.com)
What's holding me up is that it doesn't hand fragments, unions, interfaces, variables, or lists of arguments - and visually it's not great. I'll work on the visual design a bit next week, but the other items on the list also need to be handled (also, it's written in Reason, and the implementation is technically wonky).
Thank you, that is a good start 👍 ! I will definitively have a look and come back to you. If I am not mistaken, looks like https://graphqleditor.com/ is also promising some features in its roadmap, but not sure when we will have something to test to build queries (currently they only support schema creation).
As a heads up, we've polished up our implementation and open sourced it as of today https://www.onegraph.com/blog/2019/01/24/How_OneGraph_onboards_users_new_to_GraphQL.html
Here's the code itself https://github.com/onegraph/graphiql-explorer
And and example repo that uses it out of the box https://github.com/onegraph/graphiql-explorer-example
It also includes support for default arguments now, which can make exploring a new api much more successful all the way throughout
i think this is good enough to be part of graphiql
agreed, I'm finding this very useful.
I'd love to see this added to graphiql as well. It would take the DX to a new level!
OneGraph was acquired by Netlify and it looks like the explorer plugin hasn't been updated in quite a while. Is there any chance that plugin could be forked and merged into the main project? Having a query builder is the entire reason I want to use a GUI for GraphQL. ...or if anyone knows of a good query builder plugin for GraphiQL that is maintained?
I built a tiny utility for building GraphQL queries visually; pretty much what you're asking for.
App: https://gqlvis.hadid.dev/ Github: https://github.com/mhadidg/gqlvis