E5B8 GitHub - graphql-markdown/graphql-markdown: Customizable Markdown + MDX documentation for GraphQL schemas · GitHub
[go: up one dir, main page]

Skip to content

graphql-markdown/graphql-markdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2,787 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

GraphQL-Markdown

Flexible documentation for GraphQL schemas

NPM Last Update GitHub License Buy us a tree Commitizen friendly

GraphQL-Markdown

Generate Markdown documentation from GraphQL schemas for static site generators.

Installation

Choose your preferred package based on your static site generator:

# For Docusaurus
npm install @graphql-markdown/docusaurus graphql

# For other static site generators
npm install @graphql-markdown/cli graphql

Usage

Docusaurus Plugin

Add to your docusaurus.config.js:

module.exports = {
  plugins: ["@graphql-markdown/docusaurus"],
};

Run the generation command:

npx docusaurus graphql-to-doc

CLI Usage

npx gqlmd graphql-to-doc --schema ./schema.graphql --output ./docs

API Usage

For programmatic usage, you can use the CLI package:

import { runGraphQLMarkdown } from '@graphql-markdown/cli';

const config = {
  schema: './schema.graphql',
  rootPath: './docs',
};

await runGraphQLMarkdown(config);

See API documentation and our Framework Integration page for more details.

Configuration

See documentation configuration page.

Troubleshooting

See documentation troubleshooting page.

License

GraphQL-Markdown packages are 100% free and open-source, under the MIT license.

This package is Treeware. If you use it in production, then we ask that you buy the world a tree to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.

Contributions

Contributions, issues and feature requests are very welcome. If you are using this package and fixed a bug for yourself, please consider submitting a PR!

0