Skip to main content

Query

Query Objectā€‹

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ā€‹

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.