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
schemastringβ€”Required. Path to schema file or introspection result
rootPathstring./docsRoot folder for documentation generation
baseURLstringschemaBase URL path and output folder name under rootPath

Document Structure​

OptionTypeDefaultDescription
linkRootstring/Root path used for type cross-links in generated documentation
homepagestring | falsegenerated.mdCustom homepage content file, false to disable
hierarchystringapiDocumentation structure: api, entity, or flat
indexbooleanfalseGenerate category indices
categorySortstring | functionβ€”Sort categories: "natural" for alphabetical or custom function
sectionHeaderIdbooleantrueGenerate custom section header IDs for permalinks
prettybooleanfalseFormat generated Markdown files

Content Options​

OptionTypeDefaultDescription
noParentTypebooleanfalseHide parent type prefix
noTypeBadgesbooleanfalseHide type badges

Filtering Options​

OptionTypeDefaultDescription
groupByDirectivestringβ€”Group 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
tmpDirstringβ€”Temporary directory for storing schema signature (used by diff)
prettybooleanfalseFormat output files with Prettier (requires prettier installed)
formatterstringβ€”Package 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 (Docusaurus plugin) or npx gqlmd graphql-to-doc (standalone CLI).

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
--noSectionIddocOptions.sectionHeaderIdDisable section header IDs for permalinks
--only <@directive...>onlyDocDirectiveInclude only types with these directives
--skip <@directive...>skipDocDirectiveExclude types with these directives
--groupByDirective <expr>groupByDirectiveGroup by directive: @dir(field|=fallback)
--prettyprettyFormat output with Prettier
--formatter <pkg>1formatterFormatter package name or path
--mdxParser <pkg>1mdxParser (deprecated)Deprecated alias for formatter
--configβ€”Print resolved config (debug)

Footnotes​

  1. The --formatter and --mdxParser flags are only registered when the CLI is set up with a default formatter package, as done by @graphql-markdown/docusaurus. The standalone gqlmd command does not expose them β€” set formatter in your configuration file instead. ↩ ↩2