query¶
Read operation served by a Read Model. See Concepts: Query.
Fields¶
| Field | Required | Description |
|---|---|---|
apiVersion |
yes | schema.esdm.io/core/v1 |
kind |
yes | query |
name |
yes | The Query name. |
scope |
yes | scope.boundedContext reference. |
readModel |
yes | The name of the Read Model that serves the Query. |
parameters |
no | JSON Schema describing the Query's input parameters. |
result |
yes | JSON Schema describing the Query's response shape. |
paradigm |
no | Optional hint naming the paradigm used to describe result (tabular, document, graph, ...). |
actors |
no | Non-empty list of Actor names permitted to run this Query. |
constraints |
no | Named rules that shape the Query result (filtering, sorting, limiting, paradigm-specific traversal). |
description |
no | Free-form prose. |
metadata |
no | Non-semantic labels and annotations. |
A Query has no side effects and produces no Events.
Example¶
apiVersion: schema.esdm.io/core/v1
kind: query
name: list-rounds
scope:
domain: golf-club-management
boundedContext: round-play
readModel: rounds
parameters:
type: object
properties:
playerId: { type: string }
result:
type: array
items:
type: object
properties:
roundId: { type: string }
status: { type: string }
required: [roundId, status]