Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

closes #442 - return starsGiven inside session resolver, create validation folder #443

Merged
merged 14 commits into from
Dec 20, 2020

Conversation

anthonykhoa
Copy link
Collaborator

@anthonykhoa anthonykhoa commented Dec 14, 2020

Issues

closes #442

The upcoming giveStarCard needs this in order to load a Star already given to <username> modal if a person has already given a star.

This PR will:

  • In the session resolver, update so it also returns starsGiven
  • Create a starsGiven field for UserLesson type in typedefs
  • Update resolvers, typedefs, and index.tsx
  • Create a validateStudentId file inside helpers/validation folder
  • rename setStar file to starsController, and place inside helpers/controllers folder

Questions you may ask

  1. There are other validation files that this PR did not move into the validation folder. Why?

    • This PR is big enough. Another PR should be made to finish moving the validation files into the validation folder. You can see the large number of files that need to be changed in the image below

      Screen Shot 2020-12-13 at 9 12 54 PM
  2. The validateStudentId function is only being used in the starsController file and nowhere else, so why make a separate file to export this function?

    • We plan on making the website more interactive for students. Therefore I think it is inevitable that another resolver will be made that requires a student to be logged in

… resolver, create validateStudentId, create validation folder
@vercel
Copy link

vercel bot commented Dec 14, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/c0d3/c0d3-app/mc5tar27j
✅ Preview: https://c0d3-app-git-starsgiven.c0d3.now.sh

@codecov
Copy link

codecov bot commented Dec 14, 2020

Codecov Report

Merging #443 (fa1c6db) into master (5fdb7aa) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #443   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           87        88    +1     
  Lines         1184      1193    +9     
  Branches       254       255    +1     
=========================================
+ Hits          1184      1193    +9     
Impacted Files Coverage Δ
graphql/queryResolvers/session.ts 100.00% <100.00%> (ø)
helpers/controllers/starsController.ts 100.00% <100.00%> (ø)
helpers/validation/validateStudentId.ts 100.00% <100.00%> (ø)

@anthonykhoa anthonykhoa changed the title closes #442, updates #441 - create starsGiven resolver, create validation folder closes #442 - create starsGiven resolver, create validation folder Dec 14, 2020
@anthonykhoa anthonykhoa changed the title closes #442 - create starsGiven resolver, create validation folder closes #442 - create giveLessonStar resolver, create validation folder Dec 14, 2020
@anthonykhoa anthonykhoa changed the title closes #442 - create giveLessonStar resolver, create validation folder [DNM]closes #442 - create giveLessonStar resolver, create validation folder Dec 14, 2020
@anthonykhoa anthonykhoa changed the title [DNM]closes #442 - create giveLessonStar resolver, create validation folder closes #442 - create giveLessonStar resolver, create validation folder Dec 18, 2020
@anthonykhoa anthonykhoa changed the title closes #442 - create giveLessonStar resolver, create validation folder closes #442 - create starsGiven field inside UserLesson type in typedefs, create validation folder Dec 18, 2020
@anthonykhoa anthonykhoa changed the title closes #442 - create starsGiven field inside UserLesson type in typedefs, create validation folder closes #442 - return starsGiven inside session resolver, create validation folder Dec 18, 2020
@anthonykhoa anthonykhoa merged commit 6d96268 into garageScript:master Dec 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

starsGiven resolver
3 participants