Overview
The semantic layer you might already be running
If your application stack is already GraphQL-shaped, you have a thin semantic layer in plain sight: the federated supergraph. Each domain team owns a subgraph (users, orders, inventory); a router (Apollo Router, GraphQL Mesh, Hasura DDN) composes them into a single typed supergraph that consumers query.
Why this counts as a semantic layer
- One unified vocabulary —
Customer.lifetimeValueis defined once, in the subgraph that owns it, and surfaces across every product. - Typed contracts — the schema is the contract. Schema checks (Apollo's
rover schema check, Hasura'sschema-changes) catch breaking changes in CI. - Domain ownership — subgraphs map cleanly to bounded contexts (cross-link to the
software-architecture-dddtrack), so the team that owns the entity owns the schema.
Where it stops short
GraphQL federation is transactional / OLTP-shaped, not analytical. It is great at 'fetch these typed objects and their relations'; it is not an OLAP engine — it cannot compute revenue BY country, week over a TB-scale fact table efficiently.
The pragmatic stack
- Use GraphQL federation as the application-side semantic layer for typed product data and cross-domain fetches.
- Use dbt SL / Cube / LookML for the analytical semantic layer over the warehouse.
- Glue them together at the BFF (Backend-for-Frontend) so consumers see one logical API.