Skip to main content

directive

Module for handling GraphQL directive printing and formatting. Provides utilities to generate string representations of GraphQL directives including their metadata, arguments, and locations.

printCodeDirective()​

function printCodeDirective(type, options?): string

Defined in: graphql/directive.ts:66

Generates a string representation of a complete GraphQL directive definition.

Parameters​

type​

GraphQLDirective

The GraphQL directive to process

options?​

PrintDirectiveOptions

Configuration options for printing the directive (optional)

Returns​

string

A formatted string containing the complete directive definition


printDirectiveMetadata()​

function printDirectiveMetadata(type, options): string | MDXString

Defined in: graphql/directive.ts:48

Prints metadata information for a GraphQL directive, focusing on its arguments.

Parameters​

type​

GraphQLDirective

The GraphQL directive to process

options​

PrintDirectiveOptions

Configuration options for printing directive metadata

Returns​

string | MDXString

Formatted metadata string in MDX format or empty string if no arguments