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

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
主站蜘蛛池模板: 浦北县| 托克托县| 安溪县| 大余县| 太保市| 长治县| 司法| 南华县| 尉犁县| 江北区| 白沙| 宁乡县| 德化县| 定西市| 祁阳县| 沭阳县| 太保市| 安溪县| 嘉黎县| 嘉兴市| 盐池县| 咸丰县| 常宁市| 曲水县| 麦盖提县| 江安县| 长寿区| 门源| 盱眙县| 章丘市| 岗巴县| 如皋市| 湛江市| 大关县| 康定县| 保靖县| 益阳市| 凭祥市| 和硕县| 乃东县| 昭觉县|