Skip to main content

enum

Provides utilities for printing GraphQL enum types to Markdown/MDX format

printCodeEnum()​

function printCodeEnum(type, options?): string;

Defined in: printer-legacy/src/graphql/enum.ts:47

Generates a GraphQL SDL code block for an enum type.

Parameters​

type​

unknown

The GraphQL enum type to process

options?​

PrintTypeOptions

Optional printing options that control directive handling

Returns​

string

A string containing the enum type definition in GraphQL SDL, or empty string if type is not an enum


printEnumMetadata()​

function printEnumMetadata(type, options): Maybe<PageSection>;

Defined in: printer-legacy/src/graphql/enum.ts:29

Prints the metadata section for a GraphQL enum type.

Parameters​

type​

unknown

The GraphQL enum type to process

options​

PrintTypeOptions

Options for printing the type

Returns​

Maybe<PageSection>

A "Values" PageSection, or undefined when type is not an enum