Project-Books / books-api

GraphQL Books API
https://project-books.github.io/#books-api
MIT License
36 stars 59 forks source link

Add literary awards entity 15 #142

Closed hpa16 closed 2 years ago

hpa16 commented 2 years ago

Summary of change

Added awards entity with awardName as an enum. Added a query to get all books that have won a certain award Added mutations to add or delete awards DB migration: Added 2 books through INSERT_BOOK_AWARDS.sql to showcase the books-awards link

Related issue

Closes #15

Pull request checklist

Please keep this checklist in & ensure you have done the following:

For any checkbox that does not apply, still check it.

If in doubt, get in touch with us via our Slack workspace or by creating a new Q&A discussion on GitHub

knjk04 commented 2 years ago

@hpa16 Thanks a lot for working on adding awards! I'm still reviewing this, but so far so good! I've made one small change where I added a missing assertion

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 22 Code Smells

92.3% 92.3% Coverage
0.0% 0.0% Duplication

knjk04 commented 2 years ago

@hpa16 How are you getting on with the changes requested?

hpa16 commented 2 years ago

@knjk04 Apologies, I was not able to work on this yet but can do it this week.

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 22 Code Smells

92.3% 92.3% Coverage
0.0% 0.0% Duplication

knjk04 commented 2 years ago

@hpa16 How are you getting on with this? Let us know if you need a hand

knjk04 commented 2 years ago

@hpa16 Closing due to no reply

hpa16 commented 2 years ago

Hi @knjk04, do you mean the year a book wins an award should be stored in the book_award table which connects the two entities? If so, I think it can be a separated out from the scope of this PR.

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 22 Code Smells

92.3% 92.3% Coverage
0.0% 0.0% Duplication

knjk04 commented 2 years ago

Hi @hpa16, I was thinking that we should store when a particular book won a particular award and the year that it won the award. However, I'm happy to separate that out and merge this in. Thanks for your help with this!

hpa16 commented 2 years ago

Thanks @knjk04 for your guidance!