Add vulnerabilitiesCountByDay to instanceSecurityDashboard query
Why are we doing this work
We should not have a top-level vulnerabilitiesCountByDay call, as vulnerabilities belong to projects, and are accessible via a project, group, or instance level dashboard.
We need to move the top-level vulnerabilitiesCountByDay
GraphQL query into the instanceLevelDashboard
query, similar to the behavior of groups
and projects
calls to vulnerabilitiesCountByDay
. This would add a logical query to the instanceLevelDashboard
. Much of the logic can be copied from the vulnerabilities
call.
This issue is specifically to create the new instanceLevelDashboard.vulnerabilitiesCountByDay
field. Deprecation of the top-level vulnerabilitiesCountByDay
call will be handled in #343477 (closed).
Relevant links
Non-functional requirements
-
Documentation: Update GraphQL documentation -
Testing: Add tests for new field
Implementation plan
-
backend Create new vulnerabilitiesCountByDay
field forinstanceLevelDashboard
. Should still be able to use existing resolver.- Create new file similar to project_vulnerabilities_by_day_and_count.query.graphql:
instance_vulnerabilities_by_day_and_count.query.graphql
- Use the
instance
values similar to vulnerability_severities_count.query.graphql
- Create new file similar to project_vulnerabilities_by_day_and_count.query.graphql:
-
backend Update tests
Edited by Jonathan Schafer