Meta's JavaScript framework for building data-driven React apps with GraphQL
open sourceMITfree
Relay is Meta's JavaScript framework for data-driven React applications: components declare their data needs in GraphQL, colocated with the views that use them, and Relay aggregates them into efficient network requests that fetch only what's needed. GraphQL mutations get automatic data consistency, optimistic updates and error handling.
Problems it solves
- fetch GraphQL data in a large React app with queries next to components
- GraphQL client with optimistic updates for React
- keep a React app's GraphQL data consistent after mutations
Features
- declarative GraphQL data requirements
- queries colocated with components
- aggregated, minimal network requests
- mutations with optimistic updates and consistency
Alternatives
The same job
These do what Relay does.
- Apollo Client GraphQL client for TypeScript and JavaScript with caching built in, for React, Vue, Angular and more
