Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Full-Stack Web Development with GraphQL and React

You're reading from   Hands-On Full-Stack Web Development with GraphQL and React Build scalable full-stack applications while learning to solve complex problems with GraphQL

Arrow left icon
Product type Paperback
Published in Jan 2019
Publisher Packt
ISBN-13 9781789134520
Length 460 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Sebastian Grebe Sebastian Grebe
Author Profile Icon Sebastian Grebe
Sebastian Grebe
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Preparing Your Development Environment FREE CHAPTER 2. Setting up GraphQL with Express.js 3. Connecting to The Database 4. Integrating React into the Back end with Apollo 5. Reusable React Components 6. Authentication with Apollo and React 7. Handling Image Uploads 8. Routing in React 9. Implementing Server-Side Rendering 10. Real-Time Subscriptions 11. Writing Tests 12. Optimizing GraphQL with Apollo Engine 13. Continuous Deployment with CircleCI and Heroku 14. Other Books You May Enjoy

What this book covers

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.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image