Introduction
Introduction
Orchestr is the powerful data-composition framework at the heart of Laioutr. It is designed to be a flexible and powerful tool for building scalable data layer applications with a focus on type safety, data composition, and modular architecture.
Core Concepts
Orchestr is built around four main handler types that work together to provide a complete data layer solution:
- Action Handlers: Handle mutations and side effects
- Query Handlers: Fetch and return entity IDs
- Link Handlers: Define relationships between entities
- Component Resolvers: Resolve specific data components for entities
Tokens
As orchestr does not know which app is responsible for a given action, query, link, or component, it uses tokens to identify them.
Tokens can be thought of as "contracts" between the frontend, orchestr and the apps. Each token is a unique identifier that is used to identify the action, query, link, or component.
Action Token
Defines the input and output of an action. Typically used for mutations and side effects like creating an order, adding an item to a cart, etc.
Query Token
Defines the input of a query. Typically used for fetching data from the database. E.g search for products by a string, show products in category.