Class: YupWeaver

Constructors

new YupWeaver()

new YupWeaver(): YupWeaver

Returns

YupWeaver

Properties

config()

static config: (config) => YupWeaverConfig

Create a yup weaver config object

Parameters

config: YupWeaverConfigOptions

yup weaver config options

Returns

YupWeaverConfig

a yup weaver config object

Defined in

packages/yup/src/index.ts:289


DescriptionMap

static DescriptionMap: WeakMap<Schema<any, any, any, "">, SchemaDescription>

Defined in

packages/yup/src/index.ts:314


useConfig()

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

Use a yup weaver config

Parameters

config: YupWeaverConfigOptions

yup weaver config options

Returns

Function

a new yup to silk function

get GraphQL Silk from Yup Schema

Type Parameters

TSchema extends Schema<any, any, any, any>

Parameters

schema: TSchema

Yup Schema

Returns

TSchema & GraphQLSilk<InferType<TSchema>, InferType<TSchema>>

GraphQL Silk Like Yup Schema

Defined in

packages/yup/src/index.ts:301

Methods

describe()

protected static describe(schema): SchemaDescription

Parameters

schema: Schema<any, any, any, "">

Returns

SchemaDescription

Defined in

packages/yup/src/index.ts:316


ensureInterfaceTypes()

static ensureInterfaceTypes(thunkList): undefined | readonly GraphQLInterfaceType[]

Parameters

thunkList: undefined | ThunkReadonlyArray<Schema<any, any, any, "">>

Returns

undefined | readonly GraphQLInterfaceType[]

Defined in

packages/yup/src/index.ts:226


ensureSchema()

static ensureSchema(schema): Schema<any, any, any, "">

Parameters

schema: Reference<unknown> | ISchema<unknown, unknown, any, any>

Returns

Schema<any, any, any, "">

Defined in

packages/yup/src/index.ts:219


getEnumType()

static getEnumType(description): null | GraphQLEnumType

Parameters

description: SchemaDescription

Returns

null | GraphQLEnumType

Defined in

packages/yup/src/index.ts:246


isEnumType()

static isEnumType(description): boolean

Parameters

description: SchemaDescription

Returns

boolean

Defined in

packages/yup/src/index.ts:240


toGraphQLType()

static toGraphQLType(schema): GraphQLOutputType

Parameters

schema: Schema<any, any, any, "">

Returns

GraphQLOutputType

Defined in

packages/yup/src/index.ts:97


toNullableGraphQLType()

static toNullableGraphQLType(schema): GraphQLOutputType

Parameters

schema: Schema<any, any, any, "">

Returns

GraphQLOutputType

Defined in

packages/yup/src/index.ts:83


unravel()

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

get GraphQL Silk from Yup Schema

Type Parameters

TSchema extends Schema<any, any, any, any>

Parameters

schema: TSchema

Yup Schema

Returns

TSchema & GraphQLSilk<InferType<TSchema>, InferType<TSchema>>

GraphQL Silk Like Yup Schema

Defined in

packages/yup/src/index.ts:60