npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@graphql-markdown/formatters

v1.0.0

Published

Formatter presets for Docusaurus, Starlight, Fumadocs, Vocs, HonKit, Hugo, MkDocs, DocFX, and mdBook.

Readme

@graphql-markdown/formatters

Framework formatter presets for GraphQL-Markdown.

This package provides ready-to-use formatter presets for popular documentation frameworks, with each formatter in its own package subpath.

Installation

npm install @graphql-markdown/formatters

Quick Start

Use any formatter in your GraphQL-Markdown configuration:

schema: ./schema.graphql
extensions:
  graphql-markdown:
    rootPath: ./docs
    baseURL: api
    formatter: "@graphql-markdown/formatters/docusaurus"

Or programmatically:

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

await runGraphQLMarkdown({
  schema: "./schema.graphql",
  rootPath: "./docs",
  baseURL: "api",
  formatter: "@graphql-markdown/formatters/docusaurus",
});

The legacy mdxParser setting still works as a deprecated alias, but new configurations should use formatter.

Supported Formatters

Each formatter has its own setup guide:

| Framework | Package Path | Documentation | | --------- | ------------ | ------------- | | Astro Starlight | @graphql-markdown/formatters/starlight | Guide | | DocFX | @graphql-markdown/formatters/docfx | Guide | | Docusaurus | @graphql-markdown/formatters/docusaurus | Guide | | HonKit | @graphql-markdown/formatters/honkit | Guide | | Hugo | @graphql-markdown/formatters/hugo | Guide | | mdBook | @graphql-markdown/formatters/mdbook | Guide | | MkDocs | @graphql-markdown/formatters/mkdocs | Guide | | Next.js + Fumadocs | @graphql-markdown/formatters/fumadocs | Guide | | Vocs | @graphql-markdown/formatters/vocs | Guide |

Custom Formatter

For frameworks not listed above, create a custom MDX module. See the Integration Guide for the full formatter contract, the formatMDXDetails \r delimiter invariant, and examples of extending a preset.

Contributing

Add a New Formatter

  1. Create the formatter module at src/<name>/index.ts.
  2. Create documentation at src/<name>/README.md.
  3. Export the formatter from src/index.ts.
  4. Add a package subpath export for ./<name> in package.json under exports.
  5. Add unit tests in tests/unit/<name>/index.test.ts.

Formatter Contract

A formatter module exports createMDXFormatter and any subset of the standard formatter functions (formatMDXBadge, formatMDXAdmonition, formatMDXBullet, formatMDXDetails, formatMDXFrontmatter, formatMDXLink, formatMDXNameEntity, formatMDXSpecifiedByLink). Optional exports include mdxDeclaration, mdxExtension, and lifecycle hooks.

See the Integration Guide for the full contract, type signatures, and the formatMDXDetails \r delimiter invariant.

Testing Checklist

Add tests that verify:

  1. Each formatter function output for representative inputs.
  2. createMDXFormatter returns all required formatter methods.
  3. Framework-specific behavior and edge cases (for example link extension mapping, frontmatter behavior, empty title fallback).

Run targeted tests while developing:

cd packages/formatters
bun run test:unit -- tests/unit/<name>/index.test.ts

Run package checks before opening a PR:

cd packages/formatters
bun run lint
bun run prettier
bun run test:unit

For repository-wide validation:

cd /path/to/graphql-markdown
bun run test