Interface: SubscriptionOptions<TSchemaIO, TOutput, TInput, TValue>

Options for creating a GraphQL Subscription.

Extends

Type Parameters

TSchemaIO extends AbstractSchemaIO

TOutput extends TSchemaIO[0]

TInput extends InputSchema<TSchemaIO[0]> = undefined

TValue = InferSchemaO<TOutput, TSchemaIO>

Properties

deprecationReason?

optional deprecationReason: Maybe<string>

Inherited from

GraphQLFieldOptions.deprecationReason

Defined in

node_modules/.pnpm/graphql@16.8.1_patch_hash=2p6wc42resg5at2p4utt5idamq/node_modules/graphql/type/definition.d.ts:535


description?

optional description: Maybe<string>

Inherited from

GraphQLFieldOptions.description

Defined in

node_modules/.pnpm/graphql@16.8.1_patch_hash=2p6wc42resg5at2p4utt5idamq/node_modules/graphql/type/definition.d.ts:530


extensions?

optional extensions: Maybe<Readonly<GraphQLFieldExtensions<any, any, any>>>

Inherited from

GraphQLFieldOptions.extensions

Defined in

node_modules/.pnpm/graphql@16.8.1_patch_hash=2p6wc42resg5at2p4utt5idamq/node_modules/graphql/type/definition.d.ts:536


input?

optional input: TInput

Defined in

packages/core/src/resolver/types.ts:276


middlewares?

optional middlewares: Middleware<Subscription<SchemaToSilk<TSchemaIO, TOutput>, InputSchemaToSilk<TSchemaIO, TInput>, TValue>>[]

Inherited from

ResolverOptions.middlewares

Defined in

packages/core/src/resolver/types.ts:65


resolve()?

optional resolve: (value, input) => MayPromise<InferPropertyType<TOutput, TSchemaIO[2]>>

Parameters

value: TValue

input: InferInputO<TInput, TSchemaIO>

Returns

MayPromise<InferPropertyType<TOutput, TSchemaIO[2]>>

Defined in

packages/core/src/resolver/types.ts:280


subscribe()

subscribe: (input) => MayPromise<AsyncIterator<TValue, any, undefined>>

Parameters

input: InferInputO<TInput, TSchemaIO>

Returns

MayPromise<AsyncIterator<TValue, any, undefined>>

Defined in

packages/core/src/resolver/types.ts:277