Class: ValibotWeaver

Constructors

new ValibotWeaver()

new ValibotWeaver(): ValibotWeaver

Returns

ValibotWeaver

Properties

config()

static config: (config) => ValibotWeaverConfig

Create a Valibot weaver config object

Parameters

config: ValibotWeaverConfigOptions

Valibot weaver config options

Returns

ValibotWeaverConfig

a Valibot weaver config object

Defined in

packages/valibot/src/index.ts:273


useConfig()

static useConfig: (config) => <TSchema>(schema) => TSchema & GraphQLSilk<InferOutput<TSchema>, InferInput<TSchema>>

Use a Valibot weaver config

Parameters

config: ValibotWeaverConfigOptions

Valibot weaver config options

Returns

Function

a new Valibot to silk function

get GraphQL Silk from Valibot Schema

Type Parameters

TSchema extends GenericSchemaOrAsync

Parameters

schema: TSchema

Valibot Schema

Returns

TSchema & GraphQLSilk<InferOutput<TSchema>, InferInput<TSchema>>

GraphQL Silk Like Valibot Schema

Defined in

packages/valibot/src/index.ts:288


vendor

static vendor: string = "valibot"

Defined in

packages/valibot/src/index.ts:38

Methods

ensureInterfaceType()

protected static ensureInterfaceType(item): GraphQLInterfaceType

Parameters

item: GraphQLInterfaceType | GenericSchema<unknown, unknown, BaseIssue<unknown>> | GenericSchemaAsync<unknown, unknown, BaseIssue<unknown>>

Returns

GraphQLInterfaceType

Defined in

packages/valibot/src/index.ts:257


getGraphQLType()

static getGraphQLType(schema): GraphQLOutputType

Parameters

schema: GenericSchemaOrAsync

Returns

GraphQLOutputType

Defined in

packages/valibot/src/index.ts:310


getGraphQLTypeBySelf()

static getGraphQLTypeBySelf(this): GraphQLOutputType

Parameters

this: GenericSchemaOrAsync

Returns

GraphQLOutputType

Defined in

packages/valibot/src/index.ts:314


nullable()

protected static nullable(ofType, wrapper): GraphQLOutputType

Parameters

ofType: GraphQLOutputType

wrapper: GenericSchemaOrAsync

Returns

GraphQLOutputType

Defined in

packages/valibot/src/index.ts:247


parse()

static parse<TSchema>(this, input): InferOutput<TSchema> | Promise<InferOutput<TSchema>>

Type Parameters

TSchema extends GenericSchemaOrAsync

Parameters

this: TSchema

input: unknown

Returns

InferOutput<TSchema> | Promise<InferOutput<TSchema>>

Defined in

packages/valibot/src/index.ts:301


toGraphQLType()

static toGraphQLType(schema, ...wrappers): GraphQLOutputType

Parameters

schema: GenericSchemaOrAsync

• ...wrappers: GenericSchemaOrAsync[]

Returns

GraphQLOutputType

Defined in

packages/valibot/src/index.ts:69


toGraphQLTypePurely()

static toGraphQLTypePurely(valibotSchema, ...wrappers): GraphQLOutputType

Parameters

valibotSchema: GenericSchemaOrAsync

• ...wrappers: GenericSchemaOrAsync[]

Returns

GraphQLOutputType

Defined in

packages/valibot/src/index.ts:79


toNullableGraphQLType()

static toNullableGraphQLType(schema): GraphQLOutputType

Parameters

schema: GenericSchemaOrAsync

Returns

GraphQLOutputType

Defined in

packages/valibot/src/index.ts:61


unravel()

static unravel<TSchema>(schema): TSchema & GraphQLSilk<InferOutput<TSchema>, InferInput<TSchema>>

get GraphQL Silk from Valibot Schema

Type Parameters

TSchema extends GenericSchemaOrAsync

Parameters

schema: TSchema

Valibot Schema

Returns

TSchema & GraphQLSilk<InferOutput<TSchema>, InferInput<TSchema>>

GraphQL Silk Like Valibot Schema

Defined in

packages/valibot/src/index.ts:45