Relay.QL

Relay.QL

Relay fragments, mutations, and queries must be specified using ES6 template literals tagged with Relay.QL. For example:

var fragment = Relay.QL`
  fragment on User {
    name
  }
`;

To execute this code, Relay needs access to the schema - which can be too large to bundle inside the application. Instead, these Relay.QL template expressions are transpiled into JavaScript descriptions via the babel-relay-plugin. This schema information allows Relay to understand things like the types of field arguments, which fields are connections or lists, and how to efficiently refetch records from the server.

Relay.QL objects are used by the following APIs: