An Apollo GraphQL example using React and FakerQl.
FakerQL is a hosted GraphQL endpoint that allows you to send queries, mutations and subscriptions for totally fake data. In this case I'll use it for testing Apollo client along with React.js. The login and register mutations return a JWT which is great for applications that require authentication.
The project is created to build a modern React application:
- React 16.3
- Webpack and React Router 4
- Apollo client 2.2
- Styled Components
- Server Side Rendering
- Code Spliting (by Vendor and Routes) (working in)
- Live Reload (without browser extension)
- Bundle Analizer (comming soon)
- Linter with prettier and eslint (airbnb's config)
Run the following script in diferent terminals:
npm run build:dev
# and in the other terminal
npm run start:devOr if you prefer Yarn
yarn build:dev
# and in the other terminal
yarn start:devyarn lintyarn lint:fixJust make sure your lints are okay :D
- Juan David Castro (@juandc) <[email protected]>