-
Notifications
You must be signed in to change notification settings - Fork 55
feat: add optional argument for plural attributes #138
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #138 +/- ##
============================================
- Coverage 68.27% 68.23% -0.05%
- Complexity 432 437 +5
============================================
Files 33 33
Lines 2219 2238 +19
Branches 330 331 +1
============================================
+ Hits 1515 1527 +12
- Misses 571 576 +5
- Partials 133 135 +2
Continue to review full report at Codecov.
|
@molexx ^^^^^ I understand why you need left outer joins, so I added optional argument for plural attributes. May be default optional should be configurable via Builder Api? |
Aha, this is great, thanks! Yes works ok. Allowing the optionals by default is good for me, I haven't had to add it in the query or make an API call. Adding to the builder would keep consistency with 'distinct'. |
This PR adds support for default
optional: true
argument for collections in the query selection graph, i.e.With
optional: true
, the data fetcher will apply LEFT OUTER JOIN on books and return empty books collections:Use
optional: false
to enforce INNER JOIN, so thatWill return entity graph with only existing associations:
You can also configure default join fetch optional argument value via Api.