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:
- Change the temporary folder location:
{
tmpDir: "./.docusaurus"
}
- Disable schema diff feature:
{
diffMethod: "NONE"
}
- Check file permissions on the temporary directory
Schema Loading Issuesβ
- Ensure required loaders are installed:
npm install @graphql-tools/url-loader @graphql-tools/json-file-loader
- Verify loader configuration:
{
loaders: {
UrlLoader: "@graphql-tools/url-loader",
JsonFileLoader: "@graphql-tools/json-file-loader"
}
}
Memory Issues During Generationβ
For large schemas, try:
- Increase Node.js memory limit:
NODE_OPTIONS=--max-old-space-size=4096 npx docusaurus graphql-to-doc
- 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:
- Check the GitHub issues
- File a new issue with:
- Your configuration
- Schema size/complexity
- Error messages
- Node.js and package versions