CYCBrian / 21-Book-Search-Engine-RestfulAPI-to-Graphql-Refactoring

Taking a fully functioning Google Books API search engine built with a RESTful API, and refactor it to be a GraphQL API built with Apollo Server. The app was built using the MERN stack, with a React front end, MongoDB database, and Node.js/Express.js server and API.
MIT License
0 stars 0 forks source link

back-end: resolvers #3

Open CYCBrian opened 5 months ago

CYCBrian commented 5 months ago

define the query and mutation functionality to work with Mongoose models

CYCBrian commented 5 months ago

Use the functionality in the user-controller.js as a guide

CYCBrian commented 5 months ago

Do I need to also add the Book model instead of just importing the User model?

CYCBrian commented 5 months ago

NVM book is a subdoc of User so it doesn't need to be imported

CYCBrian commented 5 months ago

Have no idea if it will work. Need clarification of parent, arguments, and context.