full60mm / react-apollo-graphql

JavaScript meets web. React in tandem with Apollo. Minimal implementation that will help you get started with GraphQL. Backend is provided by graph.cool.

Home Page:https://react-apollo-graphql.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CircleCI Test Coverage Maintainability Greenkeeper badge

React Apollo GraphQl

Deploy

Today you have basically two ways how to start new react application: NextJs or Create React App. I created this repository couple of years ago and now I try to keep it alive so that I have at least some idea how to bootstrap new react application from scratch.

Backend is provided by graphq.cool ❤️

Demo

You can try the application here (it might take a while before the free server wakes up)

Custom UI Library 📚

I was slowly getting lost in all of my side projects. Every time I wanted to learn something new I had to create a basic UI for my application. So I decided to create my own components library.

You can find the repository here

Data Flow (no redux 🎉)

In the past, Apollo users stored their application’s local data in a separate Redux or MobX store. With apollo-link-state, you no longer have to maintain a second store for local state. You can instead use the Apollo Client cache as your single source of truth that holds all of your local data alongside your remote data. To access or update your local state, you use GraphQL queries and mutations just like you would for data from a server.

You can find more information here

Installation

Run yarn install

Vendors dll files should be generated automatically in /public/vendors-[hash].js every time you change your dependencies.

Development

Development server is provided by express framework. Webpack is injected to the app through webpack-dev-middleware and webpack-hot-middleware.

To start the server just run: yarn dev

Production

Project files are generated into the /public folder using yarn build:production command.

  1. Use yarn build:production in order to build the static files.

  2. Use yarn prod command in order to start the app. This will start express server.

Deployment on Heroku

This application is Heroku ready. All you have to do is set config:set NPM_CONFIG_PRODUCTION=false in your your config. Everything else is prepared.

Docker

The development process is not dockerized. However, it is possible to run a production application from docker container:

docker-compose up

About

JavaScript meets web. React in tandem with Apollo. Minimal implementation that will help you get started with GraphQL. Backend is provided by graph.cool.

https://react-apollo-graphql.herokuapp.com/


Languages

Language:JavaScript 95.7%Language:HTML 3.4%Language:Dockerfile 0.9%