Skip to main content

Configuration Cheat Sheet

note

This is a quick reference guide. All settings are thoroughly documented in the Settings page.

Essential Options

OptionTypeDefaultDescription
schemastringRequired. Path to schema file or introspection result
rootPathstring./docsRoot folder for documentation generation
baseURLstring/graphqlBase URL path for generated documentation

Document Structure

OptionTypeDefaultDescription
linkRootstring/Root path used for type cross-links in generated documentation
homepagestringCustom homepage content file
hierarchystringapiDocumentation structure: api, entity, or flat
indexbooleanfalseGenerate category indices
categorySortstring | functionSort categories: "natural" for alphabetical or custom function
prettybooleanfalseFormat generated Markdown files

Content Options

OptionTypeDefaultDescription
noCodebooleanfalseHide code sections
noExamplebooleanfalseHide example sections
noParentTypebooleanfalseHide parent type prefix
noRelatedTypebooleanfalseHide related types section
noTypeBadgesbooleanfalseHide type badges

Filtering Options

OptionTypeDefaultDescription
groupByDirectivestringGroup by directive: @directive(field) or @directive(=fallback)
onlystring[]Include only types with specified directives
skipstring[]Exclude types with specified directives
deprecatedstringdefaultHandling of deprecated items: default, group, skip

Build Control Options

OptionTypeDefaultDescription
forcebooleanfalseForce regeneration of all files
diffMethodstringNONEChange detection: NONE, FORCE, SCHEMA-DIFF, SCHEMA-HASH
tmpDirstringTemporary directory for storing schema signature (used by diff)
prettybooleanfalseFormat output files with Prettier (requires prettier installed)
mdxParserstringPath to a custom MDX formatter module

CLI Flags

All config options can be passed as CLI flags to npx docusaurus graphql-to-doc or npx graphql-markdown.

FlagConfig optionDescription
-s, --schema <path>schemaSchema file, URL, or introspection JSON
-b, --base <baseURL>baseURLBase URL and output folder name
-r, --root <rootPath>rootPathRoot output folder
-l, --link <linkRoot>linkRootRoot path for cross-links
-h, --homepage <file>homepageCustom homepage file
-f, --forceforceSkip diff, always regenerate
-d, --diff <method>diffMethodDiff method (NONE, SCHEMA-DIFF, etc.)
-t, --tmp <dir>tmpDirTemp dir for schema diffing
--indexdocOptions.indexGenerate category index pages
--hierarchy <type>printTypeOptions.hierarchyFolder structure: api, entity, flat
--deprecated <option>printTypeOptions.deprecateddefault, group, or skip
--noParentTypeprintTypeOptions.parentTypePrefixHide parent type prefix on fields
--noTypeBadgesprintTypeOptions.typeBadgesHide type attribute badges
--only <@directive...>onlyDocDirectiveInclude only types with these directives
--skip <@directive...>skipDocDirectiveExclude types with these directives
-gdb, --groupByDirective <expr>groupByDirectiveGroup by directive: @dir(field|=fallback)
--prettyprettyFormat output with Prettier
--mdxParser <path>mdxParserCustom MDX formatter module
--configPrint resolved config (debug)