Commit 9528d470 authored by Savas Vedova's avatar Savas Vedova

Add dismissedBy field to vulnerability object in GraphQL

- Update documentation
- Update schema
- Add changelog
parent 12f8692c
......@@ -25747,6 +25747,11 @@ type Vulnerability implements Noteable {
"""
dismissedAt: Time
"""
The user that dismissed the vulnerability
"""
dismissedBy: User
"""
List of external issue links related to the vulnerability
"""
......
......@@ -74716,6 +74716,20 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "dismissedBy",
"description": "The user that dismissed the vulnerability",
"args": [
],
"type": {
"kind": "OBJECT",
"name": "User",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "externalIssueLinks",
"description": "List of external issue links related to the vulnerability",
......@@ -3818,6 +3818,7 @@ Represents a vulnerability.
| `detectedAt` | Time! | Timestamp of when the vulnerability was first detected |
| `discussions` | DiscussionConnection! | All discussions on this noteable |
| `dismissedAt` | Time | Timestamp of when the vulnerability state was changed to dismissed |
| `dismissedBy` | User | The user that dismissed the vulnerability |
| `externalIssueLinks` | VulnerabilityExternalIssueLinkConnection! | List of external issue links related to the vulnerability |
| `hasSolutions` | Boolean | Indicates whether there is a solution available for this vulnerability. |
| `id` | ID! | GraphQL ID of the vulnerability |
......
......@@ -87,6 +87,9 @@ module Types
field :resolved_by, ::Types::UserType, null: true,
description: 'The user that resolved the vulnerability.'
field :dismissed_by, ::Types::UserType, null: true,
description: 'The user that dismissed the vulnerability.'
def confirmed_by
::Gitlab::Graphql::Loaders::BatchModelLoader.new(::User, object.confirmed_by_id).find
end
......@@ -95,6 +98,10 @@ module Types
::Gitlab::Graphql::Loaders::BatchModelLoader.new(::User, object.resolved_by_id).find
end
def dismissed_by
::Gitlab::Graphql::Loaders::BatchModelLoader.new(::User, object.dismissed_by_id).find
end
def user_notes_count
::Gitlab::Graphql::Aggregations::Vulnerabilities::LazyUserNotesCountAggregate.new(context, object)
end
......
---
title: Add dismissedBy field to vulnerability object in GraphQL
merge_request: 50285
author:
type: changed
......@@ -33,7 +33,8 @@ RSpec.describe GitlabSchema.types['Vulnerability'] do
merge_request
discussions
confirmed_by
resolved_by]
resolved_by
dismissed_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