Limit exposed relationships type-wise to 100 elements #1023
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.
Your checklist for this pull request
What is the current behaviour?
This PR addresses the same problem as #881 and #1008.
What is the new behaviour?
If there are more relationships than 100 within a specific type, only the latest 100 are shown via API. Limiting must be done typewise because MWDB UI divides relationships into object types:
So there is a possibililty that with 100+ parent samples, blob relationship won't be shown which is surprising and incorrect behavior.
If there is 100 or more relationships within a specific type, MWDB shows additional link to query that allows to search for all related objects of that type.
Usually the relationships within type are in specific direction, that's why MWDB UI tries to deduce whether "parent query" or "child query" should be shown.