directive
Provides utilities for handling and printing GraphQL directives in Markdown format
getCustomDirectiveResolver()β
function getCustomDirectiveResolver(
resolver,
type,
constDirectiveOption,
fallback?): Maybe<string>
Defined in: directive.ts:30
Resolves a custom directive using the provided resolver function
Parametersβ
resolverβ
CustomDirectiveResolver
The resolver function name to execute
typeβ
unknown
The GraphQL type to resolve the directive for
constDirectiveOptionβ
CustomDirectiveMapItem
The directive configuration options
fallback?β
Maybe
<string
>
Optional fallback value if resolution fails
Returnsβ
Maybe
<string
>
The resolved directive value or fallback/undefined
getCustomTags()β
function getCustomTags(type, options): Badge[]
Defined in: directive.ts:121
Extracts custom tags from directives for a given type
Parametersβ
typeβ
unknown
The GraphQL type to get tags for
optionsβ
PrintTypeOptions
General printing options
Returnsβ
Badge
[]
Array of badge configurations from directive tags
printCustomDirective()β
function printCustomDirective(
type,
constDirectiveOption,
options): Maybe<string>
Defined in: directive.ts:57
Prints a custom directive as a Markdown string
Parametersβ
typeβ
unknown
The GraphQL type to print the directive for
constDirectiveOptionβ
CustomDirectiveMapItem
The directive configuration options
optionsβ
PrintTypeOptions
General printing options
Returnsβ
Maybe
<string
>
Formatted Markdown string for the directive or undefined
printCustomDirectives()β
function printCustomDirectives(type, options): string
Defined in: directive.ts:85
Prints all custom directives for a type as a Markdown section
Parametersβ
typeβ
unknown
The GraphQL type to print directives for
optionsβ
PrintTypeOptions
General printing options
Returnsβ
string
Markdown string containing all formatted directives
printCustomTags()β
function printCustomTags(type, options): string | MDXString
Defined in: directive.ts:153
Prints custom directive tags as Markdown badges
Parametersβ
typeβ
unknown
The GraphQL type to print tags for
optionsβ
PrintTypeOptions
General printing options
Returnsβ
string
| MDXString
Formatted Markdown string of badges or empty string