Creating a GraphQL API with Express
To start the shopping cart system project, we first create a GraphQL API with Express. We start with the backend since we need it for both frontends. To get started, we have to add a few libraries that are needed to manipulate the SQLite database and add authentication to our app. Also, we need the library to enable Cross-Origin Resource Sharing (CORS) in our app.
npm i cors jsonwebtoken sqlite3 express-graphql graphql
After installing the packages, we are ready to work on the code.