mfilej

mfilej

Rich documentation with Absinthe

I was thinking about autogenerating GraphQL documentation from the schema, but also having the ability to add additional content.

I found a few projects that can do this among which SpectaQL seems the most promising. On top of documenting types/fields/queries, it offers static and dynamic examples, plain markdown content, extensive design customization, etc.

Alas, it seems that the initial curve might be a bit steeper as you have to find a way to somehow enrich your schema with metadata.

From what I was able to understand it seems that Absinthe offers enough extensibility to allow this to be built on top. However, a quick web search gave me the impression that no one has attempted to do this yet.

What are your approaches to documenting your GraphQL APIs, aside from describing fields/queries/types?

First Post!

benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

I think in this case it’s less about anything Absinthe specifically has, and more about GraphQL’s inherent introspection ability. Any GraphQL documentation tool would be wise to simply use introspection to get the GraphQL schema information and not anything specific to a particular implementation or language.

With that information someone can then format / display / amend any info they like. This is exactly the approach taken by SpectaQL, GitHub - anvilco/spectaql: Autogenerate static GraphQL API documentation · GitHub. Note that the weaving they are talking about is weaving metadata into the introspection result, which is just JSON.

Last Post!

benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

What I’m saying is that they post process the introspection results. They don’t ask the GraphQL implementation to add anything to the result, they take the result and add things to it.

Where Next?

Popular in Discussions Top

lorenzo
Hey everone! I created a prototype for my app using Nodejs for the api. But the framework I chose wasnt great (in general theresnt any g...
New
opsb
We’re considering our architecture from a viewpoint of scaling our traffic heavily over the next 6 months. Our current deployment is runn...
New
Rustixir
Hi everyone, im working on find best language/framework/system for high concurrency, high performance and stable performance after wor...
New
fireproofsocks
I’ve been working on an Elixir project that has required a lot of scripting. I usually reach for Elixir because I like it more (and in th...
New
matthias_toepp
I’d love to hear what people think about Wisp, the new Gleam web framework started by Gleam’s primary creator Louis Pilfold. Gleam, alon...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New
arcanemachine
https://nitter.net/josevalim/status/1744395345872683471 https://twitter.com/josevalim/status/1744395345872683471
New

Other popular topics Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 31586 112
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

We're in Beta

About us Mission Statement