Open
Conversation
…ublished'. The parameter has been added to the existing route to maintain the simplicity and usability of the API. Tests with Minitest have been kept, but RSpec might suit as a future improvement.
…ated courses. This change involved defining GraphQL types, implementing resolver methods, and creating a query type to efficiently fetch collections and their courses in a single request, optimizing data retrieval. This approach was chosen for its flexibility and ability to prevent over-fetching or under-fetching of data while simplifying associated record fetching.
…'s association with a specific collection, fulfilling the API consumer's requirement. Opted for a RESTful approach to uphold API simplicity. Additionally, retained tests with Minitest, while considering a transition to RSpec for future enhancements, and explored documentation options like Swagger, for instance.
…h collection. As a future improvement, we could link the discounts to courses and choose the largest discount among its courses in the collection.
… The mutation, publishCourse, takes the courseId as input and updates the course's published status. Additionally, retained tests with Minitest, while considering a transition to RSpec for future enhancements.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Retrieve all courses:
http://localhost:3008/coursesRetrieve unpublished courses:
http://localhost:3008/coursespublished=falseRetrieve published courses:
http://localhost:3008/coursespublished=truecollection_idandcourse_idin the headers:http://localhost:3008/collections/:collection_id/courses/:course_id/belongs_tohttp://localhost:3008/graphqlhttp://localhost:3008/graphql