This does not yet use Drupal as a backend. Currently, we are using the GraphQL SWAPI (StarWars API). We will switch to using a Drupal backend once Relay support has been added (shortly!).
This is a proof of concept of a decoupled React application using Relay & GraphQL. The application is built on top of a Drupal backend that uses the GraphQL module to expose its full content entity hierarchy as a GraphQL schema.
On top of these technologies, this proof of concept also uses server-side rendering techniques as well as hot-reloading on the client (in development mode) for ease of development.
First, you need to clone this repository.
git clone git@github.com:fubhy/drupal-decoupled-app
Then, you need to install the dependencies.
npm install
Then, you need to copy the .env.example file to .env and edit the content if necessary.
cp .env.example .env
Now you can run the application.
npm run dev
npm run start
npm run lint
npm run test
This application is ready for being deployed on heroku. Simply set up the heroku integration for your fork or use the heroku cli toolbelt to deploy it as an app.
This project is heavily inspired and branched off of the amazing React boilerplate by Max Stoiber!
This project is licensed under the MIT license, Copyright (c) 2016 Sebastian Siemssen. For more information see LICENSE.md.