Skip to content

Latest commit

 

History

History
42 lines (27 loc) · 900 Bytes

query.md

File metadata and controls

42 lines (27 loc) · 900 Bytes
id title
query
Query

Query Object

:::info TypeScript Support

A view model query has an associated TypeScript type:

  • Type Name - ViewModelQuery
  • Package - @resolve-js/core

:::

A view model query object has the following structure:

{
  modelName, // (string) The name of the view model.
  aggregateIds, // (string[] or '*') A list of aggregate IDs for which to process events.
  aggregateArgs, // (object) An object that contains arguments attached to the query.
}

Result Object

:::info TypeScript Support

A view model query result has an associated TypeScript type:

  • Type Name - ViewModelQueryResult
  • Package - @resolve-js/core

:::

A view model query result is a serializable value, whose type and internal structure depend on the view model projection's implementation.