...

/

Exercise: Read User Data from the Database

Exercise: Read User Data from the Database

Practice implementing resolvers that read data from a MongoDB database.

It’s time to finish our integration with MongoDB. To do so, we must add a Mongoose schema for the users collection and update the remaining resolvers.

As before, this exercise provides a starter code, a walkthrough of the changes we need to implement, and, in case we get stuck, a solution code.

Exercise source code

To get the source code for this exercise, run the following command in the project’s repository:

git checkout db-resolver-exercise

Practice demo

{
  "ext": "js,graphql",
  "delay": 2000
}
Practice demo

How to run the application

Our ...