-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: courses & instructor cursor based pagination #101
Merged
Conversation
This file contains 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
…ies with nextCursor
…rsesCursor API route
…ltering options, reverted skip/take query schema
…ute for cursor-based pagination
…schema for cursor-based pagination
…tion of instructors
…structors services
I get a 500 on GraphQL introspection. Can you confirm? |
…ructorsByCursorQuery
Somehow forgot to commit this fix, should be good now. |
laggycomputer
requested changes
Jan 31, 2025
laggycomputer
requested changes
Jan 31, 2025
laggycomputer
requested changes
Jan 31, 2025
… enum messages and added cursor descriptions
…unctions for consistency
laggycomputer
requested changes
Feb 1, 2025
laggycomputer
requested changes
Feb 2, 2025
laggycomputer
approved these changes
Feb 2, 2025
There's also |
andrew-wang0
approved these changes
Feb 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
This was referenced Feb 3, 2025
ecxyzzy
pushed a commit
that referenced
this pull request
Feb 3, 2025
## Description Fix the issue described below, introduced in #101. ## Related Issue Fix #107. ## Motivation and Context we can just debug things ## How Has This Been Tested? Tested on local deployment ## Screenshots (if appropriate): ![image](https://github.com/user-attachments/assets/15396274-8013-4fd2-aeb5-e2a63b269474) ![Screenshot_20250202_214836](https://github.com/user-attachments/assets/c84820aa-5889-416d-9b5d-6699d5394276) ## Types of changes - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Checklist: - [ ] My code involves a change to the database schema. - [ ] My code requires a change to the documentation.
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.
Description
Added cursor-based pagination using unique identifiers (
id
for courses anducinetid
for instructors) as an more efficient alternative to skip-take pagination. Includes new/coursesCursor
and/instructorsCursor
routes withcursor
andtake
parameters, which returns paginated results with anextCursor
field.Related Issue
Completes #19.
Motivation and Context
Skip-and-take pagination can become less efficient for queries where the desired items are later in the set. Cursor-based pagination helps ensure consistent query performance, especially for larger datasets.
How Has This Been Tested?
Tested changes locally on API docs and Yoga GraphiQL.
Screenshots (if appropriate):
Types of changes
Checklist: