Make vulnerabilitiesCountsQuery injection optional in selection_summary
Problem
When the feature flag pipeline_security_dashboard_graphql
is enabled, the following vue error exists on the pipeline security tab:
[Vue warn]: Injection "vulnerabilitiesCountsQuery" not found
Context
The selection_summary.vue
component, which is a container for the bulk state changes, uses this injected query as a refetch after bulk actions. This refetch allows the vulnerability count tiles (vulnerability_counts.vue
) to be updated. However, on the pipeline security tab, we don't render the vulnerability_counts.vue
so we don't need to do this refetch.
Solution
- We can make the injection optional and provide a default with using the inject object format: https://v2.vuejs.org/v2/api/#provide-inject
- if no
vulnerabilitiesCountsQuery
, do not refetch that query - modify specs
Edited by Lorenz van Herwaarden