From the course: GraphQL Essential Training

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Data persistence with SQL

Data persistence with SQL - GraphQL Tutorial

From the course: GraphQL Essential Training

Data persistence with SQL

- [Instructor] Adding any other databases to GraphQL is a similar process, and I wanted to give you a quick example with SQLite. Needless to say, you would have to update your resolvers and schema to support this new database and data, but for the sake of focusing on MongoDB I'll quickly provide an example for SQL. Then the process of creating a function that resolves this particular data is similar to what we've done. So, let me go ahead and show you how it's done. So, I'm going to go first into my server here, and I'm going to stop it with Control + C. And I'm going to install a few dependencies. So, I'm going to install npm i, casual, lodash, sequelize, and sqlite3, and these dependencies are going to allow me to use SQLite3. So, you don't have to do this. I have to do this 'cause I have an issue with my system right now, so I'm just going to force these and it's going to work for me. But you don't have to do the --force. It's just something that's running in my cache. All right…

Contents