GraphiQL 2 Design #2216
Replies: 24 comments 34 replies
-
Some feedback: I don't like the pluralization Queries, Mutations, and Subscriptions. Query, Mutation, or Subscription makes more sense as those are fields on the Query, Mutation, or Subscription object types. I am aware that often people use the word Example:
IMHO correct lingo:
So my proposal here would be to either use Query/Mutation/Subscription or Query Fields/Mutation Fields/Subscription Fields. I am skeptical about merging both the documentation explorer and operation builder UI into a single element. It is really hard to imagine whether it will work out or not just from looking at the design drafts. I am looking forward to actually play around with it or seeing some "scripted" flow examples! |
Beta Was this translation helpful? Give feedback.
-
Thumbs up for making the explorer interaction a first class citizen. It's extraordinarily productive and allows to concentrate even better on the query to build beyond the syntax. Integrating documentation is consequential - having two identical browseable and searchable tree structures in the same UI can be unnecessary mental load and a lot of extra clicks. The Figma screens are beautiful but the sample API is very "happy path". Here's some ideas for UX edge cases:
|
Beta Was this translation helpful? Give feedback.
-
See also this thread: OneGraph/graphiql-explorer#10. It contains a lot of ideas. 😉 |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
This looks very nice. A couple of notes on accessibility ♿ that would be nice to take care of:
I'll be happy to provide code reviews with more deep dive tests with keyboard navigation and screen readers during implementation. Good luck 🤞🏼 |
Beta Was this translation helpful? Give feedback.
-
Hi. This is looking incredible! Love the thought and intentionality you guys have put into this. It's much needed and well over due. I'm curious as to what the interactions will look like for defining an operation name, adding multiple operations, setting field aliases and using fragments? Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hey everyone, we have some updates! With the feedback we got, we suggest a few changes from our initial design:
This is the new light theme in the full view: And the new dark theme in the full view: We're curious to hear your opinions on this! |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
About editor tools / buttons - I'm not sure what is second icon representing? Formatting / cleanup? Copy? |
Beta Was this translation helpful? Give feedback.
-
Agree with @tot-ra ! I'm wondering how useful could be to have a modal appear with all the info related to the query |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Some great features that should be added:
|
Beta Was this translation helpful? Give feedback.
-
New design looks great! I see that TT Commons is used extensively in the Figma file, which is surprising because it's not open source. While I think TT Commons is a fantastic font, I can't identify a compatible license on the TypeType site. |
Beta Was this translation helpful? Give feedback.
-
Hey, I love the new design, especially the docs explorer! I can't wait to try it out, so I've simply developed a rough version (10% of the full functionality, 10x bugs :) ) based on the new design. It would be nice to try a little and find some more new ideas! Online demo: https://stonexer.github.io/graphiql-picker/ |
Beta Was this translation helpful? Give feedback.
-
Inspired by the work of @stonexer, and in the interest of getting the ambitious plans into an interface for all of us to to play with, I've a prototype that includes the new monaco bits. Built with Ladle, the prototype is focused on the reference but the option to build out a full component library as part of the GraphiQL design update is there. Source: https://github.com/jonathanawesome/graphiql-prototype |
Beta Was this translation helpful? Give feedback.
-
Hey folks! Lots of fun things to see and discuss in the latest version of the prototype. I encourage you to just go right now and play around with it. While you're exploring the prototype please understand that I've taken lots of liberties in terms of design and that it's probably going to break on you at some point. When it does, let me know. So, some notes about the prototype:
Happy to help anyone get involved with the prototype by having calls or peer programming, and you can always ping me on discord. |
Beta Was this translation helpful? Give feedback.
-
Hey all! After a couple of months of work I believe the prototype I've been working on is ready to get hammered and validated. It's been a few months since the early momentum and I'm not sure how many folks are subscribed to this issue, so I'm going to do something gross and @ everyone that commented earlier this year with the hope that they're still into helping to figure this thing out. No one is safe from my @'s...so, @timsuchanek, @n1ru4l , @EdwinJackson, @nkuehn, @FluorescentHallucinogen, @jord1e, @acao, @mshaaban0, @lancethomas1, @Ambro17, @tot-ra, @ItzaMi, @simmerer, @all2pie, @stonexer...your earlier opinions are valid and I'm asking for your help to further explore this new design. The prototype is running here. I'm expecting to revise and revalidate this prototype very often so please join us on the discord channel to continue the conversation around the prototype. |
Beta Was this translation helpful? Give feedback.
-
hey @jonathanawesome this looks awesome! I found a lot of tiny things in the prototype, those are listed below. The new design looks amazing and way more pleasant then the old one, it will definitely help the adoption of GraphQL! Maybe I can contribute some fixes for a couple of them, but I am not a JS/TS/web expert at all and have limited time (as do you, thanks a lot). On Firefox, the removal The Schema Selector and Settings buttons do not have tooltips: Hovering over the Clicking Bug in documentation viewer when GraphiQL just loaded? A ghost documentation pill? After reloading the page this was gone - but still weird
The "not backed by a server" is quite sudden. Could it be incorporated in the schema switcher? Maybe a URL under the schema name? I get a The fading in the docs viewer can cut off descriptions: The variable EasyVars selector list seems to randomly sort and reorder when clicking, it is kind of unsettling haha: The parenthesis The contrast on the EasyVars list removal buttons is not great (same problem as above): Maybe a tooltip for the
When there is only one tab, EasyVars will just say The hitbox for the initial 'new tab' 'button' is super small, and you can quickly smash the button that opens a new tab with the github page by accident: Weird error in the variables editor?
When you have to many tabs it 'breaks': |
Beta Was this translation helpful? Give feedback.
-
One thing i'd quite like to see is some kind of visual aid to highlight the relationship between fields in the query and the payload. Quick mockup: So in this, i've clicked on the of the lines in the payload, the second "title" row, indicated by the darker bg and visible border, and the other lines that relate to the same query line have been highlighted, along with the query line itself. The opposite would also happen -- selecting a line in the query would highlight the appropriate lines in the payload. I envisage a similar behaviour with error paths when there's an error payload (bonus point for a lovely bezier curve linking the highlighted payload and query lines) |
Beta Was this translation helpful? Give feedback.
-
One thing that feels a little strange is when using the Pathfinder for input types (as opposed to a scalar) I'd personally never construct a document like this, rather than a variable for each individual field in the input type, i'd have a single variable holding the overall type. I also completely failed to construct an update or delete mutation with the SpaceX API |
Beta Was this translation helpful? Give feedback.
-
Having used the current incarnation of the released GraphiQL v2 for a few days now, I have thoughts. This originally started out as feedback about light mode colour contrast to add to #2676, but it quickly cascaded into discussing the design as a whole (though admittedly still from the perspective of light mode, since I never use dark mode). Comment colourFirst things first, the comment colour is very faint. This is especially noticeable on first load with the instructional comments, this is close to unreadable threshold for me, but definitely causes me eyestrain. Nit: None of the buttons have hover statesBracket-pair highlighting is almost imperceptibleGeneral low contrast greysThis once is harder to explain. But this almost "striping" of low contrast greys is quite uncomfortable for me, it feels like it's always trying to get my attention, but causes similar eyestrain to the low contrast comment colour. The designer in me is trying to understand the rationale behind the entire "rounded box inner countainer" look, all it's really doing in my mind is creating additional UI noise (in contrast to the colour scheme which seems to be going for mimimalist) and using up a lot of screen real estate. It feels like there are conflicting design ideas going on -- you have the initially hidden tab bar aimed at conserving screen real estate, but then extremely airy and spacious curvy boxes undermining that. Actually, looking back at the original designs, the greys were different, and there were some additional thin borders which seemed to provide some much needed edge contrast; were these changed intentionally? TabsNew tab button moves around based on whether there are existing tabs, not sure this is the right call. Also not sure that I really agree with the "hidden by default" decision; it saves a bit of space, but as mentioned before, that space can be reclaimed by tightening up some of the other design elements. It almost makes the tab feature as a whole less discoverable -- just a little plus button that next to the word "GraphiQL". On that note, I'm not really sure if we need the word GraphiQL there, does a user actually care? It's a surprising amount of space to give over to branding in a dev tool. Variables / HeadersMostly just contrast-related nits. The "active" tab state isn't particularly obvious, and the overall panel feels like it faded into the background a bit too much. Perhaps a background colour that's distinct from the query panel might help here? Dark modeAs mentioned, I don't really use dark mode. But after taking a quick look, most of the contrast issues I have with light mode seem to also apply here. But as I tend to avoid dark modes for contrast/legibility reasons anyway, I don't feel as qualified to comment. General thoughtsOverall, I think GraphiQL2 looks nice from a purely visual standpoint, along with some great functional changes. But I can't help but leave with the impression that the primary goal of the aesthetic changes was to look modern and minimalist, which seems to have been taken to mean a very muted colour palette + generously rounded corners. GraphiQL 1 looked a bit dated for sure, but some of the changes feel like change for change's sake rather than motivated by addressing particular issues. |
Beta Was this translation helpful? Give feedback.
-
I don't like the current proposed GraphiQL Explorer design for one reason: too much visual noise. As I wrote in OneGraph/graphiql-explorer#10 (comment), combining operation building and docs viewing is not a good idea, because they solve different problems:
As proposed in OneGraph/graphiql-explorer#10 (comment), types and descriptions can be displayed on field hover: User can open detailed docs for the field right from the links in the field hover popup. Another option would be to display a hover icon next to each field to open the docs, as proposed in OneGraph/graphiql-explorer#10 (comment): BTW, this requires the (deep) integration between GraphiQL Explorer and GraphiQL Docs. I don't see any point in the "Show arguments" UI element. As proposed in OneGraph/graphiql-explorer#10 (comment), arguments can be expanded/collapsed by just clicking on them: I don't see any point in the "N more arguments" UI element. Why is only the first argument shown and the rest hidden? A huge number of arguments is very rare. |
Beta Was this translation helpful? Give feedback.
-
Hey the discord invite link seems broken or the server was deleted or something - is there an up-to-date link? |
Beta Was this translation helpful? Give feedback.
-
What is the progress on the prototype in terms of schema documentation? For those of us not in the discord. I am especially interested in the schema explorer with merged documentation. This is one of the best improvements we are looking forward to. Keeping schema reference and schema explorer separate in 2.0 would be a really poor decision, but it looks like that in the prototype today 😢 No inline documentation in the schema explorerIn the design you have field documentation as inline, to the right, singe line (truncated), but I don't see that in the prototype, instead I have to click in to the "View Quick Docs" to see the docs. Is this being worked on? Poor view of documentation in schema referenceIDK if you even want to keep "schema reference" (as we would rather see it merged with schema explorer) but IF you are planning to keep it then it looks a bit lacking in the prototype: All docs are hidden behind clicks here as well. You are not even showing the different query description when I click "Query", it is just a list of root queries withoutr any docs. This give no extra oomph compared to schema explorer 1.0 as it looks right now. Schema explorer docs
YES. PLEASE. This is the revolution we need. Now, I know a lot of people already whined and mentioned "visual noise" but who are we catering to? Super users / developers that already know the schema - or those who don't and should adopt and love the GraphQL API we provide at company X? Not everyone is a rockstar dev, some people in the company still work in "inferior" languages and are rewriting REST code to GraphQL and have no familiarity at all with the technology. And they might even hate GraphQL. I would hate to see all this whining and pushback from community to be stopping the best idea ever. But what we see in the prototype today is an explorer, where in order to see docs you have to click on each item, and then click close, while keeping a growing the context inside your head. Is this a nice experience to offer for a user trying to grok the schema? This is over the top minimalistic and it does not do well in terms of guidance or help. Isn't this so far just a reboot of GraphiQL Explorer with an extra small "docs" button for each field?
So far the prototype sadly fails to deliver on the promise. But the good thing is that YOU don't have to make a decision, as everyone could have it their way. With a new setting, you can let the user decide what the experience should be. Lets take another look at the different user setting modes we could have in GraphiQL 2.0:
The cool thing with Mode C here is e.g.
WDYT? |
Beta Was this translation helpful? Give feedback.
-
As a continuation of the discussion in #978 (comment) - let's discuss the new GraphiQL 2 design proposal here in a dedicated GitHub discussion, so we can have multiple discussion threads here.
As a reminder about the design:
In the last GraphiQL WG meeting in January, I offered to work on the new design together with @julianbauer, who actually designed the GraphQL Playground. For people who don't know, I implemented the GraphQL Playground back in the days.
After the WG meeting in January, @orta , @acao, @julianbauer and I had a call about the design and where it should go.
We mostly aligned around the goals: Keep it simple initially, but extensible as well, to cater to all the awesome plugin ideas that folks have. Then later we can add more stuff (like tabs or all kind of fancy features)
I'd like to present you our GraphiQL 2 design proposal and would love to get your thoughts on this!
Here is the new design.
As it can be a bit complex and needs some explanations of the thoughts we had in the design process, here's a video we recorded to walk you through: https://grain.co/share/story/0546c630-bb5d-4f83-acd6-5688c20cabe8/cGpVhVJt786DedMVrOrfvY0dktFdcmVldC8UkkmI
Besides introducing a fresher, more modern look, we are suggesting a major change, which we believe could significantly improve the developer experience:
Moving Docs and Docs explorer into one. You might know the docs explorer that onegraph pioneered. We believe, that the docs and the explorer, which allows you to construct queries, can be one. This is probably the most ambitious and potentially controversial topic - especially here we'd love to get your thoughts.
Looking forward to your feedback!
Beta Was this translation helpful? Give feedback.
All reactions