Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative documentation layout #235

Open
ashleyww93 opened this issue Aug 14, 2023 · 4 comments
Open

Alternative documentation layout #235

ashleyww93 opened this issue Aug 14, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@ashleyww93
Copy link

Describe the problem

I really like the overall layout of the documentation provided, however, I don't find the long list of Queries & Mutations to be that useful, as this could simply be seen with introspection for example.

For our API users, it would make sense if we could group certain parts of the schema.

I know this would require manual configuration, but I think that would be acceptable for most people who would be looking for this sort of documentation.

For example, Shopify has their GraphQL documentation in groups, so everything to do with the cart is in the same place, see the image here:
image

Describe the proposed solution

I could see this working by having a small section in the website config like the example below

options: {
    documentationGroups: [{
        title: 'Cart',
        match: ["^cart", "CartTransform"],
        exclude: ["explicitlyExcludeThis"],
    }],
}

In this example, you can see I wanted to create a section called Cart, which would include any Queries, Mutations, Subscriptions & Objects that started with cart, and I also explicitly included CartTransform. There is also a section to explicitly include something that may match your regex.

There could also be an option to include the list of Queries & Mutations like there is currently for any items that are not included in groups, or you could decide to not show them in the navigation.

Importance

Would make my life easier

@ashleyww93 ashleyww93 added the enhancement New feature or request label Aug 14, 2023
@ashleyww93
Copy link
Author

It think this is also asked for here: #58

@pelletier197
Copy link
Collaborator

Hi, sorry for the late reply. That seems like an interesting feature, and I'd be happy to have that as part of magidoc. However, this is a feature that would take quite some time to implement, and my time is limited recently.

If you're interested in digging into the code and implement it, I'd be more than happy to review a PR and deploy it, but otherwise, it might take quite a bit of time for me to look at this.

Thank you!

@ashleyww93
Copy link
Author

I would be happy to dig into this. Do you have a contributing guide?

@pelletier197
Copy link
Collaborator

Yes, it's right there : https://github.com/magidoc-org/magidoc/blob/main/CONTRIBUTING.md

Let me know if you got any questions, I'll gladly answer 🙂

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

No branches or pull requests

2 participants