官术网_书友最值得收藏!

Connecting to The Database

Our back end and front end can communicate, create new posts, and respond with a list of all posts while using fake data. The next step on our list will be to use a database, such as an SQL server, to serve as data storage.

We want our backend to persist data to our SQL database by using Sequelize. Our Apollo Server should use this data for queries and mutations, as needed. In order for this to happen, we must implement database models for our GraphQL entities.

This chapter will cover the following points:

  • Using databases with GraphQL
  • Using Sequelize in Node.js
  • Writing database models
  • Performing database migrations with Sequelize
  • Seeding data with Sequelize
  • Using Apollo together with Sequelize
主站蜘蛛池模板: 盐亭县| 贵州省| 乐山市| 宁阳县| 竹溪县| 大埔区| 浏阳市| 灵寿县| 雅江县| 永宁县| 汶上县| 平安县| 桐城市| 改则县| 饶阳县| 宜都市| 崇阳县| 凯里市| 锦屏县| 枣强县| 恭城| 巴彦淖尔市| 南溪县| 巧家县| 乌鲁木齐县| 浠水县| 九龙县| 锦屏县| 蕲春县| 上杭县| 余姚市| 浦东新区| 蛟河市| 马鞍山市| 吉安县| 高邮市| 深州市| 策勒县| 花垣县| 巨野县| 自贡市|