Skip to main content

Configuration Cheat Sheet

note

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

tip

For formatter-based setups, prefer formatter. The older mdxParser setting and CLI flag are deprecated aliases.

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
noParentTypebooleanfalseHide parent type prefix
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)
formatterstringPackage name or path to a custom 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
--formatter <pkg>formatterFormatter package name or path
--mdxParser <pkg>mdxParser (deprecated)Deprecated alias for formatter
--configPrint resolved config (debug)