Skip to content

Conversation

denisahearn
Copy link
Contributor

@denisahearn denisahearn commented Dec 6, 2024

What?

Moves the queries out to a separate Queries section in the sidebar, and gives each query its own page, just like mutations.

Why?

Having all the queries listed on a single page makes it difficult to read the documentation, especially when you customize the generation of the documentation, like my company has done, to embed one or more examples per query into the operation/query/index.html page.

Putting each query on a separate page and then providing navigation to these pages via a new Queries section in the sidebar makes it much easier to see what queries exist and to read this documentation (and in our case to access and run the query examples in GraphiQL).

Before
Screenshot 2024-12-06 at 12 43 39 PM

After (two screenshots, one of the Query page, and the other of the codeOfConduct query page)
Screenshot 2024-12-06 at 12 45 58 PM

Screenshot 2024-12-06 at 12 47 05 PM

@brettchalupa
Copy link
Owner

@denisahearn thank you so much for this contribution! The code looks good at first review. I'm going to do some testing locally first on your branch. 👍

Copy link
Owner

@brettchalupa brettchalupa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this locally, and it's working well. The test failures are due to a Dart Sass deprecation warning. I'll go ahead and fix that and then merge this in. 👍 Thanks again!

With the sidebar content getting longer, it has me thinking that foldable sections and a simple search to filter could be helpful. 🤔

@brettchalupa brettchalupa merged commit 2aec020 into brettchalupa:main Dec 10, 2024
0 of 3 checks passed
@denisahearn
Copy link
Contributor Author

@brettchalupa Thanks so much for accepting my submission and for releasing a new version of the gem so quickly!

I agree that the sidebar could use some enhancing. I can't promise anything, but as time allows I'll try to look at making the sections expandable/collapsible, and the sidebar searchable using plain vanilla JavaScript.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants