diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md index 4fdc2b46286360825d30a03ea46edcfd8495c09e..778eaaf5f5e988b70a12b6d57fd72d8b2e07fd7c 100644 --- a/doc/api/graphql/reference/index.md +++ b/doc/api/graphql/reference/index.md @@ -30115,7 +30115,6 @@ Represents a vulnerability. | <a id="vulnerabilityexternalissuelinks"></a>`externalIssueLinks` | [`VulnerabilityExternalIssueLinkConnection!`](#vulnerabilityexternalissuelinkconnection) | List of external issue links related to the vulnerability. (see [Connections](#connections)) | | <a id="vulnerabilityfalsepositive"></a>`falsePositive` | [`Boolean`](#boolean) | Indicates whether the vulnerability is a false positive. | | <a id="vulnerabilityhasremediations"></a>`hasRemediations` | [`Boolean`](#boolean) | Indicates whether there is a remediation available for this vulnerability. | -| <a id="vulnerabilityhassolutions"></a>`hasSolutions` **{warning-solid}** | [`Boolean`](#boolean) | **Deprecated** in GitLab 16.3. Use `hasRemediations`. | | <a id="vulnerabilityid"></a>`id` | [`ID!`](#id) | GraphQL ID of the vulnerability. | | <a id="vulnerabilityidentifiers"></a>`identifiers` | [`[VulnerabilityIdentifier!]!`](#vulnerabilityidentifier) | Identifiers of the vulnerability. | | <a id="vulnerabilitylinks"></a>`links` | [`[VulnerabilityLink!]!`](#vulnerabilitylink) | List of links associated with the vulnerability. | diff --git a/ee/app/graphql/resolvers/vulnerabilities_resolver.rb b/ee/app/graphql/resolvers/vulnerabilities_resolver.rb index c45341c0e50100ad258c22f148a559412b708a2d..ec3ef60fa25badfc66c6c806856050bc10965324 100644 --- a/ee/app/graphql/resolvers/vulnerabilities_resolver.rb +++ b/ee/app/graphql/resolvers/vulnerabilities_resolver.rb @@ -95,7 +95,6 @@ def unconditional_includes def preloads { has_remediations: { vulnerability: { findings: :remediations } }, - has_solutions: { vulnerability: { findings: :remediations } }, merge_request: { vulnerability: :merge_requests }, state_comment: { vulnerability: :state_transitions }, state_transitions: { vulnerability: :state_transitions }, diff --git a/ee/app/graphql/types/vulnerability_type.rb b/ee/app/graphql/types/vulnerability_type.rb index 750198c979939f258a9f8e722c2605f5c2884e79..22fe1f960ea30d45b67f55117766c81a1d0af7f8 100644 --- a/ee/app/graphql/types/vulnerability_type.rb +++ b/ee/app/graphql/types/vulnerability_type.rb @@ -98,11 +98,6 @@ class VulnerabilityType < BaseObject method: :has_remediations?, description: 'Indicates whether there is a remediation available for this vulnerability.' - field :has_solutions, GraphQL::Types::Boolean, - deprecated: { reason: 'Use `hasRemediations`', milestone: '16.3' }, - null: true, resolver_method: :has_solutions?, - description: 'Indicates whether there is a solution available for this vulnerability.' - field :state_comment, GraphQL::Types::String, null: true, description: 'Comment given for the vulnerability state change.' @@ -209,10 +204,6 @@ def merge_request object.merge_requests.first end - def has_solutions? - object.finding&.remediations&.any? - end - def false_positive? return unless expose_false_positive? diff --git a/ee/spec/graphql/types/vulnerability_type_spec.rb b/ee/spec/graphql/types/vulnerability_type_spec.rb index b44e5cae0e8bcd5bc262d02138250591b9a5234c..8584762a2764394d0df96f3773c7483b6936127f 100644 --- a/ee/spec/graphql/types/vulnerability_type_spec.rb +++ b/ee/spec/graphql/types/vulnerability_type_spec.rb @@ -53,7 +53,6 @@ external_issue_links links has_remediations - has_solutions false_positive state_comment merge_request @@ -144,18 +143,6 @@ end end - describe 'has_solutions' do - let(:query_field) { 'hasSolutions' } - - context 'N+1 queries' do - single_query_count = 9 - number_of_vulnerabilities = 3 - multiple_queries_count = single_query_count + (number_of_vulnerabilities * 3) - - it_behaves_like "N+1 queries", single_query_count, multiple_queries_count - end - end - describe 'false_positive' do let_it_be(:vulnerability_with_finding) { create(:vulnerability, :with_findings, project: project) } let(:query_field) { 'falsePositive' }