Function: asEnumType()

asEnumType(config)

asEnumType<TArg>(config): (arg, ctx) => void

Register as a GraphQL enum type.

Type Parameters

TArg

Parameters

config: EnumConfig<TArg>

The GraphQL enum config.

Returns

Function

zod superRefine refinement.

Parameters

arg: TArg

ctx: RefinementCtx

Returns

void

Defined in

packages/zod/src/metadata.ts:79

asEnumType(name)

asEnumType(name): (arg, ctx) => void

Register as a GraphQL enum type.

Parameters

name: string

The GraphQL enum name.

Returns

Function

zod superRefine refinement.

Parameters

arg: any

ctx: RefinementCtx

Returns

void

Defined in

packages/zod/src/metadata.ts:89