Chapter 1, Preparing Your Development Environment, starts with the architecture for our application by going through the core concepts and preparing a working React setup. We will see how React and webpack fit together and cover some basic scenarios when working with React. We will also show the reader how to debug the frontend with React Dev Tools.
Chapter 2, Setting Up GraphQL with Express.js, focuses on setting up Express.js as the primary system to serve our backend. You will learn how to use Express.js' routing functionality to implement various APIs. Furthermore, at the end of the chapter, you will set up an endpoint that accepts GraphQL requests through the Apollo Server package. To guarantee that everything works, we will quickly go through using Postman to test and verify the functionality of the backend.
Chapter 3, Connecting to the Database, discusses how to use GraphQL to store and query data. As an example, traditional SQL is used to build a full application with MySQL. To simplify the database code, we are using Sequelize, which lets us query our SQL Server with a regular JavaScript object and also keeps it open if we use MySQL, MSSQL, PostgreSQL, or just a SQLite file. We will build models and schemas for users and posts in Apollo and Sequelize.
Chapter 4, Integrating React into the Backend with Apollo, explains how to hook Apollo into React and build entire frontend components. This chapter skips the introduction to basic React workflows but explains Apollo-specific configurations.
Chapter 5, Reusable React Components, dives deeper into writing more complex React components and sharing data across them.
Chapter 6, Authentication with Apollo and React, explains the common ways of authenticating a user on the web and in GraphQL and the differences between them. You will be guided through building the complete authentication workflow by using best practices.
Chapter 7, Handling Image Uploads, covers uploading images via Apollo and saving them in a separate object storage such as AWS S3.
Chapter 8, Routing in React, explains how to implement some more features for the end user, such as a profile page. We will accomplish this by installing React Router.
Chapter 9, Implementing Server-Side Rendering, explains that for many applications, server-side rendering is a must. It is important for SEO, but it can also have positive effects on your end users. This chapter will focus on getting your current application moved to a server-rendered setup.
Chapter 10, Real-Time Subscriptions, focuses on how to build a real-time chat functionality, including a notification system. Every second, a new message can come in and the user can be directly informed about it. This functionality will be implemented through a more or less experimental GraphQL and Apollo feature called subscriptions.
Chapter 11, Writing Tests, uses the Mocha and JavaScript unit testing framework. This chapter will primarily focus on testing the GraphQL backend and testing React applications properly.
Chapter 12, Optimizing GraphQL with Apollo Engine, answers the questions how is our GraphQL API performing?, are there any errors?, and how can we improve the GraphQL schema? We answer these questions using Apollo Engine in this chapter.
Chapter 13, Continuous Deployment with CircleCI and Heroku, is where we will look at how to set up our Heroku app and get the option to build and deploy Docker images through a continuous deployment workflow.