graphiql icon indicating copy to clipboard operation
graphiql copied to clipboard

Visual query builder from Graphql schema

Open ddtxra opened this issue 7 years ago • 8 comments

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?

ddtxra avatar Oct 25 '18 15:10 ddtxra

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).

sgrove avatar Oct 27 '18 02:10 sgrove

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).

ddtxra avatar Oct 29 '18 21:10 ddtxra

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

sgrove avatar Jan 25 '19 07:01 sgrove

i think this is good enough to be part of graphiql

robjampar avatar Jan 27 '19 01:01 robjampar

agreed, I'm finding this very useful.

ggascoigne avatar Jan 31 '19 00:01 ggascoigne

I'd love to see this added to graphiql as well. It would take the DX to a new level!

patrickcate avatar Nov 29 '20 04:11 patrickcate

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?

whaaaley avatar May 25 '22 12:05 whaaaley

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

mhadidg avatar Nov 11 '25 12:11 mhadidg