In this activity, the user was given a functioning React application using REST API to be refactored to using Apollo GraphQL.
- Update server.js to implement Apollo Server.
- Update auth.js middleware to work with GraphQL API.
- Create typeDefs by referencing models. Specifically, create a query that returns me, a User type.
- Create resolvers by referencing controllers.
- Export typeDefs and resolvers using index.js in the same folder.
- Create a query for 'me' and mutations for respective API methods.
- Update App.js to use Apollo Provider.
- Update Searchbooks.js, SavedBooks.js, SignupForm.js, and LoginForm.js to use mutations.
npm i
npm run develop
to start the server.- Signup.
- Search for a topic or a specific book.
- Click a "Save" button to save book.
- View saved books by clicking on the "See Your Books" link.
- Remove saved books by clicking on the corresponding delete button.
- Mongoose
- Express
- React
- Node.js
- Bootstrap