Slide 1

Slide 1 text

Relay Let there be data in the firmament JavaScriptures IV.I Alloy

Slide 2

Slide 2 text

Why have an API client at all?

Slide 3

Slide 3 text

Description ● Provide application code with an interface abstracted away from network/API details ● Handle authentication in a single place ● Handle caching in a single place ● Handle errors in a single place Responsibilities of an API client

Slide 4

Slide 4 text

Relay A framework for data-driven React apps

Slide 5

Slide 5 text

Declare the data your components need with GraphQL, Relay determines how and when to fetch your data. Declarative

Slide 6

Slide 6 text

GraphQL is written next to the views that rely on them. Relay aggregates queries into efficient network requests. Colocation

Slide 7

Slide 7 text

Write GraphQL mutations and Relay offers automatic data consistency, optimistic updates, and error handling. Mutations

Slide 8

Slide 8 text

Relay compiler uses your full GraphQL schema at compile-time to ensure the data consistency Safety

Slide 9

Slide 9 text

Example

Slide 10

Slide 10 text

Competitors