Skip to content

QueryDefinition

Describes one Query: its access Grants, input and output contracts, and the handler that performs the read.

readonly description: string | undefined

Description set with setDescription, or undefined.


readonly grants: GrantDefinition[]

Roles allowed to run the Query; a principal needs any one of them.


readonly handler: QueryHandler

The function the Runtime calls with parsed input.


readonly input: InputDefinition

Input contract, or null when the Query takes no input.


readonly key: string

Key of the Query, unique within its App.


readonly method: QueryMethod

HTTP method set with setMethod, GET by default.


readonly output: OutputDefinition

Output contract, or null when the Query returns nothing.


readonly prn: string

PRN of the Query, prn::<app>:query/<key>.