Static page generator for documenting GraphQL schemas, version 2.5.2. A maintained fork of the unmaintained graphdoc package. Provides CLI and plugin system to generate documentation from live endpoints, IDL files, modular schemas, or introspection JSON. Outputs static HTML pages with customizable templates and plugins. Suitable for documenting GraphQL APIs in a project.
npm install graphqldocNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Install graphqldoc globally and generate documentation from a live endpoint, a schema file, or a JSON introspection result, then view help.
Use `-f` flag to delete existing output directory or ensure it does not exist.
Ensure your schema file is valid and exports a GraphQLSchema object (for JS) or is valid IDL/JSON.
Use graphqldoc instead of graphdoc. Migration: replace `graphdoc` with `graphqldoc` in dependencies and commands.
Do not modify the schema object directly. If you need to modify, clone it first.
Use `-x` to pass headers, e.g., `-x 'Authorization: Bearer token'`.
Ensure you use `-e` when using `-q`.
Add `-f` flag: graphqldoc -e http://... -o ./doc -f
Verify the schema file exists and is valid: for .graphql, ensure it contains valid SDL; for .json, ensure it is a valid introspection result.
Use `export default class MyPlugin { ... }` or `export default { ... }` that implements PluginInterface.