© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
N. BiswasPractical GraphQLhttps://doi.org/10.1007/978-1-4842-9621-9_6

6. Connecting with the Front End

Nabendu Biswas1  
(1)
Bhopal, India
 

In this chapter, we will connect the front end to the backend of the blog app that we created in the previous chapter.

The Setup

In the directory of blog-app-prisma, we will add a client folder containing our basic React app. We will start with the initial code, which can be found at https://drive.google.com/file/d/1xx6T7tWk5S0Sfg5FE6hKx_QXJ6IaZv8p/view?usp=sharing.

Here, in the App.js file, we have different routes showing different components. See Listing 6-1.
import "./App.css";
import { Route, Switch } from "react-router"; ...

Get Practical GraphQL: Learning Full-Stack GraphQL Development with Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.