new ZodWeaver():
ZodWeaver
static
config: (config
) =>ZodWeaverConfig
Create a Zod weaver config object
• config: ZodWeaverConfigOptions
Zod weaver config options
ZodWeaverConfig
a Zod weaver config object
packages/zod/src/index.ts:382
static
useConfig: (config
) => <TSchema
>(schema
) =>TSchema
&GraphQLSilk
<output
<TSchema
>,input
<TSchema
>>
Use a Zod weaver config
• config: ZodWeaverConfigOptions
Zod weaver config options
Function
a new Zod to silk function
get GraphQL Silk from Zod Schema
• TSchema extends ZodType
<any
, ZodTypeDef
, any
>
• schema: TSchema
Zod Schema
TSchema
& GraphQLSilk
<output
<TSchema
>, input
<TSchema
>>
GraphQL Silk Like Zod Schema
packages/zod/src/index.ts:394
static
vendor:string
="zod"
packages/zod/src/index.ts:72
protected
static
ensureInterfaceType(item
):GraphQLInterfaceType
• item: GraphQLInterfaceType
| ZodObject
<any
, UnknownKeysParam
, ZodTypeAny
, object
, object
>
GraphQLInterfaceType
packages/zod/src/index.ts:322
static
getDiscriminatedUnionOptionName(option
,config
?):undefined
|string
• option: undefined
| ZodDiscriminatedUnionOption
<any
>
• config?: TypeOrFieldConfig
undefined
| string
packages/zod/src/index.ts:310
protected
static
getEnumConfig(schema
,config
?):EnumConfig
<string
>
• schema: ZodEnum
<any
> | ZodNativeEnum
<any
>
• config?: TypeOrFieldConfig
EnumConfig
<string
>
packages/zod/src/index.ts:331
protected
static
getFieldConfig(schema
):FieldConfig
• schema: ZodType
<any
, ZodTypeDef
, any
>
FieldConfig
packages/zod/src/index.ts:358
static
getGraphQLType(schema
):GraphQLOutputType
• schema: ZodType
<any
, ZodTypeDef
, any
>
GraphQLOutputType
packages/zod/src/index.ts:407
static
getGraphQLTypeBySelf(this
):GraphQLOutputType
• this: ZodType
<any
, ZodTypeDef
, any
>
GraphQLOutputType
packages/zod/src/index.ts:411
protected
static
getObjectConfig(schema
,config
?):Partial
<GraphQLObjectTypeConfig
<any
,any
>>
• schema: ZodObject
<any
, UnknownKeysParam
, ZodTypeAny
, object
, object
>
• config?: TypeOrFieldConfig
Partial
<GraphQLObjectTypeConfig
<any
, any
>>
packages/zod/src/index.ts:274
protected
static
getUnionConfig(schema
,config
?):Partial
<GraphQLUnionTypeConfig
<any
,any
>>
• schema: ZodUnion
<any
> | ZodDiscriminatedUnion
<any
, any
>
• config?: TypeOrFieldConfig
Partial
<GraphQLUnionTypeConfig
<any
, any
>>
packages/zod/src/index.ts:345
static
toGraphQLType(schema
,config
?):GraphQLOutputType
• schema: ZodType
<any
, ZodTypeDef
, any
>
• config?: TypeOrFieldConfig
GraphQLOutputType
packages/zod/src/index.ts:115
static
toGraphQLTypePurely(schema
,config
?):GraphQLOutputType
• schema: ZodType
<any
, ZodTypeDef
, any
>
• config?: TypeOrFieldConfig
GraphQLOutputType
packages/zod/src/index.ts:125
static
toNullableGraphQLType(schema
):GraphQLOutputType
• schema: ZodType
<any
, ZodTypeDef
, any
>
GraphQLOutputType
packages/zod/src/index.ts:102
static
unravel<TSchema
>(schema
):TSchema
&GraphQLSilk
<output
<TSchema
>,input
<TSchema
>>
get GraphQL Silk from Zod Schema
• TSchema extends ZodType
<any
, ZodTypeDef
, any
>
• schema: TSchema
Zod Schema
TSchema
& GraphQLSilk
<output
<TSchema
>, input
<TSchema
>>
GraphQL Silk Like Zod Schema
packages/zod/src/index.ts:78
static
weave(...inputs
):GraphQLSchema
Weave a GraphQL Schema from resolvers with zod schema
• ...inputs: (GraphQLSilk
<any
, any
> | SilkResolver
| WeaverConfig
| SchemaWeaver
| Middleware
)[]
Resolvers, Global Middlewares, WeaverConfigs Or SchemaWeaver
GraphQLSchema
GraphQL Schema
packages/zod/src/index.ts:98