Package-level declarations
Types
The QueryGateway over one backend: schemaProvider supplies the schema every query is admitted against, filters and policies run at admission steps 1 and 2, and observer sees every outcome. One instance serves every caller.
Who runs a query, and how: the explicit argument of every gateway operation and of QueryPolicy, in place of 9.x's Reactor ContextView. The identity is the Caller commands are admitted with: the HTTP edge resolves one per request and, for a Wow-Scope request, has QueryTargets decide the tenant and scope it acts in; the query adds only its execution context. In-process code passes IN_PROCESS.
Where a query came from; its QueryCaller states it.
The queries of one aggregate type's read model, each run for an explicit QueryCaller: admitted (QueryAdmission), executed on the backend's four primitives (BackendQueries.kt) within the timeout the caller's budget gives, and observed. Records are JSON trees as the model stores them; a caller that wants a type reads them with WowJson.
How a gateway reads the records its backend returns, in place of the schema's response masks: a model whose records the backend returns as stored and the gateway reads as the model shows them (the events model). The record is the backend's own, fresh instance; the reader may change it in place and return it.
The caller's scope, split by provenance. Both halves restrict the query; only the authenticated half counts as provided when a gateway requires an authenticated scope.