-
-
Notifications
You must be signed in to change notification settings - Fork 132
Add support for "true" cursor based pagination in connections #730
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
Open
diesieben07
wants to merge
38
commits into
strawberry-graphql:main
Choose a base branch
from
diesieben07:cursor-based-connection
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,031
−20
Open
Changes from 22 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
5f57eb6
prototyping with cursor based connections
diesieben07 cea6194
Working on cursor style pagination for Django
diesieben07 86e2262
Working on cursor style pagination for Django
diesieben07 ed2abab
Working on cursor style pagination for Django
diesieben07 f5a54de
Implement forward and backward cursor pagination
diesieben07 5e5fee3
Implement better order_by extraction and tuple comparison
diesieben07 3d4cdb4
Implement better order_by extraction and tuple comparison
diesieben07 d90a9ee
Implement hasPeviousPage and hasNextPage
diesieben07 c018206
Formatting
diesieben07 5b0e8fc
More robust field value extraction
diesieben07 4ea320b
Handle dynamic output fields in field extraction
diesieben07 7321244
Optimize ordering by a field in the base table
diesieben07 d8ef9b2
Add cursor connection tests
diesieben07 2885f05
Add more cursor connection tests
diesieben07 b307c9d
Fix typing issues
diesieben07 61e9a97
Fix relay cursor pagination in async context
diesieben07 b78b6fc
Fix get_queryset_config and add tests for it
diesieben07 1611301
Remove debug code
diesieben07 074b2b4
Add test for cursor connection with custom resolver
diesieben07 cfa740f
Add documentation for DjangoCursorConnection
diesieben07 7bed380
Fix typo in docs
diesieben07 ab3a7e4
Documentation rewording
diesieben07 7237d01
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] e4fae12
Fix schema test
diesieben07 2692f3e
Merge remote-tracking branch 'origin/cursor-based-connection' into cu…
diesieben07 b009e65
Revert unnecessary schema change
diesieben07 bb317b7
Fix cursor connection for null values and add tests for NULLS LAST / …
diesieben07 50d7f35
Add tests for invalid cursors
diesieben07 2d8541c
Remove unused extract_cursor_values method
diesieben07 4f3213f
Add total_count to DjangoCursorConnection
diesieben07 c9bc3e3
Add tests for more error conditions
diesieben07 3ed07d9
Add tests for deferred fields in queryset when using cursor connection
diesieben07 39dcdd6
Implement proper pagination when using first and last together
diesieben07 b57dfae
Use a dataclass for OrderingDescriptor and OrderedCollectionCursor
diesieben07 866589f
Add test for empty results
diesieben07 4d91e00
Merge branch 'main' into cursor-based-connection
diesieben07 0304ce5
Update DjangoCursorEdge to use custom connection support in base stra…
diesieben07 f3a9136
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
suggestion: Clarify the meaning of "true cursors". Suggest using "offset-based cursors" vs "range-based cursors" to distinguish the approaches.
The term "true cursors" might be confusing to users. Using more descriptive terms like "offset-based cursors" and "range-based cursors" would improve clarity.
Suggested implementation: