Function: asEnumType()

asEnumType(name)

asEnumType<TInput>(name): AsEnumTypeMetadata<TInput>

Creates a GraphQL enum type metadata.

Type Parameters

TInput extends string | number

Parameters

name: string

The GraphQL enum name.

Returns

AsEnumTypeMetadata<TInput>

A GraphQL enum type metadata.

Defined in

packages/valibot/src/metadata.ts:307

asEnumType(config)

asEnumType<TInput>(config): AsEnumTypeMetadata<TInput>

Creates a GraphQL enum type metadata.

Type Parameters

TInput extends string | number

Parameters

config: EnumTypeConfig<TInput>

The GraphQL enum config.

Returns

AsEnumTypeMetadata<TInput>

A GraphQL enum type metadata.

Defined in

packages/valibot/src/metadata.ts:317