Skip to main content
Version: v12.0.0

Workflow

Before we can get started writing Relay code, we need to make sure to setup the Relay Compiler.

The Relay Compiler will analyze any graphql literals inside your Javascript code, and produce a set of artifacts that are used by Relay at runtime, when the application is running on the browser.

So whenever we're developing Relay components, for example by writing Fragments or Queries, we will need to run the Relay Compiler:

yarn run relay

Or we can run it in watch mode, so the artifacts are re-generated as we update our source code:

yarn run relay --watch

Is this page useful?

Help us make the site even better by answering a few quick questions.