Function: subscription()

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

Type Parameters

TOutput extends GraphQLSilk<any, any>

TInput extends InputSchema<GraphQLSilk<any, any>> = undefined

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

Parameters

output: TOutput

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

Returns

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

Defined in

packages/core/src/resolver/resolver.ts:101