Giter Site home page Giter Site logo

find-my-book's Introduction

www.markgiannelli.com

Hi there, my name is Mark Giannelli!
Here's a little 🍵 about me 😄

Accountant turned developer May 2, 2021! This is my absolute passion in life
and I can't wait to earn the opportunity to turn it into a career! ❤️‍🔥

Skills

JavaScript React       GraphQL             SQL
Python      Django     Apollo                 MongoDB
HTML        Express React Router       JWT
CSS          Node     Sequelize            Stripe API
SASS        Bootstrap  Handlebars.js      React Context API
TypeScript jQuery      Express Sessions Redux

Contact Me

Email: [email protected]
Phone: 203-645-8595
LinkedIn

find-my-book's People

Contributors

mjgiannelli avatar

Watchers

 avatar

find-my-book's Issues

SavedBooks.js

Remove the useEffect() Hook that sets the state for UserData.

Instead, use the useQuery() Hook to execute the GET_ME query on load and save it to a variable named userData.

Use the useMutation() Hook to execute the REMOVE_BOOK mutation in the handleDeleteBook() function instead of the deleteBook() function that's imported from API file. (Make sure you keep the removeBookId() function in place!)

Schemas directory

index.js: Export your typeDefs and resolvers.

resolvers.js: Define the query and mutation functionality to work with the Mongoose models.

typeDefs.js: Define the necessary Query and Mutation types:

Query type:

me: Which returns a User type.
Mutation type:

login: Accepts an email and password as parameters; returns an Auth type.

addUser: Accepts a username, email, and password as parameters; returns an Auth type.

saveBook: Accepts a book author's array, description, title, bookId, image, and link as parameters; returns a User type. (Look into creating what's known as an input type to handle all of these parameters!)

removeBook: Accepts a book's bookId as a parameter; returns a User type.

User type:

_id

username

email

bookCount

savedBooks (This will be an array of the Book type.)

Book type:

bookId (Not the _id, but the book's id value returned from Google's Book API.)

authors (An array of strings, as there may be more than one author.)

description

title

image

link

Auth type:

token

user (References the User type.)

SignupForm.js

Replace the addUser() functionality imported from the API file with the ADD_USER mutation functionality.

queries.js

This will hold the query GET_ME, which will execute the me query set up using Apollo Server.

SearchBooks.js

Use the Apollo useMutation() Hook to execute the SAVE_BOOK mutation in the handleSaveBook() function instead of the saveBook() function imported from the API file.

Make sure you keep the logic for saving the book's ID to state in the try...catch block!

mutations.js

LOGIN_USER will execute the loginUser mutation set up using Apollo Server.

ADD_USER will execute the addUser mutation.

SAVE_BOOK will execute the saveBook mutation.

REMOVE_BOOK will execute the removeBook mutation.

LoginForm.js

Replace the loginUser() functionality imported from the API file with the LOGIN_USER mutation functionality.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.