Function: asUnionType()

asUnionType(config)

asUnionType<TInput>(config): AsUnionTypeMetadata<TInput>

Creates a GraphQL union type metadata.

Type Parameters

TInput extends object

Parameters

config: Partial<GraphQLUnionTypeConfig<any, any>>

The GraphQL union config.

Returns

AsUnionTypeMetadata<TInput>

A GraphQL union type metadata.

Defined in

packages/valibot/src/metadata.ts:361

asUnionType(name)

asUnionType<TInput>(name): AsUnionTypeMetadata<TInput>

Creates a GraphQL union type metadata.

Type Parameters

TInput extends object

Parameters

name: string

The GraphQL union type Name.

Returns

AsUnionTypeMetadata<TInput>

A GraphQL union type metadata.

Defined in

packages/valibot/src/metadata.ts:371