howtographql/react-relay

Name: react-relay

Owner: How to GraphQL

Description: null

Created: 2017-06-29 12:27:35.0

Updated: 2018-05-14 08:02:06.0

Pushed: 2018-04-03 20:44:21.0

Homepage: null

Size: 1343

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

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
clone https://github.com/howtographql/react-relay/
eact-relay
2. Create GraphQL API with graphcool

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

stall Graphcool CLI
install -g graphcool

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

erver
hcool 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
 install
y-compiler --src ./src --schema ./schema.graphql
 start # open http://localhost:3000 in your browser

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.