events
Event system for GraphQL-Markdown.
ComposePageTypeEventDataβ
Defined in: types/src/printer.d.ts:114
Data payload for compose page type events.
Propertiesβ
nameβ
readonly name: Maybe<string>;
Defined in: types/src/printer.d.ts:118
The name identifier for the type
optionsβ
readonly options: PrintTypeOptions;
Defined in: types/src/printer.d.ts:120
The print options in effect
sectionsβ
readonly sections: PageSections;
Defined in: types/src/printer.d.ts:122
The map of all page sections (mutable in BEFORE event)
typeβ
readonly type: unknown;
Defined in: types/src/printer.d.ts:116
The GraphQL type being composed
PageSectionβ
Defined in: types/src/printer.d.ts:24
Represents a single section of a page with optional title and content.
Propertiesβ
content?β
optional content?:
| string
| MDXString
| PageSection
| PageSection[];
Defined in: types/src/printer.d.ts:30
The section content
level?β
optional level?: number;
Defined in: types/src/printer.d.ts:28
Optional section level for hierarchical structuring
title?β
optional title?: string | MDXString;
Defined in: types/src/printer.d.ts:26
Optional title/heading for the section
PageSectionsβ
Defined in: types/src/printer.d.ts:36
Map of all available sections in a type page.
Indexableβ
[key: string]: Maybe<PageHeader | PageSection>
Additional custom sections can be added by event handlers
Propertiesβ
code?β
optional code?: PageSection;
Defined in: types/src/printer.d.ts:50
GraphQL code block
customDirectives?β
optional customDirectives?: PageSection;
Defined in: types/src/printer.d.ts:52
Custom directives
description?β
optional description?: PageSection;
Defined in: types/src/printer.d.ts:48
Type description from GraphQL comments
example?β
optional example?: PageSection;
Defined in: types/src/printer.d.ts:56
Usage examples
header?β
optional header?: PageHeader;
Defined in: types/src/printer.d.ts:40
YAML frontmatter or top-level heading
mdxDeclaration?β
optional mdxDeclaration?: PageHeader;
Defined in: types/src/printer.d.ts:44
MDX import declarations
metadata?β
optional metadata?: PageSection;
Defined in: types/src/printer.d.ts:54
Type metadata (fields, arguments, etc.)
metatags?β
optional metatags?: PageHeader;
Defined in: types/src/printer.d.ts:42
HTML meta tags
relations?β
optional relations?: PageSection;
Defined in: types/src/printer.d.ts:58
Related types
tags?β
optional tags?: PageSection;
Defined in: types/src/printer.d.ts:46
Custom tags (e.g., @deprecated)
PrintCodeEventDataβ
Defined in: types/src/printer.d.ts:64
Data payload for print code events.
Propertiesβ
optionsβ
readonly options: PrintTypeOptions;
Defined in: types/src/printer.d.ts:70
The print options in effect
typeβ
readonly type: unknown;
Defined in: types/src/printer.d.ts:66
The GraphQL type being printed
typeNameβ
readonly typeName: string;
Defined in: types/src/printer.d.ts:68
The name of the type
PrintTypeEventDataβ
Defined in: types/src/printer.d.ts:76
Data payload for print type events.
Propertiesβ
nameβ
readonly name: Maybe<string>;
Defined in: types/src/printer.d.ts:80
The name identifier for the type
optionsβ
readonly options: PrintTypeOptions;
Defined in: types/src/printer.d.ts:82
The print options in effect
typeβ
readonly type: unknown;
Defined in: types/src/printer.d.ts:78
The GraphQL type being printed