Commit 3e6ae729 authored by David Fernandez's avatar David Fernandez

Merge branch '292426-fix-graphql-descriptions-rubocop-offenses-8' into 'master'

Fix Graphql/Descriptions EE types offenses

See merge request gitlab-org/gitlab!53926
parents a5d9320d b63a4745
......@@ -691,47 +691,6 @@ RSpec/TimecopTravel:
- 'spec/workers/concerns/reenqueuer_spec.rb'
- 'spec/lib/gitlab/analytics/cycle_analytics/median_spec.rb'
Graphql/Descriptions:
Exclude:
- 'ee/app/graphql/types/epic_tree/epic_tree_node_input_type.rb'
- 'ee/app/graphql/types/external_issue_type.rb'
- 'ee/app/graphql/types/geo/geo_node_type.rb'
- 'ee/app/graphql/types/geo/merge_request_diff_registry_type.rb'
- 'ee/app/graphql/types/geo/package_file_registry_type.rb'
- 'ee/app/graphql/types/geo/snippet_repository_registry_type.rb'
- 'ee/app/graphql/types/geo/terraform_state_version_registry_type.rb'
- 'ee/app/graphql/types/group_stats_type.rb'
- 'ee/app/graphql/types/incident_management/oncall_schedule_type.rb'
- 'ee/app/graphql/types/instance_security_dashboard_type.rb'
- 'ee/app/graphql/types/iteration_type.rb'
- 'ee/app/graphql/types/metric_image_type.rb'
- 'ee/app/graphql/types/requirements_management/requirement_states_count_type.rb'
- 'ee/app/graphql/types/requirements_management/requirement_type.rb'
- 'ee/app/graphql/types/requirements_management/test_report_type.rb'
- 'ee/app/graphql/types/scanned_resource_type.rb'
- 'ee/app/graphql/types/security_report_summary_section_type.rb'
- 'ee/app/graphql/types/time_report_stats_type.rb'
- 'ee/app/graphql/types/timebox_metrics_type.rb'
- 'ee/app/graphql/types/timebox_report_interface.rb'
- 'ee/app/graphql/types/timebox_report_type.rb'
- 'ee/app/graphql/types/timelog_type.rb'
- 'ee/app/graphql/types/vulnerabilities_count_by_day_and_severity_type.rb'
- 'ee/app/graphql/types/vulnerabilities_count_by_day_type.rb'
- 'ee/app/graphql/types/vulnerability/external_issue_link_type.rb'
- 'ee/app/graphql/types/vulnerability/issue_link_type.rb'
- 'ee/app/graphql/types/vulnerability_identifier_type.rb'
- 'ee/app/graphql/types/vulnerability_location/container_scanning_type.rb'
- 'ee/app/graphql/types/vulnerability_location/coverage_fuzzing_type.rb'
- 'ee/app/graphql/types/vulnerability_location/dast_type.rb'
- 'ee/app/graphql/types/vulnerability_location/dependency_scanning_type.rb'
- 'ee/app/graphql/types/vulnerability_location/sast_type.rb'
- 'ee/app/graphql/types/vulnerability_location/secret_detection_type.rb'
- 'ee/app/graphql/types/vulnerability_scanner_type.rb'
- 'ee/app/graphql/types/vulnerability_type.rb'
- 'ee/app/graphql/types/vulnerable_dependency_type.rb'
- 'ee/app/graphql/types/vulnerable_package_type.rb'
- 'ee/app/graphql/types/vulnerable_projects_by_grade_type.rb'
# WIP: https://gitlab.com/gitlab-org/gitlab/-/issues/34997
RSpec/AnyInstanceOf:
Exclude:
......
This diff is collapsed.
......@@ -10,22 +10,22 @@ module Types
argument :id,
::Types::GlobalIDType[::EpicTreeSorting],
required: true,
description: 'The ID of the epic_issue or epic that is being moved'
description: 'The ID of the epic_issue or epic that is being moved.'
argument :adjacent_reference_id,
::Types::GlobalIDType[::EpicTreeSorting],
required: false,
description: 'The ID of the epic_issue or issue that the actual epic or issue is switched with'
description: 'The ID of the epic_issue or issue that the actual epic or issue is switched with.'
argument :relative_position,
MoveTypeEnum,
required: false,
description: 'The type of the switch, after or before allowed'
description: 'The type of the switch, after or before allowed.'
argument :new_parent_id,
::Types::GlobalIDType[::Epic],
required: false,
description: 'ID of the new parent epic'
description: 'ID of the new parent epic.'
end
# rubocop: enable Graphql/AuthorizeTypes
end
......
......@@ -7,25 +7,25 @@ module Types
description 'Represents an external issue'
field :title, GraphQL::STRING_TYPE, null: true,
description: 'Title of the issue in the external tracker'
description: 'Title of the issue in the external tracker.'
field :relative_reference, GraphQL::STRING_TYPE, null: true,
description: 'Relative reference of the issue in the external tracker'
description: 'Relative reference of the issue in the external tracker.'
field :status, GraphQL::STRING_TYPE, null: true,
description: 'Status of the issue in the external tracker'
description: 'Status of the issue in the external tracker.'
field :external_tracker, GraphQL::STRING_TYPE, null: true,
description: 'Type of external tracker'
description: 'Type of external tracker.'
field :web_url, GraphQL::STRING_TYPE, null: true,
description: 'URL to the issue in the external tracker'
description: 'URL to the issue in the external tracker.'
field :created_at, Types::TimeType, null: true,
description: 'Timestamp of when the issue was created'
description: 'Timestamp of when the issue was created.'
field :updated_at, Types::TimeType, null: true,
description: 'Timestamp of when the issue was updated'
description: 'Timestamp of when the issue was updated.'
def relative_reference
object.dig(:references, :relative)
......
......@@ -7,37 +7,37 @@ module Types
authorize :read_geo_node
field :id, GraphQL::ID_TYPE, null: false, description: 'ID of this GeoNode'
field :primary, GraphQL::BOOLEAN_TYPE, null: true, description: 'Indicates whether this Geo node is the primary'
field :enabled, GraphQL::BOOLEAN_TYPE, null: true, description: 'Indicates whether this Geo node is enabled'
field :name, GraphQL::STRING_TYPE, null: true, description: 'The unique identifier for this Geo node'
field :url, GraphQL::STRING_TYPE, null: true, description: 'The user-facing URL for this Geo node'
field :internal_url, GraphQL::STRING_TYPE, null: true, description: 'The URL defined on the primary node that secondary nodes should use to contact it'
field :files_max_capacity, GraphQL::INT_TYPE, null: true, description: 'The maximum concurrency of LFS/attachment backfill for this secondary node'
field :repos_max_capacity, GraphQL::INT_TYPE, null: true, description: 'The maximum concurrency of repository backfill for this secondary node'
field :verification_max_capacity, GraphQL::INT_TYPE, null: true, description: 'The maximum concurrency of repository verification for this secondary node'
field :container_repositories_max_capacity, GraphQL::INT_TYPE, null: true, description: 'The maximum concurrency of container repository sync for this secondary node'
field :sync_object_storage, GraphQL::BOOLEAN_TYPE, null: true, description: 'Indicates if this secondary node will replicate blobs in Object Storage'
field :selective_sync_type, GraphQL::STRING_TYPE, null: true, description: 'Indicates if syncing is limited to only specific groups, or shards'
field :selective_sync_shards, type: [GraphQL::STRING_TYPE], null: true, description: 'The repository storages whose projects should be synced, if `selective_sync_type` == `shards`'
field :selective_sync_namespaces, ::Types::NamespaceType.connection_type, null: true, method: :namespaces, description: 'The namespaces that should be synced, if `selective_sync_type` == `namespaces`'
field :minimum_reverification_interval, GraphQL::INT_TYPE, null: true, description: 'The interval (in days) in which the repository verification is valid. Once expired, it will be reverified'
field :id, GraphQL::ID_TYPE, null: false, description: 'ID of this GeoNode.'
field :primary, GraphQL::BOOLEAN_TYPE, null: true, description: 'Indicates whether this Geo node is the primary.'
field :enabled, GraphQL::BOOLEAN_TYPE, null: true, description: 'Indicates whether this Geo node is enabled.'
field :name, GraphQL::STRING_TYPE, null: true, description: 'The unique identifier for this Geo node.'
field :url, GraphQL::STRING_TYPE, null: true, description: 'The user-facing URL for this Geo node.'
field :internal_url, GraphQL::STRING_TYPE, null: true, description: 'The URL defined on the primary node that secondary nodes should use to contact it.'
field :files_max_capacity, GraphQL::INT_TYPE, null: true, description: 'The maximum concurrency of LFS/attachment backfill for this secondary node.'
field :repos_max_capacity, GraphQL::INT_TYPE, null: true, description: 'The maximum concurrency of repository backfill for this secondary node.'
field :verification_max_capacity, GraphQL::INT_TYPE, null: true, description: 'The maximum concurrency of repository verification for this secondary node.'
field :container_repositories_max_capacity, GraphQL::INT_TYPE, null: true, description: 'The maximum concurrency of container repository sync for this secondary node.'
field :sync_object_storage, GraphQL::BOOLEAN_TYPE, null: true, description: 'Indicates if this secondary node will replicate blobs in Object Storage.'
field :selective_sync_type, GraphQL::STRING_TYPE, null: true, description: 'Indicates if syncing is limited to only specific groups, or shards.'
field :selective_sync_shards, type: [GraphQL::STRING_TYPE], null: true, description: 'The repository storages whose projects should be synced, if `selective_sync_type` == `shards`.'
field :selective_sync_namespaces, ::Types::NamespaceType.connection_type, null: true, method: :namespaces, description: 'The namespaces that should be synced, if `selective_sync_type` == `namespaces`.'
field :minimum_reverification_interval, GraphQL::INT_TYPE, null: true, description: 'The interval (in days) in which the repository verification is valid. Once expired, it will be reverified.'
field :merge_request_diff_registries, ::Types::Geo::MergeRequestDiffRegistryType.connection_type,
null: true,
resolver: ::Resolvers::Geo::MergeRequestDiffRegistriesResolver,
description: 'Find merge request diff registries on this Geo node'
description: 'Find merge request diff registries on this Geo node.'
field :package_file_registries, ::Types::Geo::PackageFileRegistryType.connection_type,
null: true,
resolver: ::Resolvers::Geo::PackageFileRegistriesResolver,
description: 'Package file registries of the GeoNode'
description: 'Package file registries of the GeoNode.'
field :snippet_repository_registries, ::Types::Geo::SnippetRepositoryRegistryType.connection_type,
null: true,
resolver: ::Resolvers::Geo::SnippetRepositoryRegistriesResolver,
description: 'Find snippet repository registries on this Geo node'
description: 'Find snippet repository registries on this Geo node.'
field :terraform_state_version_registries, ::Types::Geo::TerraformStateVersionRegistryType.connection_type,
null: true,
resolver: ::Resolvers::Geo::TerraformStateVersionRegistriesResolver,
description: 'Find terraform state version registries on this Geo node'
description: 'Find terraform state version registries on this Geo node.'
end
end
end
......@@ -9,7 +9,7 @@ module Types
graphql_name 'MergeRequestDiffRegistry'
description 'Represents the Geo sync and verification state of a Merge Request diff'
field :merge_request_diff_id, GraphQL::ID_TYPE, null: false, description: 'ID of the Merge Request diff'
field :merge_request_diff_id, GraphQL::ID_TYPE, null: false, description: 'ID of the Merge Request diff.'
end
end
end
......@@ -9,7 +9,7 @@ module Types
graphql_name 'PackageFileRegistry'
description 'Represents the Geo sync and verification state of a package file'
field :package_file_id, GraphQL::ID_TYPE, null: false, description: 'ID of the PackageFile'
field :package_file_id, GraphQL::ID_TYPE, null: false, description: 'ID of the PackageFile.'
end
end
end
......@@ -9,7 +9,7 @@ module Types
graphql_name 'SnippetRepositoryRegistry'
description 'Represents the Geo sync and verification state of a snippet repository'
field :snippet_repository_id, GraphQL::ID_TYPE, null: false, description: 'ID of the Snippet Repository'
field :snippet_repository_id, GraphQL::ID_TYPE, null: false, description: 'ID of the Snippet Repository.'
end
end
end
......@@ -9,7 +9,7 @@ module Types
graphql_name 'TerraformStateVersionRegistry'
description 'Represents the Geo sync and verification state of a terraform state version'
field :terraform_state_version_id, GraphQL::ID_TYPE, null: false, description: 'ID of the terraform state version'
field :terraform_state_version_id, GraphQL::ID_TYPE, null: false, description: 'ID of the terraform state version.'
end
end
end
......@@ -9,6 +9,6 @@ module Types
field :release_stats, Types::GroupReleaseStatsType,
null: true, method: :itself,
description: 'Statistics related to releases within the group'
description: 'Statistics related to releases within the group.'
end
end
......@@ -11,27 +11,27 @@ module Types
field :iid,
GraphQL::ID_TYPE,
null: false,
description: 'Internal ID of the on-call schedule'
description: 'Internal ID of the on-call schedule.'
field :name,
GraphQL::STRING_TYPE,
null: false,
description: 'Name of the on-call schedule'
description: 'Name of the on-call schedule.'
field :description,
GraphQL::STRING_TYPE,
null: true,
description: 'Description of the on-call schedule'
description: 'Description of the on-call schedule.'
field :timezone,
GraphQL::STRING_TYPE,
null: false,
description: 'Time zone of the on-call schedule'
description: 'Time zone of the on-call schedule.'
field :rotations,
OncallRotationType.connection_type,
null: false,
description: 'On-call rotations for the on-call schedule'
description: 'On-call rotations for the on-call schedule.'
end
end
end
......@@ -9,22 +9,22 @@ module Types
field :projects,
Types::ProjectType.connection_type,
null: false,
description: 'Projects selected in Instance Security Dashboard'
description: 'Projects selected in Instance Security Dashboard.'
field :vulnerability_scanners,
::Types::VulnerabilityScannerType.connection_type,
null: true,
description: 'Vulnerability scanners reported on the vulnerabilities from projects selected in Instance Security Dashboard',
description: 'Vulnerability scanners reported on the vulnerabilities from projects selected in Instance Security Dashboard.',
resolver: ::Resolvers::Vulnerabilities::ScannersResolver
field :vulnerability_severities_count, ::Types::VulnerabilitySeveritiesCountType, null: true,
description: 'Counts for each vulnerability severity from projects selected in Instance Security Dashboard',
description: 'Counts for each vulnerability severity from projects selected in Instance Security Dashboard.',
resolver: ::Resolvers::VulnerabilitySeveritiesCountResolver
field :vulnerability_grades,
[Types::VulnerableProjectsByGradeType],
null: false,
description: 'Represents vulnerable project counts for each grade'
description: 'Represents vulnerable project counts for each grade.'
def vulnerability_grades
::Gitlab::Graphql::Aggregations::VulnerabilityStatistics::LazyAggregate.new(
......
......@@ -12,43 +12,43 @@ module Types
implements ::Types::TimeboxReportInterface
field :id, GraphQL::ID_TYPE, null: false,
description: 'ID of the iteration'
description: 'ID of the iteration.'
field :iid, GraphQL::ID_TYPE, null: false,
description: 'Internal ID of the iteration'
description: 'Internal ID of the iteration.'
field :title, GraphQL::STRING_TYPE, null: false,
description: 'Title of the iteration'
description: 'Title of the iteration.'
field :description, GraphQL::STRING_TYPE, null: true,
description: 'Description of the iteration'
description: 'Description of the iteration.'
markdown_field :description_html, null: true
field :state, Types::IterationStateEnum, null: false,
description: 'State of the iteration'
description: 'State of the iteration.'
field :web_path, GraphQL::STRING_TYPE, null: false, method: :iteration_path,
description: 'Web path of the iteration'
description: 'Web path of the iteration.'
field :web_url, GraphQL::STRING_TYPE, null: false, method: :iteration_url,
description: 'Web URL of the iteration'
description: 'Web URL of the iteration.'
field :scoped_path, GraphQL::STRING_TYPE, null: true, method: :scoped_iteration_path, extras: [:parent],
description: 'Web path of the iteration, scoped to the query parent. Only valid for Project parents. Returns null in other contexts'
description: 'Web path of the iteration, scoped to the query parent. Only valid for Project parents. Returns null in other contexts.'
field :scoped_url, GraphQL::STRING_TYPE, null: true, method: :scoped_iteration_url, extras: [:parent],
description: 'Web URL of the iteration, scoped to the query parent. Only valid for Project parents. Returns null in other contexts'
description: 'Web URL of the iteration, scoped to the query parent. Only valid for Project parents. Returns null in other contexts.'
field :due_date, Types::TimeType, null: true,
description: 'Timestamp of the iteration due date'
description: 'Timestamp of the iteration due date.'
field :start_date, Types::TimeType, null: true,
description: 'Timestamp of the iteration start date'
description: 'Timestamp of the iteration start date.'
field :created_at, Types::TimeType, null: false,
description: 'Timestamp of iteration creation'
description: 'Timestamp of iteration creation.'
field :updated_at, Types::TimeType, null: false,
description: 'Timestamp of last iteration update'
description: 'Timestamp of last iteration update.'
end
end
......@@ -8,19 +8,19 @@ module Types
authorize :read_issuable_metric_image
field :id, GraphQL::ID_TYPE, null: false,
description: 'ID of the metric upload'
description: 'ID of the metric upload.'
field :iid, GraphQL::ID_TYPE, null: false,
description: 'Internal ID of the metric upload'
description: 'Internal ID of the metric upload.'
field :url, GraphQL::STRING_TYPE, null: false,
description: 'URL of the metric source'
description: 'URL of the metric source.'
field :file_name, GraphQL::STRING_TYPE, null: true,
description: 'File name of the metric image',
description: 'File name of the metric image.',
method: :filename
field :file_path, GraphQL::STRING_TYPE, null: true,
description: 'File path of the metric image'
description: 'File path of the metric image.'
end
end
......@@ -7,8 +7,8 @@ module Types
graphql_name 'RequirementStatesCount'
description 'Counts of requirements by their state'
field :opened, GraphQL::INT_TYPE, null: true, description: 'Number of opened requirements'
field :archived, GraphQL::INT_TYPE, null: true, description: 'Number of archived requirements'
field :opened, GraphQL::INT_TYPE, null: true, description: 'Number of opened requirements.'
field :archived, GraphQL::INT_TYPE, null: true, description: 'Number of archived requirements.'
end
# rubocop: enable Graphql/AuthorizeTypes
end
......
......@@ -11,46 +11,46 @@ module Types
expose_permissions Types::PermissionTypes::Requirement
field :id, GraphQL::ID_TYPE, null: false,
description: 'ID of the requirement'
description: 'ID of the requirement.'
field :iid, GraphQL::ID_TYPE, null: false,
description: 'Internal ID of the requirement'
description: 'Internal ID of the requirement.'
field :title, GraphQL::STRING_TYPE, null: true,
description: 'Title of the requirement'
description: 'Title of the requirement.'
markdown_field :title_html, null: true
field :description, GraphQL::STRING_TYPE, null: true,
description: 'Description of the requirement'
description: 'Description of the requirement.'
markdown_field :description_html, null: true
field :state, RequirementsManagement::RequirementStateEnum, null: false,
description: 'State of the requirement'
description: 'State of the requirement.'
field :last_test_report_state, RequirementsManagement::TestReportStateEnum, null: true,
description: 'Latest requirement test report state'
description: 'Latest requirement test report state.'
field :last_test_report_manually_created,
GraphQL::BOOLEAN_TYPE,
method: :last_test_report_manually_created?,
null: true,
description: 'Indicates if latest test report was created by user'
description: 'Indicates if latest test report was created by user.'
field :project, ProjectType, null: false,
description: 'Project to which the requirement belongs'
description: 'Project to which the requirement belongs.'
field :author, UserType, null: false,
description: 'Author of the requirement'
description: 'Author of the requirement.'
field :test_reports, TestReportType.connection_type, null: true, complexity: 5,
description: 'Test reports of the requirement',
description: 'Test reports of the requirement.',
resolver: Resolvers::RequirementsManagement::TestReportsResolver
field :created_at, Types::TimeType, null: false,
description: 'Timestamp of when the requirement was created'
description: 'Timestamp of when the requirement was created.'
field :updated_at, Types::TimeType, null: false,
description: 'Timestamp of when the requirement was last updated'
description: 'Timestamp of when the requirement was last updated.'
def project
Gitlab::Graphql::Loaders::BatchModelLoader.new(Project, object.project_id).find
......
......@@ -9,16 +9,16 @@ module Types
authorize :read_requirement
field :id, GraphQL::ID_TYPE, null: false,
description: 'ID of the test report'
description: 'ID of the test report.'
field :state, TestReportStateEnum, null: false,
description: 'State of the test report'
description: 'State of the test report.'
field :author, UserType, null: true,
description: 'Author of the test report'
description: 'Author of the test report.'
field :created_at, TimeType, null: false,
description: 'Timestamp of when the test report was created'
description: 'Timestamp of when the test report was created.'
def author
Gitlab::Graphql::Loaders::BatchModelLoader.new(User, object.author_id).find
......
......@@ -6,7 +6,7 @@ module Types
graphql_name 'ScannedResource'
description 'Represents a resource scanned by a security scan'
field :url, GraphQL::STRING_TYPE, null: true, description: 'The URL scanned by the scanner'
field :request_method, GraphQL::STRING_TYPE, null: true, description: 'The HTTP request method used to access the URL'
field :url, GraphQL::STRING_TYPE, null: true, description: 'The URL scanned by the scanner.'
field :request_method, GraphQL::STRING_TYPE, null: true, description: 'The HTTP request method used to access the URL.'
end
end
......@@ -6,9 +6,9 @@ module Types
graphql_name 'SecurityReportSummarySection'
description 'Represents a section of a summary of a security report'
field :vulnerabilities_count, GraphQL::INT_TYPE, null: true, description: 'Total number of vulnerabilities'
field :scanned_resources_count, GraphQL::INT_TYPE, null: true, description: 'Total number of scanned resources'
field :scanned_resources, ::Types::ScannedResourceType.connection_type, null: true, description: 'A list of the first 20 scanned resources'
field :scanned_resources_csv_path, GraphQL::STRING_TYPE, null: true, description: 'Path to download all the scanned resources in CSV format'
field :vulnerabilities_count, GraphQL::INT_TYPE, null: true, description: 'Total number of vulnerabilities.'
field :scanned_resources_count, GraphQL::INT_TYPE, null: true, description: 'Total number of scanned resources.'
field :scanned_resources, ::Types::ScannedResourceType.connection_type, null: true, description: 'A list of the first 20 scanned resources.'
field :scanned_resources_csv_path, GraphQL::STRING_TYPE, null: true, description: 'Path to download all the scanned resources in CSV format.'
end
end
......@@ -7,12 +7,12 @@ module Types
description 'Represents the time report stats for timeboxes'
field :complete, ::Types::TimeboxMetricsType, null: true,
description: 'Completed issues metrics'
description: 'Completed issues metrics.'
field :incomplete, ::Types::TimeboxMetricsType, null: true,
description: 'Incomplete issues metrics'
description: 'Incomplete issues metrics.'
field :total, ::Types::TimeboxMetricsType, null: true,
description: 'Total issues metrics'
description: 'Total issues metrics.'
end
end
......@@ -7,9 +7,9 @@ module Types
description 'Represents measured stats metrics for timeboxes'
field :count, GraphQL::INT_TYPE, null: false,
description: 'The count metric'
description: 'The count metric.'
field :weight, GraphQL::INT_TYPE, null: false,
description: 'The weight metric'
description: 'The weight metric.'
end
end
......@@ -6,7 +6,7 @@ module Types
field :report, Types::TimeboxReportType, null: true,
resolver: ::Resolvers::TimeboxReportResolver,
description: 'Historically accurate report about the timebox',
description: 'Historically accurate report about the timebox.',
complexity: 175
end
end
......@@ -7,8 +7,8 @@ module Types
description 'Represents a historically accurate report about the timebox'
field :stats, ::Types::TimeReportStatsType, null: true,
description: 'Represents the time report stats for the timebox'
description: 'Represents the time report stats for the timebox.'
field :burnup_time_series, [::Types::BurnupChartDailyTotalsType], null: true,
description: 'Daily scope and completed totals for burnup charts'
description: 'Daily scope and completed totals for burnup charts.'
end
end
......@@ -9,27 +9,27 @@ module Types
field :spent_at,
Types::TimeType,
null: true,
description: 'Timestamp of when the time tracked was spent at'
description: 'Timestamp of when the time tracked was spent at.'
field :time_spent,
GraphQL::INT_TYPE,
null: false,
description: 'The time spent displayed in seconds'
description: 'The time spent displayed in seconds.'
field :user,
Types::UserType,
null: false,
description: 'The user that logged the time'
description: 'The user that logged the time.'
field :issue,
Types::IssueType,
null: true,
description: 'The issue that logged time was added to'
description: 'The issue that logged time was added to.'
field :note,
Types::Notes::NoteType,
null: true,
description: 'The note where the quick action to add the logged time was executed'
description: 'The note where the quick action to add the logged time was executed.'
def user
Gitlab::Graphql::Loaders::BatchModelLoader.new(User, object.user_id).find
......
......@@ -7,12 +7,12 @@ module Types
description 'Represents the number of vulnerabilities for a particular severity on a particular day. This data is retained for 365 days'
field :count, GraphQL::INT_TYPE, null: true,
description: 'Number of vulnerabilities'
description: 'Number of vulnerabilities.'
field :day, GraphQL::Types::ISO8601Date, null: true,
description: 'Date for the count'
description: 'Date for the count.'
field :severity, VulnerabilitySeverityEnum, null: true,
description: 'Severity of the counted vulnerabilities'
description: 'Severity of the counted vulnerabilities.'
end
end
......@@ -7,10 +7,10 @@ module Types
description 'Represents the count of vulnerabilities by severity on a particular day. This data is retained for 365 days'
field :date, GraphQL::Types::ISO8601Date, null: false,
description: 'Date for the count'
description: 'Date for the count.'
field :total, GraphQL::INT_TYPE, null: false,
description: 'Total number of vulnerabilities on a particular day'
description: 'Total number of vulnerabilities on a particular day.'
::Enums::Vulnerability.severity_levels.keys.each do |severity|
field severity.to_s, GraphQL::INT_TYPE, null: false,
......
......@@ -9,13 +9,13 @@ module Types
authorize :read_vulnerability
field :id, GlobalIDType[::Vulnerabilities::ExternalIssueLink], null: false,
description: 'GraphQL ID of the external issue link'
description: 'GraphQL ID of the external issue link.'
field :link_type, ::Types::Vulnerability::ExternalIssueLinkTypeEnum, null: false,
description: 'Type of the external issue link'
description: 'Type of the external issue link.'
field :external_issue, ::Types::ExternalIssueType, null: true,
description: 'The external issue attached to the issue link',
description: 'The external issue attached to the issue link.',
resolver: Resolvers::ExternalIssueResolver
end
end
......
......@@ -8,13 +8,13 @@ module Types
description 'Represents an issue link of a vulnerability'
field :id, GraphQL::ID_TYPE, null: false,
description: 'GraphQL ID of the vulnerability'
description: 'GraphQL ID of the vulnerability.'
field :link_type, ::Types::Vulnerability::IssueLinkTypeEnum, null: false,
description: "Type of the issue link"
description: "Type of the issue link."
field :issue, ::Types::IssueType, null: false,
description: 'The issue attached to issue link'
description: 'The issue attached to issue link.'
end
# rubocop: enable Graphql/AuthorizeTypes
end
......
......@@ -7,16 +7,16 @@ module Types
description 'Represents a vulnerability identifier'
field :name, GraphQL::STRING_TYPE, null: true,
description: 'Name of the vulnerability identifier'
description: 'Name of the vulnerability identifier.'
field :url, GraphQL::STRING_TYPE, null: true,
description: 'URL of the vulnerability identifier'
description: 'URL of the vulnerability identifier.'
field :external_type, GraphQL::STRING_TYPE, null: true,
description: 'External type of the vulnerability identifier'
description: 'External type of the vulnerability identifier.'
field :external_id, GraphQL::STRING_TYPE, null: true,
description: 'External ID of the vulnerability identifier'
description: 'External ID of the vulnerability identifier.'
end
# rubocop: enable Graphql/AuthorizeTypes
end
......@@ -8,13 +8,13 @@ module Types
description 'Represents the location of a vulnerability found by a container security scan'
field :dependency, ::Types::VulnerableDependencyType, null: true,
description: 'Dependency containing the vulnerability'
description: 'Dependency containing the vulnerability.'
field :image, GraphQL::STRING_TYPE, null: true,
description: 'Name of the vulnerable container image'
description: 'Name of the vulnerable container image.'
field :operating_system, GraphQL::STRING_TYPE, null: true,
description: 'Operating system that runs on the vulnerable container image'
description: 'Operating system that runs on the vulnerable container image.'
end
end
end
......@@ -8,24 +8,24 @@ module Types
description 'Represents the location of a vulnerability found by a Coverage Fuzzing scan'
field :vulnerable_class, GraphQL::STRING_TYPE, null: true,
description: 'Class containing the vulnerability',
description: 'Class containing the vulnerability.',
hash_key: :class
field :end_line, GraphQL::STRING_TYPE, null: true,
description: 'Number of the last relevant line in the vulnerable file'
description: 'Number of the last relevant line in the vulnerable file.'
field :file, GraphQL::STRING_TYPE, null: true,
description: 'Path to the vulnerable file'
description: 'Path to the vulnerable file.'
field :vulnerable_method, GraphQL::STRING_TYPE, null: true,
description: 'Method containing the vulnerability',
description: 'Method containing the vulnerability.',
hash_key: :method
field :start_line, GraphQL::STRING_TYPE, null: true,
description: 'Number of the first relevant line in the vulnerable file'
description: 'Number of the first relevant line in the vulnerable file.'
field :blob_path, GraphQL::STRING_TYPE, null: true,
description: 'Blob path to the vulnerable file'
description: 'Blob path to the vulnerable file.'
end
end
end
......@@ -8,16 +8,16 @@ module Types
description 'Represents the location of a vulnerability found by a DAST scan'
field :hostname, GraphQL::STRING_TYPE, null: true,
description: 'Domain name of the vulnerable request'
description: 'Domain name of the vulnerable request.'
field :param, GraphQL::STRING_TYPE, null: true,
description: 'Query parameter for the URL on which the vulnerability occurred'
description: 'Query parameter for the URL on which the vulnerability occurred.'
field :path, GraphQL::STRING_TYPE, null: true,
description: 'URL path and query string of the vulnerable request'
description: 'URL path and query string of the vulnerable request.'
field :request_method, GraphQL::STRING_TYPE, null: true,
description: 'HTTP method of the vulnerable request'
description: 'HTTP method of the vulnerable request.'
end
end
end
......@@ -8,13 +8,13 @@ module Types
description 'Represents the location of a vulnerability found by a dependency security scan'
field :dependency, ::Types::VulnerableDependencyType, null: true,
description: 'Dependency containing the vulnerability'
description: 'Dependency containing the vulnerability.'
field :file, GraphQL::STRING_TYPE, null: true,
description: 'Path to the vulnerable file'
description: 'Path to the vulnerable file.'
field :blob_path, GraphQL::STRING_TYPE, null: true,
description: 'Blob path to the vulnerable file'
description: 'Blob path to the vulnerable file.'
end
end
end
......@@ -8,24 +8,24 @@ module Types
description 'Represents the location of a vulnerability found by a SAST scan'
field :vulnerable_class, GraphQL::STRING_TYPE, null: true,
description: 'Class containing the vulnerability',
description: 'Class containing the vulnerability.',
hash_key: :class
field :end_line, GraphQL::STRING_TYPE, null: true,
description: 'Number of the last relevant line in the vulnerable file'
description: 'Number of the last relevant line in the vulnerable file.'
field :file, GraphQL::STRING_TYPE, null: true,
description: 'Path to the vulnerable file'
description: 'Path to the vulnerable file.'
field :vulnerable_method, GraphQL::STRING_TYPE, null: true,
description: 'Method containing the vulnerability',
description: 'Method containing the vulnerability.',
hash_key: :method
field :start_line, GraphQL::STRING_TYPE, null: true,
description: 'Number of the first relevant line in the vulnerable file'
description: 'Number of the first relevant line in the vulnerable file.'
field :blob_path, GraphQL::STRING_TYPE, null: true,
description: 'Blob path to the vulnerable file'
description: 'Blob path to the vulnerable file.'
end
end
end
......@@ -8,24 +8,24 @@ module Types
description 'Represents the location of a vulnerability found by a secret detection scan'
field :vulnerable_class, GraphQL::STRING_TYPE, null: true,
description: 'Class containing the vulnerability',
description: 'Class containing the vulnerability.',
hash_key: :class
field :end_line, GraphQL::STRING_TYPE, null: true,
description: 'Number of the last relevant line in the vulnerable file'
description: 'Number of the last relevant line in the vulnerable file.'
field :file, GraphQL::STRING_TYPE, null: true,
description: 'Path to the vulnerable file'
description: 'Path to the vulnerable file.'
field :vulnerable_method, GraphQL::STRING_TYPE, null: true,
description: 'Method containing the vulnerability',
description: 'Method containing the vulnerability.',
hash_key: :method
field :start_line, GraphQL::STRING_TYPE, null: true,
description: 'Number of the first relevant line in the vulnerable file'
description: 'Number of the first relevant line in the vulnerable file.'
field :blob_path, GraphQL::STRING_TYPE, null: true,
description: 'Blob path to the vulnerable file'
description: 'Blob path to the vulnerable file.'
end
end
end
......@@ -8,15 +8,15 @@ module Types
authorize :read_vulnerability_scanner
field :name, GraphQL::STRING_TYPE, null: true,
description: 'Name of the vulnerability scanner'
description: 'Name of the vulnerability scanner.'
field :external_id, GraphQL::STRING_TYPE, null: true,
description: 'External ID of the vulnerability scanner'
description: 'External ID of the vulnerability scanner.'
field :vendor, GraphQL::STRING_TYPE, null: true,
description: 'Vendor of the vulnerability scanner'
description: 'Vendor of the vulnerability scanner.'
field :report_type, VulnerabilityReportTypeEnum, null: true,
description: 'Type of the vulnerability report'
description: 'Type of the vulnerability report.'
end
end
......@@ -12,13 +12,13 @@ module Types
expose_permissions Types::PermissionTypes::Vulnerability
field :id, GraphQL::ID_TYPE, null: false,
description: 'GraphQL ID of the vulnerability'
description: 'GraphQL ID of the vulnerability.'
field :title, GraphQL::STRING_TYPE, null: true,
description: 'Title of the vulnerability'
description: 'Title of the vulnerability.'
field :description, GraphQL::STRING_TYPE, null: true,
description: 'Description of the vulnerability'
description: 'Description of the vulnerability.'
field :state, VulnerabilityStateEnum, null: true,
description: "State of the vulnerability (#{::Vulnerability.states.keys.join(', ').upcase})"
......@@ -30,23 +30,23 @@ module Types
description: "Type of the security report that found the vulnerability (#{::Enums::Vulnerability.report_types.keys.join(', ').upcase})"
field :resolved_on_default_branch, GraphQL::BOOLEAN_TYPE, null: false,
description: "Indicates whether the vulnerability is fixed on the default branch or not"
description: "Indicates whether the vulnerability is fixed on the default branch or not."
field :user_notes_count, GraphQL::INT_TYPE, null: false,
description: 'Number of user notes attached to the vulnerability'
description: 'Number of user notes attached to the vulnerability.'
field :vulnerability_path, GraphQL::STRING_TYPE, null: true,
description: "URL to the vulnerability's details page"
description: "URL to the vulnerability's details page."
field :issue_links, ::Types::Vulnerability::IssueLinkType.connection_type, null: false,
description: "List of issue links related to the vulnerability",
description: "List of issue links related to the vulnerability.",
resolver: Resolvers::Vulnerabilities::IssueLinksResolver
field :external_issue_links, ::Types::Vulnerability::ExternalIssueLinkType.connection_type, null: false,
description: 'List of external issue links related to the vulnerability'
description: 'List of external issue links related to the vulnerability.'
field :location, VulnerabilityLocationType, null: true,
description: 'Location metadata for the vulnerability. Its fields depend on the type of security scan that found the vulnerability'
description: 'Location metadata for the vulnerability. Its fields depend on the type of security scan that found the vulnerability.'
field :scanner, VulnerabilityScannerType, null: true,
description: 'Scanner metadata for the vulnerability.'
......@@ -58,21 +58,21 @@ module Types
description: 'Identifiers of the vulnerability.'
field :project, ::Types::ProjectType, null: true,
description: 'The project on which the vulnerability was found',
description: 'The project on which the vulnerability was found.',
authorize: :read_project
field :detected_at, Types::TimeType, null: false,
description: 'Timestamp of when the vulnerability was first detected',
description: 'Timestamp of when the vulnerability was first detected.',
method: :created_at
field :confirmed_at, Types::TimeType, null: true,
description: 'Timestamp of when the vulnerability state was changed to confirmed'
description: 'Timestamp of when the vulnerability state was changed to confirmed.'
field :resolved_at, Types::TimeType, null: true,
description: 'Timestamp of when the vulnerability state was changed to resolved'
description: 'Timestamp of when the vulnerability state was changed to resolved.'
field :dismissed_at, Types::TimeType, null: true,
description: 'Timestamp of when the vulnerability state was changed to dismissed'
description: 'Timestamp of when the vulnerability state was changed to dismissed.'
field :has_solutions, GraphQL::BOOLEAN_TYPE, null: true,
description: 'Indicates whether there is a solution available for this vulnerability.',
......@@ -91,7 +91,7 @@ module Types
description: 'The user that dismissed the vulnerability.'
field :details, [VulnerabilityDetailType], null: false,
description: 'Details of the vulnerability',
description: 'Details of the vulnerability.',
resolver: Resolvers::Vulnerabilities::DetailsResolver
def confirmed_by
......
......@@ -7,9 +7,9 @@ module Types
description 'Represents a vulnerable dependency. Used in vulnerability location data'
field :package, ::Types::VulnerablePackageType, null: true,
description: 'The package associated with the vulnerable dependency'
description: 'The package associated with the vulnerable dependency.'
field :version, GraphQL::STRING_TYPE, null: true,
description: 'The version of the vulnerable dependency'
description: 'The version of the vulnerable dependency.'
end
end
......@@ -7,6 +7,6 @@ module Types
description 'Represents a vulnerable package. Used in vulnerability dependency data'
field :name, GraphQL::STRING_TYPE, null: true,
description: 'The name of the vulnerable package'
description: 'The name of the vulnerable package.'
end
end
......@@ -7,14 +7,14 @@ module Types
description 'Represents vulnerability letter grades with associated projects'
field :grade, Types::VulnerabilityGradeEnum, null: false,
description: "Grade based on the highest severity vulnerability present"
description: "Grade based on the highest severity vulnerability present."
field :count, GraphQL::INT_TYPE, null: false,
description: 'Number of projects within this grade',
description: 'Number of projects within this grade.',
complexity: 5
field :projects, Types::ProjectType.connection_type, null: false,
description: 'Projects within this grade',
description: 'Projects within this grade.',
complexity: 5
end
# rubocop: enable Graphql/AuthorizeTypes
......
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