Skip to content

QueryHandler

QueryHandler<TInput, TOutput, TCurrent, TContext> = (input, current, ctx) => Promise<TOutput>

Performs the read behavior of a Query and returns a result for the Runtime to marshal against the output declaration.

TInput = any

Parsed input shape; the compiler derives it from the input declaration.

TOutput = any

Result shape; the compiler derives it from the output declaration.

TCurrent = ReadAppInstance

App instance handed to the handler.

TContext = ReadRuntimeInstance

Runtime instance handed to the handler.

TInput

Input parsed against the Query’s input declaration.

TCurrent

The App that declared the Query, with read access to its Items.

TContext

Read Runtime bound to the Workspace of the call.

Promise<TOutput>

The result the Runtime checks against the output declaration.

Behavior and change