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:279


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:294


vendor

static vendor: string = "valibot"

Defined in

packages/valibot/src/index.ts:40

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:263


getGraphQLType()

static getGraphQLType(schema): GraphQLOutputType

Parameters

schema: GenericSchemaOrAsync

Returns

GraphQLOutputType

Defined in

packages/valibot/src/index.ts:307


getGraphQLTypeBySelf()

static getGraphQLTypeBySelf(this): GraphQLOutputType

Parameters

this: GenericSchemaOrAsync

Returns

GraphQLOutputType

Defined in

packages/valibot/src/index.ts:311


nullable()

protected static nullable(ofType, wrapper): GraphQLOutputType

Parameters

ofType: GraphQLOutputType

wrapper: GenericSchemaOrAsync

Returns

GraphQLOutputType

Defined in

packages/valibot/src/index.ts:253


toGraphQLType()

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

Parameters

schema: GenericSchemaOrAsync

• ...wrappers: GenericSchemaOrAsync[]

Returns

GraphQLOutputType

Defined in

packages/valibot/src/index.ts:79


toGraphQLTypePurely()

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

Parameters

valibotSchema: GenericSchemaOrAsync

• ...wrappers: GenericSchemaOrAsync[]

Returns

GraphQLOutputType

Defined in

packages/valibot/src/index.ts:89


toNullableGraphQLType()

static toNullableGraphQLType(schema): GraphQLOutputType

Parameters

schema: GenericSchemaOrAsync

Returns

GraphQLOutputType

Defined in

packages/valibot/src/index.ts:71


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:55


weave()

static weave(...inputs): GraphQLSchema

Weave a GraphQL Schema from resolvers with valibot schema

Parameters

• ...inputs: (GraphQLSilk<any, any> | SilkResolver | WeaverConfig | SchemaWeaver | Middleware)[]

Resolvers, Global Middlewares, WeaverConfigs Or SchemaWeaver

Returns

GraphQLSchema

GraphQL Schema

Defined in

packages/valibot/src/index.ts:47