Registry / devops / docusaurus-graphql-plugin

docusaurus-graphql-plugin

JSON →
library0.9.0jsnpmunverified

Docusaurus plugin that generates Markdown documentation from a GraphQL schema. Current version 0.9.0, release cadence is irregular with occasional updates. Key differentiators: parses GraphQL schemas to produce markdown files for Docusaurus sites without manual documentation, handles types, fields, arguments, and directives. Alternative to graphql-docs or graphql-markdown, integrated as a Docusaurus plugin.

devopstesting
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Plugin is used in Docusaurus config as a string; no ES import.

module.exports = { plugins: ['docusaurus-graphql-plugin'] }

The package exports a function (the plugin factory) as default export. CJS require may not work in ESM context.

import plugin from 'docusaurus-graphql-plugin'; module.exports = { plugins: [plugin] }

Type import only; runtime usage not valid.

import type { PluginOptions } from 'docusaurus-graphql-plugin'

Configure the plugin in docusaurus.config.js to generate docs from a schema file.

// docusaurus.config.js const schema = './schema.graphql'; module.exports = { title: 'My Site', plugins: [ ['docusaurus-graphql-plugin', { schema: schema, rootPath: './docs/graphql', // where to output markdown linkRoot: '../', // relative links to other docs }], ], };
Debug
Known footguns
breakingVersion 0.9.0 changed the plugin options structure; 'schema' now expects a string path instead of a DocumentNode.
deprecated'rootPath' option is deprecated in favor of 'outputDir' as of 0.9.0.
gotchaPlugin may not generate docs for all schema types if 'linkRoot' is not correctly set; links to other docs break.
gotchaPlugin requires GraphQL peer dependency version ^16.0.0; using older GraphQL may cause parsing errors.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
9 hits · last 30 days
gptbot
3
mj12bot
1
ahrefsbot
1
Resources