Add filtering by component name
Why are we doing this work
Similar to this issue, we need the ability to filter by component name.
Relevant links
Non-functional requirements
-
Documentation: -
Feature flag: -
Performance: -
Testing:
Implementation plan
- Update
Sbom::DependenciesFinderto filter by component name. - Although group level feature is still not based on the graphql query, consider updating
Resolvers::Sbom::DependenciesResolveraccept component name as a filter.
Verification steps
- Go to graphql-explorer
- Perform queries while filtering for different component names, like the following:
query {
project(fullPath:"gitlab-org/gitlab"){
dependencies(componentNames:["dragselect", "actioncable"]){
nodes{
name
version
packager
}
}
}
}
Expected response:
{
"data": {
"project": {
"dependencies": {
"nodes": [
{
"name": "dragselect",
"version": "1.3.6",
"packager": null
},
{
"name": "actioncable",
"version": "6.1.7.2",
"packager": "BUNDLER"
}
]
}
}
}
}
Edited by Zamir Martins