graphiql
graphiql copied to clipboard
Embedding GraphiQL via markdown
Is there a documentation how we can integrate GraphiQL in our existing markdown-based documentation?
We`d like to have something like this:
# { "graphiql": true }
{
hero {
name
}
}
Is there a tutorial or something like that on how they did that?
You mean like this?
# { "graphiql": true }
{
hero {
name
}
}
Use ```graphql in the beginning of your code block.
I guess this gives me just the syntax highlighting. What I really want is the embedded GraphiQL client, like on the Learn GraphQL website.
@FrankR85 possibly their source code is available? I’ll circle back because we would like this feature for graphql dot org.
@FrankR85 on graphql.org MiniGraphiql component is used with the marked which is probably not as powerful as graphiql but good enough for the docs site
yep! you can build an editor with our codemirror-graphql or monaco-graphql quite easily, like MiniGraphiQL does
considering closing this as it's more of a support issue. you can try asking around on the discord possibly. would be cool to have a utility for this, but then we would have to choose one of many markdown parsers to support.
it's best for a third party implentation as a library, but it would be nice if we could have a demo for something like this in 2.0
if you'd like to keep this open, can we convert it to a discussion?