fix(query): handle pagination and offset for ordered cascade queries#9734
Draft
tomhollingworth wants to merge 2 commits into
Draft
fix(query): handle pagination and offset for ordered cascade queries#9734tomhollingworth wants to merge 2 commits into
tomhollingworth wants to merge 2 commits into
Conversation
Replace hardcoded result limit of 1000 with a named constant. Implement missing first/offset pagination propagation from cascade directives to the parent query when ordering is applied and resolve an existing TODO comment. Add test cases to prove out solution.
…ips for better test scenarios - Change shuffle-based string sorting data with deterministic pseudo-random integers for numeric sorting - Introduce OrderedCascadeParent and OrderedCascadeChild types to validate order desc with cascading on parent-child edges - Update schema definitions and test cases, removing unused deletion parameters
Author
|
I'm keeping this in draft until I've confirmed the additional test cases run successfully. |
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.
Description
Implement missing first/offset pagination propagation from cascade directives to the parent query when ordering is applied and resolve an existing TODO comment. Effectively allowing
@cascadeand ordered queries to resolve for data sets with more than 1000 entries. The change also replaces hardcoded result limit of 1000 with a named constant.Test cases were also added to prove out solution.
Background
GraphQL queries with
@cascadeand aorder: { .. }only return the first 1000 results. This is due to the query Count being 0 - even iffirst: ....is set to something else, because the first / offset are moved into the query CascadeArgs and the deleted - effectively appearing as 0 and getting overridden to 1000.Checklist
Conventional Commits syntax, leading
with
fix:,feat:,chore:,ci:, etc.