API
This section provides documentation of the GraphQL-Markdown API for NodeJS. For more details about each individual module, refer to the specific package documentation below.
Packages
GraphQL-Markdown is organized into several packages:
- @graphql-markdown/cli - Command-line interface for generating documentation
- @graphql-markdown/core - Core functionality and base classes
- @graphql-markdown/docusaurus - Docusaurus plugin and MDX formatters
- @graphql-markdown/graphql - GraphQL schema utilities and helpers
- @graphql-markdown/helpers - Helper functions for documentation generation
- @graphql-markdown/printer-legacy - Legacy markdown printer implementation
- @graphql-markdown/utils - Utility functions and helpers
Installation
npm install @graphql-markdown/cli
# or with your preferred package manager
yarn add @graphql-markdown/cli
Basic Usage
Using the CLI:
graphql-markdown --schema ./schema.graphql --root ./docs
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);
Contributing
This documentation is intended primarily for those interested in:
- Contributing to the GraphQL-Markdown codebase
- Developing custom documentation generators
- Extending the base functionality
- Understanding the internal architecture