Skip to content

howtographql/react-relay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React & Relay Tutorial

This is the sample project that belongs to the React & Relay Tutorial on How to GraphQL.

Running the App

1. Clone repository

git clone https://github.com/howtographql/react-relay/
cd react-relay

2. Create GraphQL API with graphcool

If you haven't already, install the Graphcool CLI:

# Install Graphcool CLI
npm install -g graphcool

Once it's installed, you can deploy the Graphcool service based on the existing definition inside the server directory:

cd server
graphcool deploy

When prompted, choose any of the Shared Clusters deplyoment options.

3. Connect the app with your GraphQL API

Copy the service ID (which you find in the generated .graphcoolrc file inside the server directory or by running graphcool info) into ./src/Environment.js replacing the current placeholder __SERVICE_ID__.

Notice that you need to this twice, once inside fetchQuery and once inside setupSubscription.

5. Install dependencies & run locally

yarn install
relay-compiler --src ./src --schema ./schema.graphql
yarn start # open http://localhost:3000 in your browser

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published