Function: asObjectType()

asObjectType(name)

asObjectType<TInput>(name): AsObjectTypeMetadata<TInput>

Creates a GraphQL object type metadata.

Type Parameters

TInput extends object

Parameters

name: string

The GraphQL object name.

Returns

AsObjectTypeMetadata<TInput>

A GraphQL object type metadata.

Defined in

packages/valibot/src/metadata.ts:233

asObjectType(config)

asObjectType<TInput>(config): AsObjectTypeMetadata<TInput>

Creates a GraphQL object type metadata.

Type Parameters

TInput extends object

Parameters

config: Partial<Omit<GraphQLObjectTypeConfig<any, any>, "interfaces" | "fields">> & object

The GraphQL object config.

Returns

AsObjectTypeMetadata<TInput>

A GraphQL object type metadata.

Defined in

packages/valibot/src/metadata.ts:243