# facebook/relay

Relay is a JavaScript framework for building data-driven React applications.

Repository: https://github.com/facebook/relay
Canonical: https://ross.abutalabs.com/products/relay
Homepage: https://relay.dev
Language: Rust
License: MIT
License Family: permissive
Last push: 2026-08-26T19:26:22+00:00

## Health v2 (maintenance only)
Score: 90/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 74, longevity 100
- inputs: {"age_days": 4041, "days_push": 7, "days_rel": 98, "gap_med": 43.0, "n_releases_24m": 9}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 18957, forks 1895 (observed 2026-08-28T04:11:27.279033+00:00)

## What it is
Relay is a JavaScript framework and GraphQL client for building data-driven React applications, where components declaratively declare their data requirements and Relay's compiler aggregates and optimizes queries. It provides a normalized client-side store, mutations with optimistic updates, type-safe generated TypeScript types, and built-in UI patterns like pagination, refetching, and streaming/deferred data.

## Use cases
- fetch data in react components with graphql
- declarative data fetching for react app
- generate typescript types from graphql queries
- manage normalized client-side cache for graphql
- prefetch graphql queries before code loads
- handle pagination and optimistic updates in react
- colocate graphql queries with react components

## When to choose
- building a large-scale React application backed by a GraphQL API
- you want type-safe, colocated, composable data requirements per component
- you need automatic query aggregation, deduplication, and a normalized store
- you want built-in pagination, refetching, and optimistic update patterns

## When to avoid
- your backend is REST rather than GraphQL
- you want a lightweight client for a small app with simple data needs
- your team is unwilling to adopt Relay's compiler and conventions
- you use a framework other than React

## Facets
- artifact type: framework
- maturity: stable
- function: graphql, graphql-client, state-management, http-client, frontend-framework, compiler, type-system
- domain: frontend, web-development, apis
- platform: cross-platform
- tags: react, data-fetching, declarative-ui, normalized-store, optimistic-updates, typescript-codegen, meta-open-source, javascript, nodejs, web-server

## Member repositories
- facebook/relay (main) score 90

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:27.279033+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:00:43.649163+00:00, confidence not recorded.
  - readme: https://github.com/facebook/relay (fetched 2026-08-28T04:11:27.279033+00:00, sha abf085e4975e)
  - homepage: https://relay.dev (fetched 2026-08-29T07:59:19.586144+00:00, sha 3c58e9abba11)
  - site_page: https://relay.dev/docs (fetched 2026-08-29T07:59:19.590066+00:00, sha 850b2a33b6ed)
  - site_page: https://relay.dev/docs/next (fetched 2026-08-29T07:59:19.592311+00:00, sha 27e5a51a61c2)
  - site_page: https://relay.dev/docs/v20.1.0 (fetched 2026-08-29T07:59:19.594144+00:00, sha f93d73a78121)
  - site_page: https://relay.dev/docs/v20.0.0 (fetched 2026-08-29T07:59:19.595808+00:00, sha 50bbc125666e)
  - site_page: https://relay.dev/docs/v19.0.0 (fetched 2026-08-29T07:59:19.597417+00:00, sha 4af7305cc307)
  - site_page: https://relay.dev/docs/v18.0.0 (fetched 2026-08-29T07:59:19.599254+00:00, sha 4c9f32f03e89)
  - site_page: https://relay.dev/docs/v17.0.0 (fetched 2026-08-29T07:59:19.601202+00:00, sha a1cd73935ec7)
  - site_page: https://relay.dev/docs/v16.0.0 (fetched 2026-08-29T07:59:19.628542+00:00, sha b09fa0ac4e30)
- Data as of 2026-08-30T08:39:29.467469+00:00.
