website/versioned_docs/version-v20.1.0/principles-and-architecture/architecture-overview.md
import DocsRating from '@site/src/core/DocsRating';
This document, together with Runtime Architecture and Compiler Architecture, describes the high-level architecture of Relay. The intended audience includes developers interested in contributing to Relay, developers hoping to utilize the building blocks of Relay to create higher-level APIs, and anyone interested in understanding more about Relay internals. For developers wanting to learn more about using Relay to build products, the Tutorial is the best resource.
Relay is composed of three core parts:
useFragment).Note that these modules are loosely coupled. For example, the compiler emits representations of queries in a well-defined format that the runtime consumes, such that the compiler implementation can be swapped out if desired. React/Relay relies only on the well-documented public interface of the runtime, such that the actual implementation can be swapped out. We hope that this loose coupling will allow the community to explore new use-cases such as the development of specialized product APIs using the Relay runtime or integrations of the runtime with view libraries other than React.
<DocsRating />