Commit e7b9fe68 authored by Savas Vedova's avatar Savas Vedova

Merge branch '347155-use-graphql-alias-to-simplify-vulnerability-list' into 'master'

Use GraphQL alias to simplify vulnerability list logic

See merge request gitlab-org/gitlab!83250
parents 95c6c218 9c4588f2
......@@ -98,9 +98,8 @@ export default {
update(data) {
const vulnerabilities = this.getVulnerabilitiesFromData(data);
this.pageInfo = vulnerabilities.pageInfo;
// The id property is used for the bulk select feature. Vulnerabilities use 'id' and
// pipeline findings use 'uuid', so we'll normalize it to 'id'.
return vulnerabilities.nodes.map((v) => ({ ...v, id: v.id || v.uuid }));
return vulnerabilities.nodes;
},
error() {
createFlash({
......
......@@ -29,7 +29,9 @@ query pipelineFindings(
state: $state
) {
nodes {
uuid
# This query is used by vulnerability_list_graphql.vue, which expects an id property for
# the bulk select feature.
id: uuid
name
description
falsePositive @include(if: $vetEnabled)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment