common
Common printer utility functions for handling descriptions, directives, and warnings.
printDeprecation()β
function printDeprecation(type, options): string;
Defined in: printer-legacy/src/common.ts:73
Prints deprecation information for a GraphQL type if it is deprecated.
Parametersβ
typeβ
unknown
The GraphQL type to check for deprecation
optionsβ
PrintTypeOptions
Configuration options for printing
Returnsβ
string
Formatted deprecation warning as MDX string, or empty string if not deprecated
printDescription()β
function printDescription(type, options, noText?): string | MDXString;
Defined in: printer-legacy/src/common.ts:99
Prints the complete description for a GraphQL type, including deprecation warnings and custom directives.
Parametersβ
typeβ
unknown
The GraphQL type to document
optionsβ
PrintTypeOptions
Configuration options for printing
noText?β
string
Optional text to display when no description exists
Returnsβ
string | MDXString
Combined description, deprecation notices, and custom directives as MDX content
printWarning()β
function printWarning(warningConfig, options): string;
Defined in: printer-legacy/src/common.ts:51
Generates a warning message block in MDX format.
Parametersβ
warningConfigβ
Warning configuration object with text and optional title properties
text?β
string
title?β
string
optionsβ
PrintTypeOptions
Configuration options for printing
Returnsβ
string
Formatted warning message as MDX string