Commit b93a9734 authored by Savas Vedova's avatar Savas Vedova Committed by Mayra Cabrera

Add confirmedBy field to vulnerability object in GraphQL

- Update documentation
- Update schema
- Add changelog
parent e970bf06
......@@ -25046,6 +25046,11 @@ type Vulnerability implements Noteable {
"""
confirmedAt: Time
"""
The user that confirmed the vulnerability.
"""
confirmedBy: User
"""
Description of the vulnerability
"""
......
......@@ -72961,6 +72961,20 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "confirmedBy",
"description": "The user that confirmed the vulnerability.",
"args": [
],
"type": {
"kind": "OBJECT",
"name": "User",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "description",
"description": "Description of the vulnerability",
......@@ -3776,6 +3776,7 @@ Represents a vulnerability.
| Field | Type | Description |
| ----- | ---- | ----------- |
| `confirmedAt` | Time | Timestamp of when the vulnerability state was changed to confirmed |
| `confirmedBy` | User | The user that confirmed the vulnerability. |
| `description` | String | Description of the vulnerability |
| `detectedAt` | Time! | Timestamp of when the vulnerability was first detected |
| `discussions` | DiscussionConnection! | All discussions on this noteable |
......
......@@ -81,6 +81,13 @@ module Types
field :merge_request, ::Types::MergeRequestType, null: true,
description: 'Merge request that fixes the vulnerability.'
field :confirmed_by, ::Types::UserType, null: true,
description: 'The user that confirmed the vulnerability.'
def confirmed_by
::Gitlab::Graphql::Loaders::BatchModelLoader.new(::User, object.confirmed_by_id).find
end
def user_notes_count
::Gitlab::Graphql::Aggregations::Vulnerabilities::LazyUserNotesCountAggregate.new(context, object)
end
......
---
title: Add confirmedBy field to vulnerability object in GraphQL
merge_request: 50144
author:
type: changed
......@@ -30,8 +30,9 @@ RSpec.describe GitlabSchema.types['Vulnerability'] do
notes
external_issue_links
has_solutions
discussions
merge_request
discussions]
confirmed_by]
end
before do
......
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