Queries
The Arc provides comprehensive support for implementing queries in your backend application. Queries are used for retrieving data and are a key component of CQRS (Command Query Responsibility Segregation) architecture, offering powerful features like observability, validation, and flexible parameter handling.
Topics
| Topic | Description |
|---|---|
| Controller based | How to implement queries using controller-based approach. |
| Model Bound | How to work with model-bound queries for simplified parameter handling. |
| Use Observable Queries with cURL | How to inspect snapshots, wait for the first payload, stream SSE updates, and emulate long polling from plain HTTP clients. |
| Observable Query Hub | Composite real-time streaming over a single fixed WebSocket or SSE endpoint. |
| Query Pipeline | Understanding the query pipeline and how queries are processed. |
| Read Model Interception | Apply cross-cutting operations (decryption, masking, enrichment) to read models before they are served to clients. |
| Authorization | How to use authorization attributes for role-based and policy-based authorization. |
| Validation | How to implement validation for query parameters. |
💡 Query Filters: The query pipeline supports filters for cross-cutting concerns like validation and authorization. See the Query Pipeline section for details on built-in filters and creating custom ones. 💡 Frontend Integration: Automatically generate TypeScript proxies for your queries with the Proxy Generation feature.
Overview
Queries in the Arc are designed to be flexible and powerful, supporting both traditional request-response patterns and reactive, observable queries that can provide real-time updates. The framework handles parameter validation, binding, and processing through a comprehensive pipeline that ensures consistent behavior across your application. Query arguments and parameter binding are covered within the controller-based and model-bound topics.