Skip to main content

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

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