-
Notifications
You must be signed in to change notification settings - Fork 5
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
Introduce filtering, ordering and pagination to graphql api #308
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #308 +/- ##
==========================================
- Coverage 90.29% 89.92% -0.37%
==========================================
Files 62 66 +4
Lines 4524 4945 +421
==========================================
+ Hits 4085 4447 +362
- Misses 439 498 +59
... and 5 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
b9991a1
to
47b25a0
Compare
bce2b07
to
65f5625
Compare
Finally ready for review @adzialocha !! @cafca wanted to ping you too as thought you might be interested to see this PR ;-p |
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.
🤩✨
|
||
// Pass them up to the children query fields. | ||
Ok(Some(FieldValue::owned_any(args))) | ||
// Get the whole document from the store. |
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.
Awesome, this means we only do one database request now and populate the data to the children? That's great!
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.
Yes, pretty much! In the case of collection queries, it's actually one db query per paginated query though. So for relation lists, a new query will be made.
This PR introduces the ability to pass arguments for filtering, ordering and paginating collection queries and parses these arguments into our own types with validation.
draft api ideas:
https://laub.liebechaos.org/ZDW0yABySHSkc2aeG_ctWQ?view
https://laub.liebechaos.org/fplolxRFSvumhEzgdYSxiQ
all_x
queriesaccept these arguments in single document query(i don't think we want this)all_x
queriesASC
&DESC
orderBy
optionsall_x
queriesQuery a collection with pagination, ordering and filtering:
Query a relation list on a document with pagination, ordering and filtering:
NEXT:
📋 Checklist
CHANGELOG.md