Update Relay docs (#7041)

This commit is contained in:
Orta
2019-05-13 12:40:16 -04:00
committed by Ian Sutherland
parent e2f43a06a6
commit b59d42744e

View File

@@ -3,18 +3,18 @@ id: adding-relay
title: Adding Relay
---
Relay is a framework for building data-driven React applications powered by GraphQL. The current release candidate of Relay works with Create React App projects out of the box using Babel Macros. Simply set up your project as laid out in the [Relay documentation](https://facebook.github.io/relay/), then make sure you have a version of the babel plugin providing the macro.
Relay is a framework for building data-driven React applications powered by GraphQL. The current release of Relay works with Create React App projects out of the box using Babel Macros. Simply set up your project as laid out in the [Relay documentation](https://facebook.github.io/relay/), then make sure you have a version of the babel plugin providing the macro.
To add it, run:
```sh
npm install --save babel-plugin-relay@dev
npm install --save babel-plugin-relay
```
Alternatively you may use `yarn`:
```sh
yarn upgrade babel-plugin-relay@dev
yarn upgrade babel-plugin-relay
```
Then, wherever you use the `graphql` template tag, import the macro: