Skip to main content

formatter

Internal library of helpers for formatting GraphQL values.

getFormattedDefaultValue()​

function getFormattedDefaultValue<T>(entity): Maybe<string | T>

Returns a printable formatted value for a GraphQL type. This is the generic function.

Type Parameters​

β€’ T

Parameters​

β€’ entity

the GraphQL schema entity processed.

β€’ entity.defaultValue: T

the GraphQL schema type's value to be formatted.

β€’ entity.type: Maybe<GraphQLType>

the GraphQL schema type.

Returns​

Maybe<string | T>

a printable formatted value.

Defined in​

packages/graphql/src/formatter.ts:94