Registry / devops / graphql-docs

graphql-docs

JSON →
library0.2.0jsnpmunverified

Dynamic and static documentation generator for GraphQL schemas. Version 0.2.0 requires React 15.x and provides a React component that fetches schema data via a fetcher function. It aims to offer a clearer overview than GraphiQL without query features, generating markdown-rendered documentation with recursive type discovery. The project has low release cadence and is superseded by tools like graphql-voyager or GraphiQL's own docs.

npm install graphql-docs
INSTALL
IMPORT
SIG · GRAPHQL-DOCS
G
graphql-docs
devopsjavascriptv0.2.0
harness data pending
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.

GraphQLDocs
import { GraphQLDocs } from 'graphql-docs'
const GraphQLDocs = require('graphql-docs').GraphQLDocs
UMD build exposes GraphQLDocs as a global if using script tag.
default
import GraphQLDocs from 'graphql-docs'
import { default } from 'graphql-docs'
Default export not available; use named export.
GraphQLDocs
<GraphQLDocs.GraphQLDocs fetcher={fetcher} />
In browser, GraphQLDocs is a global object containing the component.

Renders a dynamic documentation explorer by providing a GraphQL fetcher function.

import React from 'react'; import ReactDOM from 'react-dom'; import { GraphQLDocs } from 'graphql-docs'; const fetcher = (query) => fetch('https://example.com/graphql', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ query }), }).then(res => res.json()); ReactDOM.render(<GraphQLDocs fetcher={fetcher} />, document.getElementById('root'));
Debug
Known issues
deprecatedProject is no longer maintained. Recommend using GraphiQL or graphql-voyager.
fix
Migrate to graphql-voyager or integrate GraphiQL's documentation panel.
affects: >=0.1.0
breakingRequires React 15.x. Incompatible with React 16+ without modifications.
fix
Use an older React version or fork the package to update dependencies.
affects: 0.2.0
gotchaGlobal `GraphQLDocs` variable is only available when using the UMD script. In bundlers, you must import the named export.
fix
Use `import { GraphQLDocs } from 'graphql-docs'` in bundler environments.
affects: >=0.2.0
Errors
Common errors & fixes
Uncaught ReferenceError: GraphQLDocs is not defined
Using script tag without proper ordering or forgetting to include React first.
fix
Ensure React and ReactDOM are loaded before graphql-docs.min.js, e.g., <script src="react.min.js"></script><script src="graphql-docs.min.js"></script>
Module not found: Can't resolve 'graphql-docs'
Package is not installed or installed globally instead of locally.
fix
Run `npm install --save graphql-docs` in your project directory.
Upgrade
Version history
0.2.0latest on npm
Audit
Dependencies
reactrequiredpeer dependency required for React component
react-domrequiredpeer dependency required for rendering
Agent activity
6 hits · last 30 days
node
6
Resources
graphql-docs — npm install graphql-docs · libregistry