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
fix(graphql): filter out orphaned relationships #7363
Conversation
Signed-off-by: Adam Lee <admosity@users.noreply.github.com>
Codecov Report
@@ Coverage Diff @@
## master #7363 +/- ##
==========================================
+ Coverage 26.17% 26.22% +0.05%
==========================================
Files 1130 1131 +1
Lines 15415 15433 +18
Branches 2439 2443 +4
==========================================
+ Hits 4035 4048 +13
- Misses 9561 9565 +4
- Partials 1819 1820 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
LGTM, thanks !
Signed-off-by: Adam Lee <admosity@users.noreply.github.com>
Signed-off-by: Adam Lee <admosity@users.noreply.github.com> Signed-off-by: Gil Fernandes <gil.fernandes@onepointltd.com>
Description of what you did:
We have entities that reference another entity that could be deleted. For performance reasons, any entity that is orphaned is cleaned at a later time, but this is breaking our graphql aggregation queries. This PR adds a simple existence filter on the
_id
field that exists when null as well. Maybe it might also be beneficial to allow grouping by null to check orphaned relationships?Output from a log above converting the result to an array:
Output from the graphql query: