Function: subscription()

subscription<TOutput, TInput, TValue>(output, subscribeOrOptions): Subscription<SchemaToSilk<GraphQLSilkIO | YupSchemaIO, TOutput>, InputSchemaToSilk<GraphQLSilkIO | YupSchemaIO, TInput>, TValue>

Type Parameters

TOutput extends GraphQLSilk<any, any> | Schema<any, any, any, "">

TInput extends InputSchema<GraphQLSilk<any, any> | Schema<any, any, any, "">> = undefined

TValue = "~standard" extends keyof TOutput ? "types" extends keyof NonNullable<TOutput[keyof TOutput & "~standard"]> ? "output" extends keyof NonNullable<NonNullable<TOutput[keyof ... & "~standard"]>[keyof NonNullable<...[...]> & "types"]> ? NonNullable<NonNullable<TOutput[keyof ... & "~standard"]>[keyof NonNullable<...[...]> & "types"]>[keyof NonNullable<NonNullable<...[...]>[keyof ... & "types"]> & "output"] : never : never : never | "__outputType" extends keyof TOutput ? TOutput[keyof TOutput & "__outputType"] : never

Parameters

output: TOutput

subscribeOrOptions: SubscriptionOptions<GraphQLSilkIO | YupSchemaIO, TOutput, TInput, TValue> | () => MayPromise<AsyncIterator<"~standard" extends keyof TOutput ? "types" extends keyof NonNullable<TOutput[... & ...]> ? "output" extends keyof NonNullable<...[...]> ? NonNullable<...[...]>[keyof ... & "output"] : never : never : never | "__outputType" extends keyof TOutput ? TOutput[keyof TOutput & "__outputType"] : never, any, undefined>>

Returns

Subscription<SchemaToSilk<GraphQLSilkIO | YupSchemaIO, TOutput>, InputSchemaToSilk<GraphQLSilkIO | YupSchemaIO, TInput>, TValue>

Defined in

packages/yup/src/index.ts:383