Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: SpectaQL – auto-generate GraphQL API documentation (github.com/anvilco)
51 points by mrbogle on March 18, 2021 | hide | past | favorite | 13 comments


I've been using DociQL in an automated pipeline and its been handy! Should be easy to give this a go at some point in the near future.

I made a similar change for the introspection url being set dynamically on main line dociql, so good to see it there as well.


We added a number of things that came to mind while trying to get our docs dialed in ourselves. Glad to see that others were looking for these same enhancements! Let us know if you run into any issues


Thanks for the comment! We added a lot of things that came to mind while trying to get our docs dialed in ourselves. Glad to see that others were looking for these same enhancements!


Hey all, we couldn't find exactly what we wanted in a documentation generator, so we wrote our own. Let us know if you have any questions!


I appreciate the integrated examples. I wish I had your example generator before I rolled my own.

The documention generator we currently use isn't scaling well with 100+ types and 800+ mutations. It makes the sidebar too unwieldy. It looks like SpectaQL has the same issue. Not sure there's a great solution while keeping to static pages.

Thanks much for the open license. I hope to try it soon.

We might pay for a searchable hosted white label version.


Thanks for the feedback! Yeah I can see how it could get out of hand with that many types and mutations. The single page situation would probably break down in that scenario too. We'll think about how it might be able to scale. Feel free to open an issue on the repo and we can work it out together.


What I'd really like to see is a dynamic diagram of the schema, such that when you click on a type it becomes the center of a graph of associations. Then click to view the text docs. The diagram could be a menu / entry point for the text docs. A kind of map to the N-dimensional space.


Ah that would definitely be interesting, you could break out queries / mutations where it is an input, output, or related types where it is a resolver type


We quickly ran into the same issue at Shopify. We've since moved from a flat list into sections by "domains"; within each section is the breakdown by type. You can see it here: https://shopify.dev/docs/admin-api/graphql/reference

Of course this grouping has to be done a little manually. And it's not perfect, but definitely better than the flat alternative. For reference, we have thousands of types.


I could see us adding support for grouping via the "metadata" that would inform the nav bar on how to group and accordion / collapse things. There already is a pattern for grouping in the library that is exemplified in the Query and Mutation carats


Thanks for the kind words! I wrote most of the enhancements and thought the static and dynamic example support was crucial to have.

Our schema is not as big as yours, but I could see how things could get a bit unwieldy on the navbar. Come on over to the repo and we can work on a solution together - I'm sure there's something we can figure out if we put on our design + product + engineer hats.


Amazing, our free trial of GraphQL Editor that we used only for its documentation generator ended, so this is literal a time/money saver.

Thank you!

EDIT: Have you thought about accepting Github sponsorships[1]?

[1] - https://github.com/sponsors


That's great to hear it'll be useful!

Thanks for the heads up on sponsorships, we hadn't thought about accepting them. Currently the project is effectively funded by us at useanvil.com, but we'll talk about opening that up!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: