W3cubDocs

/Relay

Relay Documentation

To get started building Relay applications, you will need three things:

  1. A GraphQL Schema

    A description of your data model with an associated set of resolve methods that know how to fetch any data your application could ever need.

    GraphQL is designed to support a wide range of data access patterns. In order to understand the structure of an application's data, Relay requires that you follow certain conventions when defining your schema. These are documented in the GraphQL Relay Specification.

    • graphql-js on npm

      General-purpose tools for building a GraphQL schema using JavaScript

    • graphql-relay-js on npm

      JavaScript helpers for defining connections between data, and mutations, in a way that smoothly integrates with Relay.

  2. A GraphQL Server

    Any server can be taught to load a schema and speak GraphQL. Our examples use Express.

  3. Relay

    Relay speaks to GraphQL servers through a network layer. The network layer that ships with Relay is compatible with express-graphql out of the box, and will continue to evolve as we add new features to the transport.

The best way to get started right now is to take a look at how these three parts come together to form a working example. The tutorial on the next page will lead you through an example application, using the Relay Starter Kit, to give you an idea of how you can start using Relay on yours.

© 2013–2016 Facebook Inc.
Licensed under the BSD License.
https://facebook.github.io/relay/docs/getting-started.html