Skip to main content

Troubleshooting

Duplicate "graphql" modules cannot be used at the same time​

Add a resolutions entry to your package.json:

package.json
"resolutions": 
{
"graphql": "16.9.0"
}

Unable to find any GraphQL type definitions​

There are several potential solutions:

  1. Change the temporary folder location:
{
tmpDir: "./.docusaurus"
}
  1. Disable schema diff feature:
{
diffMethod: "NONE"
}
  1. Check file permissions on the temporary directory

Schema Loading Issues​

  1. Ensure required loaders are installed:
npm install @graphql-tools/url-loader @graphql-tools/json-file-loader
  1. Verify loader configuration:
{
loaders: {
UrlLoader: "@graphql-tools/url-loader",
JsonFileLoader: "@graphql-tools/json-file-loader"
}
}

Memory Issues During Generation​

For large schemas, try:

  1. Increase Node.js memory limit:
NODE_OPTIONS=--max-old-space-size=4096 npx docusaurus graphql-to-doc
  1. Use the --chunk-size option to process in batches:
npx docusaurus graphql-to-doc --chunk-size 50

Getting Help​

If you're still having issues:

  1. Check the GitHub issues
  2. File a new issue with:
    • Your configuration
    • Schema size/complexity
    • Error messages
    • Node.js and package versions