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 #438, #439 - return name in getLessonMentors resolver, create validateLessonId function #440

Merged
merged 2 commits into from
Dec 13, 2020

Conversation

anthonykhoa
Copy link
Collaborator

@anthonykhoa anthonykhoa commented Dec 12, 2020

Issues

#438
In our designs, the list of lesson mentors has both the mentor's username and name. Currently the getLessonMentors resolver only returns a mentor's username, and so it needs to be updated to also return the mentor's name.

#439
The lessonExists function is only being used to see if an error message should be thrown or not. Since this logic of check if lesson exists -> throw error is repetitive in the codebase, a function should handle this logic.

This PR will:

  • Update getLessonMentors to also return a mentor's name
  • Delete lessonExists and create validateLessonId function
  • Refactor where necessary in codebase to use validateLessonId instead of lessonExists function

…entors resolver, refactor to reduce codebase size(creation of validateLessonId function)
@vercel
Copy link

vercel bot commented Dec 12, 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/eelzjpn6z
✅ Preview: https://c0d3-app-git-validatelesson.c0d3.vercel.app

@codecov
Copy link

codecov bot commented Dec 12, 2020

Codecov Report

Merging #440 (788edbe) into master (d677cdc) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #440   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           86        86           
  Lines         1137      1139    +2     
  Branches       251       250    -1     
=========================================
+ Hits          1137      1139    +2     
Impacted Files Coverage Δ
graphql/queryResolvers/getLessonMentors.ts 100.00% <100.00%> (ø)
helpers/controllers/challengesController.ts 100.00% <100.00%> (ø)
helpers/controllers/lessonsController.ts 100.00% <100.00%> (ø)
helpers/validateLessonId.ts 100.00% <100.00%> (ø)

@ggwadera ggwadera merged commit 2cb1f0e into garageScript:master Dec 13, 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.

None yet

3 participants