Skip to content

juffalow/react-relay-example

Repository files navigation

React + Relay Example

List of Quotes with Authors implemented in React + Relay.

You can use either PHP or Node as a backend.

How to run the project

Installation

yarn install

# or if you use npm

npm install

Configuration

Create src/config.ts or rename src/config.example.ts and make sure it contains your server's graphql endpoint url:

export default {
  graphql: 'http://localhost:3013/graphql',
};

Download GraphQL schema

For this, you need to have graphql-cli installed.

graphql get-schema --project quotes -e default

Build / transform components which are using graphql / relay

yarn run relay

Start the project

yarn start

Old version

This version is using older Relay version 10.0.1:

Working version of React + Relay application written in JavaScript:

License

MIT license