Commit d0085211 authored by Luke Duncalfe's avatar Luke Duncalfe

Fix Graphql/Descriptions EE types offenses

https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46721 introduced a
new rubocop that enforced periods at the end of GraphQL description
strings. Existing offenses were added to `.rubocop_manual_todo.yml`.

This change fixes roughly half of the offenses in `ee/app/graphql/types`
and `ee/app/graphql/ee/types` and removes the exclusion of them from
`.rubocop_manual_todo.yml`.

The changes were generated using the following autocorrect:

    bundle exec rubocop app/graphql \
      --auto-correct \
      --only Graphql/Descriptions

https://gitlab.com/gitlab-org/gitlab/-/issues/292426
parent c997203d
...@@ -716,37 +716,6 @@ RSpec/TimecopTravel: ...@@ -716,37 +716,6 @@ RSpec/TimecopTravel:
Graphql/Descriptions: Graphql/Descriptions:
Exclude: Exclude:
- 'ee/app/graphql/ee/types/board_list_type.rb'
- 'ee/app/graphql/ee/types/board_type.rb'
- 'ee/app/graphql/ee/types/boards/board_issue_input_base_type.rb'
- 'ee/app/graphql/ee/types/boards/board_issue_input_type.rb'
- 'ee/app/graphql/ee/types/ci/pipeline_type.rb'
- 'ee/app/graphql/ee/types/group_type.rb'
- 'ee/app/graphql/ee/types/issue_connection_type.rb'
- 'ee/app/graphql/ee/types/merge_request_type.rb'
- 'ee/app/graphql/ee/types/namespace_type.rb'
- 'ee/app/graphql/ee/types/project_type.rb'
- 'ee/app/graphql/ee/types/query_type.rb'
- 'ee/app/graphql/types/admin/analytics/devops_adoption/segment_type.rb'
- 'ee/app/graphql/types/admin/analytics/devops_adoption/snapshot_type.rb'
- 'ee/app/graphql/types/boards/board_epic_type.rb'
- 'ee/app/graphql/types/boards/epic_board_type.rb'
- 'ee/app/graphql/types/boards/epic_user_preferences_type.rb'
- 'ee/app/graphql/types/burnup_chart_daily_totals_type.rb'
- 'ee/app/graphql/types/ci_configuration/sast/analyzers_entity_input_type.rb'
- 'ee/app/graphql/types/ci_configuration/sast/analyzers_entity_type.rb'
- 'ee/app/graphql/types/ci_configuration/sast/entity_input_type.rb'
- 'ee/app/graphql/types/ci_configuration/sast/input_type.rb'
- 'ee/app/graphql/types/clusters/agent_token_type.rb'
- 'ee/app/graphql/types/clusters/agent_type.rb'
- 'ee/app/graphql/types/compliance_management/compliance_framework_type.rb'
- 'ee/app/graphql/types/dast_scanner_profile_type.rb'
- 'ee/app/graphql/types/dast_site_profile_type.rb'
- 'ee/app/graphql/types/dast_site_validation_type.rb'
- 'ee/app/graphql/types/epic_descendant_count_type.rb'
- 'ee/app/graphql/types/epic_descendant_weight_sum_type.rb'
- 'ee/app/graphql/types/epic_health_status_type.rb'
- 'ee/app/graphql/types/epic_issue_type.rb'
- 'ee/app/graphql/types/epic_tree/epic_tree_node_input_type.rb' - 'ee/app/graphql/types/epic_tree/epic_tree_node_input_type.rb'
- 'ee/app/graphql/types/external_issue_type.rb' - 'ee/app/graphql/types/external_issue_type.rb'
- 'ee/app/graphql/types/geo/geo_node_type.rb' - 'ee/app/graphql/types/geo/geo_node_type.rb'
......
This diff is collapsed.
...@@ -7,19 +7,19 @@ module EE ...@@ -7,19 +7,19 @@ module EE
prepended do prepended do
field :milestone, ::Types::MilestoneType, null: true, field :milestone, ::Types::MilestoneType, null: true,
description: 'Milestone of the list' description: 'Milestone of the list.'
field :iteration, ::Types::IterationType, null: true, field :iteration, ::Types::IterationType, null: true,
description: 'Iteration of the list' description: 'Iteration of the list.'
field :max_issue_count, GraphQL::INT_TYPE, null: true, field :max_issue_count, GraphQL::INT_TYPE, null: true,
description: 'Maximum number of issues in the list' description: 'Maximum number of issues in the list.'
field :max_issue_weight, GraphQL::INT_TYPE, null: true, field :max_issue_weight, GraphQL::INT_TYPE, null: true,
description: 'Maximum weight of issues in the list' description: 'Maximum weight of issues in the list.'
field :assignee, ::Types::UserType, null: true, field :assignee, ::Types::UserType, null: true,
description: 'Assignee in the list' description: 'Assignee in the list.'
field :limit_metric, ::EE::Types::ListLimitMetricEnum, null: true, field :limit_metric, ::EE::Types::ListLimitMetricEnum, null: true,
description: 'The current limit metric for the list' description: 'The current limit metric for the list.'
field :total_weight, GraphQL::INT_TYPE, null: true, field :total_weight, GraphQL::INT_TYPE, null: true,
description: 'Total weight of all issues in the list' description: 'Total weight of all issues in the list.'
def milestone def milestone
::Gitlab::Graphql::Loaders::BatchModelLoader.new(::Milestone, object.milestone_id).find ::Gitlab::Graphql::Loaders::BatchModelLoader.new(::Milestone, object.milestone_id).find
......
...@@ -7,24 +7,24 @@ module EE ...@@ -7,24 +7,24 @@ module EE
prepended do prepended do
field :assignee, type: ::Types::UserType, null: true, field :assignee, type: ::Types::UserType, null: true,
description: 'The board assignee' description: 'The board assignee.'
field :epics, ::Types::Boards::BoardEpicType.connection_type, null: true, field :epics, ::Types::Boards::BoardEpicType.connection_type, null: true,
description: 'Epics associated with board issues', description: 'Epics associated with board issues.',
resolver: ::Resolvers::BoardGroupings::EpicsResolver, resolver: ::Resolvers::BoardGroupings::EpicsResolver,
complexity: 5 complexity: 5
field :labels, ::Types::LabelType.connection_type, null: true, field :labels, ::Types::LabelType.connection_type, null: true,
description: 'Labels of the board' description: 'Labels of the board.'
field :milestone, type: ::Types::MilestoneType, null: true, field :milestone, type: ::Types::MilestoneType, null: true,
description: 'The board milestone' description: 'The board milestone.'
field :iteration, type: ::Types::IterationType, null: true, field :iteration, type: ::Types::IterationType, null: true,
description: 'The board iteration.' description: 'The board iteration.'
field :weight, type: GraphQL::INT_TYPE, null: true, field :weight, type: GraphQL::INT_TYPE, null: true,
description: 'Weight of the board' description: 'Weight of the board.'
end end
end end
end end
......
...@@ -9,15 +9,15 @@ module EE ...@@ -9,15 +9,15 @@ module EE
prepended do prepended do
argument :epic_id, ::Types::GlobalIDType[::Epic], argument :epic_id, ::Types::GlobalIDType[::Epic],
required: false, required: false,
description: 'Filter by epic ID. Incompatible with epicWildcardId' description: 'Filter by epic ID. Incompatible with epicWildcardId.'
argument :iteration_title, GraphQL::STRING_TYPE, argument :iteration_title, GraphQL::STRING_TYPE,
required: false, required: false,
description: 'Filter by iteration title' description: 'Filter by iteration title.'
argument :weight, GraphQL::STRING_TYPE, argument :weight, GraphQL::STRING_TYPE,
required: false, required: false,
description: 'Filter by weight' description: 'Filter by weight.'
end end
end end
end end
......
...@@ -10,11 +10,11 @@ module EE ...@@ -10,11 +10,11 @@ module EE
# NONE/ANY epic filter can not be negated # NONE/ANY epic filter can not be negated
argument :epic_wildcard_id, ::Types::Boards::EpicWildcardIdEnum, argument :epic_wildcard_id, ::Types::Boards::EpicWildcardIdEnum,
required: false, required: false,
description: 'Filter by epic ID wildcard. Incompatible with epicId' description: 'Filter by epic ID wildcard. Incompatible with epicId.'
argument :iteration_wildcard_id, ::Types::Boards::IterationWildcardIdEnum, argument :iteration_wildcard_id, ::Types::Boards::IterationWildcardIdEnum,
required: false, required: false,
description: 'Filter by iteration ID wildcard' description: 'Filter by iteration ID wildcard.'
end end
end end
end end
......
...@@ -11,7 +11,7 @@ module EE ...@@ -11,7 +11,7 @@ module EE
::Types::SecurityReportSummaryType, ::Types::SecurityReportSummaryType,
null: true, null: true,
extras: [:lookahead], extras: [:lookahead],
description: 'Vulnerability and scanned resource counts for each security scanner of the pipeline', description: 'Vulnerability and scanned resource counts for each security scanner of the pipeline.',
resolver: ::Resolvers::SecurityReportSummaryResolver resolver: ::Resolvers::SecurityReportSummaryResolver
end end
end end
......
...@@ -16,31 +16,31 @@ module EE ...@@ -16,31 +16,31 @@ module EE
end end
field :epic, ::Types::EpicType, null: true, field :epic, ::Types::EpicType, null: true,
description: 'Find a single epic', description: 'Find a single epic.',
resolver: ::Resolvers::EpicsResolver.single resolver: ::Resolvers::EpicsResolver.single
field :epics, ::Types::EpicType.connection_type, null: true, field :epics, ::Types::EpicType.connection_type, null: true,
description: 'Find epics', description: 'Find epics.',
extras: [:lookahead], extras: [:lookahead],
max_page_size: 2000, max_page_size: 2000,
resolver: ::Resolvers::EpicsResolver resolver: ::Resolvers::EpicsResolver
field :epic_board, field :epic_board,
::Types::Boards::EpicBoardType, null: true, ::Types::Boards::EpicBoardType, null: true,
description: 'Find a single epic board', description: 'Find a single epic board.',
resolver: ::Resolvers::Boards::EpicBoardsResolver.single resolver: ::Resolvers::Boards::EpicBoardsResolver.single
field :epic_boards, field :epic_boards,
::Types::Boards::EpicBoardType.connection_type, null: true, ::Types::Boards::EpicBoardType.connection_type, null: true,
description: 'Find epic boards', description: 'Find epic boards.',
resolver: ::Resolvers::Boards::EpicBoardsResolver resolver: ::Resolvers::Boards::EpicBoardsResolver
field :iterations, ::Types::IterationType.connection_type, null: true, field :iterations, ::Types::IterationType.connection_type, null: true,
description: 'Find iterations', description: 'Find iterations.',
resolver: ::Resolvers::IterationsResolver resolver: ::Resolvers::IterationsResolver
field :timelogs, ::Types::TimelogType.connection_type, null: false, field :timelogs, ::Types::TimelogType.connection_type, null: false,
description: 'Time logged in issues by group members', description: 'Time logged in issues by group members.',
extras: [:lookahead], extras: [:lookahead],
complexity: 5, complexity: 5,
resolver: ::Resolvers::TimelogResolver resolver: ::Resolvers::TimelogResolver
...@@ -48,48 +48,48 @@ module EE ...@@ -48,48 +48,48 @@ module EE
field :vulnerabilities, field :vulnerabilities,
::Types::VulnerabilityType.connection_type, ::Types::VulnerabilityType.connection_type,
null: true, null: true,
description: 'Vulnerabilities reported on the projects in the group and its subgroups', description: 'Vulnerabilities reported on the projects in the group and its subgroups.',
resolver: ::Resolvers::VulnerabilitiesResolver resolver: ::Resolvers::VulnerabilitiesResolver
field :vulnerability_scanners, field :vulnerability_scanners,
::Types::VulnerabilityScannerType.connection_type, ::Types::VulnerabilityScannerType.connection_type,
null: true, null: true,
description: 'Vulnerability scanners reported on the project vulnerabilities of the group and its subgroups', description: 'Vulnerability scanners reported on the project vulnerabilities of the group and its subgroups.',
resolver: ::Resolvers::Vulnerabilities::ScannersResolver resolver: ::Resolvers::Vulnerabilities::ScannersResolver
field :vulnerability_severities_count, ::Types::VulnerabilitySeveritiesCountType, null: true, field :vulnerability_severities_count, ::Types::VulnerabilitySeveritiesCountType, null: true,
description: 'Counts for each vulnerability severity in the group and its subgroups', description: 'Counts for each vulnerability severity in the group and its subgroups.',
resolver: ::Resolvers::VulnerabilitySeveritiesCountResolver resolver: ::Resolvers::VulnerabilitySeveritiesCountResolver
field :vulnerabilities_count_by_day, field :vulnerabilities_count_by_day,
::Types::VulnerabilitiesCountByDayType.connection_type, ::Types::VulnerabilitiesCountByDayType.connection_type,
null: true, null: true,
description: 'Number of vulnerabilities per day for the projects in the group and its subgroups', description: 'Number of vulnerabilities per day for the projects in the group and its subgroups.',
resolver: ::Resolvers::VulnerabilitiesCountPerDayResolver resolver: ::Resolvers::VulnerabilitiesCountPerDayResolver
field :vulnerabilities_count_by_day_and_severity, field :vulnerabilities_count_by_day_and_severity,
::Types::VulnerabilitiesCountByDayAndSeverityType.connection_type, ::Types::VulnerabilitiesCountByDayAndSeverityType.connection_type,
null: true, null: true,
description: 'Number of vulnerabilities per severity level, per day, for the projects in the group and its subgroups', description: 'Number of vulnerabilities per severity level, per day, for the projects in the group and its subgroups.',
resolver: ::Resolvers::VulnerabilitiesHistoryResolver, resolver: ::Resolvers::VulnerabilitiesHistoryResolver,
deprecated: { reason: 'Use `vulnerabilitiesCountByDay`', milestone: '13.3' } deprecated: { reason: 'Use `vulnerabilitiesCountByDay`', milestone: '13.3' }
field :vulnerability_grades, field :vulnerability_grades,
[::Types::VulnerableProjectsByGradeType], [::Types::VulnerableProjectsByGradeType],
null: false, null: false,
description: 'Represents vulnerable project counts for each grade', description: 'Represents vulnerable project counts for each grade.',
resolver: ::Resolvers::VulnerabilitiesGradeResolver resolver: ::Resolvers::VulnerabilitiesGradeResolver
field :code_coverage_activities, field :code_coverage_activities,
::Types::Ci::CodeCoverageActivityType.connection_type, ::Types::Ci::CodeCoverageActivityType.connection_type,
null: true, null: true,
description: 'Represents the code coverage activity for this group', description: 'Represents the code coverage activity for this group.',
resolver: ::Resolvers::Ci::CodeCoverageActivitiesResolver resolver: ::Resolvers::Ci::CodeCoverageActivitiesResolver
field :stats, field :stats,
::Types::GroupStatsType, ::Types::GroupStatsType,
null: true, null: true,
description: 'Group statistics', description: 'Group statistics.',
method: :itself method: :itself
end end
end end
......
...@@ -6,7 +6,7 @@ module EE ...@@ -6,7 +6,7 @@ module EE
extend ActiveSupport::Concern extend ActiveSupport::Concern
prepended do prepended do
field :weight, GraphQL::INT_TYPE, null: false, description: 'Total weight of issues collection' field :weight, GraphQL::INT_TYPE, null: false, description: 'Total weight of issues collection.'
end end
def weight def weight
......
...@@ -9,11 +9,11 @@ module EE ...@@ -9,11 +9,11 @@ module EE
field :approved, GraphQL::BOOLEAN_TYPE, method: :approved?, null: false, calls_gitaly: true, field :approved, GraphQL::BOOLEAN_TYPE, method: :approved?, null: false, calls_gitaly: true,
description: 'Indicates if the merge request has all the required approvals. Returns true if no required approvals are configured.' description: 'Indicates if the merge request has all the required approvals. Returns true if no required approvals are configured.'
field :approvals_left, GraphQL::INT_TYPE, null: true, calls_gitaly: true, field :approvals_left, GraphQL::INT_TYPE, null: true, calls_gitaly: true,
description: 'Number of approvals left' description: 'Number of approvals left.'
field :approvals_required, GraphQL::INT_TYPE, null: true, field :approvals_required, GraphQL::INT_TYPE, null: true,
description: 'Number of approvals required' description: 'Number of approvals required.'
field :merge_trains_count, GraphQL::INT_TYPE, null: true, field :merge_trains_count, GraphQL::INT_TYPE, null: true,
description: '' description: 'Number of merge requests in the merge train.'
end end
def merge_trains_count def merge_trains_count
......
...@@ -9,50 +9,50 @@ module EE ...@@ -9,50 +9,50 @@ module EE
field :additional_purchased_storage_size, field :additional_purchased_storage_size,
GraphQL::FLOAT_TYPE, GraphQL::FLOAT_TYPE,
null: true, null: true,
description: 'Additional storage purchased for the root namespace in bytes' description: 'Additional storage purchased for the root namespace in bytes.'
field :total_repository_size_excess, field :total_repository_size_excess,
GraphQL::FLOAT_TYPE, GraphQL::FLOAT_TYPE,
null: true, null: true,
description: 'Total excess repository size of all projects in the root namespace in bytes' description: 'Total excess repository size of all projects in the root namespace in bytes.'
field :total_repository_size, field :total_repository_size,
GraphQL::FLOAT_TYPE, GraphQL::FLOAT_TYPE,
null: true, null: true,
description: 'Total repository size of all projects in the root namespace in bytes' description: 'Total repository size of all projects in the root namespace in bytes.'
field :contains_locked_projects, field :contains_locked_projects,
GraphQL::BOOLEAN_TYPE, GraphQL::BOOLEAN_TYPE,
null: false, null: false,
description: 'Includes at least one project where the repository size exceeds the limit', description: 'Includes at least one project where the repository size exceeds the limit.',
method: :contains_locked_projects? method: :contains_locked_projects?
field :repository_size_excess_project_count, field :repository_size_excess_project_count,
GraphQL::INT_TYPE, GraphQL::INT_TYPE,
null: false, null: false,
description: 'Number of projects in the root namespace where the repository size exceeds the limit' description: 'Number of projects in the root namespace where the repository size exceeds the limit.'
field :actual_repository_size_limit, field :actual_repository_size_limit,
GraphQL::FLOAT_TYPE, GraphQL::FLOAT_TYPE,
null: true, null: true,
description: 'Size limit for repositories in the namespace in bytes', description: 'Size limit for repositories in the namespace in bytes.',
method: :actual_size_limit method: :actual_size_limit
field :storage_size_limit, field :storage_size_limit,
GraphQL::FLOAT_TYPE, GraphQL::FLOAT_TYPE,
null: true, null: true,
description: 'Total storage limit of the root namespace in bytes' description: 'Total storage limit of the root namespace in bytes.'
field :is_temporary_storage_increase_enabled, field :is_temporary_storage_increase_enabled,
GraphQL::BOOLEAN_TYPE, GraphQL::BOOLEAN_TYPE,
null: false, null: false,
description: 'Status of the temporary storage increase', description: 'Status of the temporary storage increase.',
method: :temporary_storage_increase_enabled? method: :temporary_storage_increase_enabled?
field :temporary_storage_increase_ends_on, field :temporary_storage_increase_ends_on,
::Types::TimeType, ::Types::TimeType,
null: true, null: true,
description: 'Date until the temporary storage increase is active' description: 'Date until the temporary storage increase is active.'
field :compliance_frameworks, field :compliance_frameworks,
::Types::ComplianceManagement::ComplianceFrameworkType.connection_type, ::Types::ComplianceManagement::ComplianceFrameworkType.connection_type,
......
...@@ -7,53 +7,53 @@ module EE ...@@ -7,53 +7,53 @@ module EE
prepended do prepended do
field :security_scanners, ::Types::SecurityScanners, null: true, field :security_scanners, ::Types::SecurityScanners, null: true,
description: 'Information about security analyzers used in the project', description: 'Information about security analyzers used in the project.',
method: :itself method: :itself
field :vulnerabilities, field :vulnerabilities,
::Types::VulnerabilityType.connection_type, ::Types::VulnerabilityType.connection_type,
null: true, null: true,
description: 'Vulnerabilities reported on the project', description: 'Vulnerabilities reported on the project.',
resolver: ::Resolvers::VulnerabilitiesResolver resolver: ::Resolvers::VulnerabilitiesResolver
field :vulnerability_scanners, field :vulnerability_scanners,
::Types::VulnerabilityScannerType.connection_type, ::Types::VulnerabilityScannerType.connection_type,
null: true, null: true,
description: 'Vulnerability scanners reported on the project vulnerabilities', description: 'Vulnerability scanners reported on the project vulnerabilities.',
resolver: ::Resolvers::Vulnerabilities::ScannersResolver resolver: ::Resolvers::Vulnerabilities::ScannersResolver
field :vulnerabilities_count_by_day, field :vulnerabilities_count_by_day,
::Types::VulnerabilitiesCountByDayType.connection_type, ::Types::VulnerabilitiesCountByDayType.connection_type,
null: true, null: true,
description: 'Number of vulnerabilities per day for the project', description: 'Number of vulnerabilities per day for the project.',
resolver: ::Resolvers::VulnerabilitiesCountPerDayResolver resolver: ::Resolvers::VulnerabilitiesCountPerDayResolver
field :vulnerability_severities_count, ::Types::VulnerabilitySeveritiesCountType, null: true, field :vulnerability_severities_count, ::Types::VulnerabilitySeveritiesCountType, null: true,
description: 'Counts for each vulnerability severity in the project', description: 'Counts for each vulnerability severity in the project.',
resolver: ::Resolvers::VulnerabilitySeveritiesCountResolver resolver: ::Resolvers::VulnerabilitySeveritiesCountResolver
field :requirement, ::Types::RequirementsManagement::RequirementType, null: true, field :requirement, ::Types::RequirementsManagement::RequirementType, null: true,
description: 'Find a single requirement', description: 'Find a single requirement.',
resolver: ::Resolvers::RequirementsManagement::RequirementsResolver.single resolver: ::Resolvers::RequirementsManagement::RequirementsResolver.single
field :requirements, ::Types::RequirementsManagement::RequirementType.connection_type, null: true, field :requirements, ::Types::RequirementsManagement::RequirementType.connection_type, null: true,
description: 'Find requirements', description: 'Find requirements.',
extras: [:lookahead], extras: [:lookahead],
resolver: ::Resolvers::RequirementsManagement::RequirementsResolver resolver: ::Resolvers::RequirementsManagement::RequirementsResolver
field :requirement_states_count, ::Types::RequirementsManagement::RequirementStatesCountType, null: true, field :requirement_states_count, ::Types::RequirementsManagement::RequirementStatesCountType, null: true,
description: 'Number of requirements for the project by their state' description: 'Number of requirements for the project by their state.'
field :compliance_frameworks, ::Types::ComplianceManagement::ComplianceFrameworkType.connection_type, field :compliance_frameworks, ::Types::ComplianceManagement::ComplianceFrameworkType.connection_type,
description: 'Compliance frameworks associated with the project', description: 'Compliance frameworks associated with the project.',
null: true null: true
field :security_dashboard_path, GraphQL::STRING_TYPE, field :security_dashboard_path, GraphQL::STRING_TYPE,
description: "Path to project's security dashboard", description: "Path to project's security dashboard.",
null: true null: true
field :iterations, ::Types::IterationType.connection_type, null: true, field :iterations, ::Types::IterationType.connection_type, null: true,
description: 'Find iterations', description: 'Find iterations.',
resolver: ::Resolvers::IterationsResolver resolver: ::Resolvers::IterationsResolver
field :dast_profiles, field :dast_profiles,
...@@ -89,43 +89,43 @@ module EE ...@@ -89,43 +89,43 @@ module EE
field :cluster_agent, field :cluster_agent,
::Types::Clusters::AgentType, ::Types::Clusters::AgentType,
null: true, null: true,
description: 'Find a single cluster agent by name', description: 'Find a single cluster agent by name.',
resolver: ::Resolvers::Clusters::AgentsResolver.single resolver: ::Resolvers::Clusters::AgentsResolver.single
field :cluster_agents, field :cluster_agents,
::Types::Clusters::AgentType.connection_type, ::Types::Clusters::AgentType.connection_type,
extras: [:lookahead], extras: [:lookahead],
null: true, null: true,
description: 'Cluster agents associated with the project', description: 'Cluster agents associated with the project.',
resolver: ::Resolvers::Clusters::AgentsResolver resolver: ::Resolvers::Clusters::AgentsResolver
field :repository_size_excess, field :repository_size_excess,
GraphQL::FLOAT_TYPE, GraphQL::FLOAT_TYPE,
null: true, null: true,
description: 'Size of repository that exceeds the limit in bytes' description: 'Size of repository that exceeds the limit in bytes.'
field :actual_repository_size_limit, field :actual_repository_size_limit,
GraphQL::FLOAT_TYPE, GraphQL::FLOAT_TYPE,
null: true, null: true,
description: 'Size limit for the repository in bytes', description: 'Size limit for the repository in bytes.',
method: :actual_size_limit method: :actual_size_limit
field :code_coverage_summary, field :code_coverage_summary,
::Types::Ci::CodeCoverageSummaryType, ::Types::Ci::CodeCoverageSummaryType,
null: true, null: true,
description: 'Code coverage summary associated with the project', description: 'Code coverage summary associated with the project.',
resolver: ::Resolvers::Ci::CodeCoverageSummaryResolver resolver: ::Resolvers::Ci::CodeCoverageSummaryResolver
field :alert_management_payload_fields, field :alert_management_payload_fields,
[::Types::AlertManagement::PayloadAlertFieldType], [::Types::AlertManagement::PayloadAlertFieldType],
null: true, null: true,
description: 'Extract alert fields from payload for custom mapping', description: 'Extract alert fields from payload for custom mapping.',
resolver: ::Resolvers::AlertManagement::PayloadAlertFieldResolver resolver: ::Resolvers::AlertManagement::PayloadAlertFieldResolver
field :incident_management_oncall_schedules, field :incident_management_oncall_schedules,
::Types::IncidentManagement::OncallScheduleType.connection_type, ::Types::IncidentManagement::OncallScheduleType.connection_type,
null: true, null: true,
description: 'Incident Management On-call schedules of the project', description: 'Incident Management On-call schedules of the project.',
resolver: ::Resolvers::IncidentManagement::OncallScheduleResolver resolver: ::Resolvers::IncidentManagement::OncallScheduleResolver
end end
......
...@@ -8,53 +8,53 @@ module EE ...@@ -8,53 +8,53 @@ module EE
prepended do prepended do
field :iteration, ::Types::IterationType, field :iteration, ::Types::IterationType,
null: true, null: true,
description: 'Find an iteration' do description: 'Find an iteration.' do
argument :id, ::Types::GlobalIDType[::Iteration], argument :id, ::Types::GlobalIDType[::Iteration],
required: true, required: true,
description: 'Find an iteration by its ID' description: 'Find an iteration by its ID.'
end end
field :vulnerabilities, field :vulnerabilities,
::Types::VulnerabilityType.connection_type, ::Types::VulnerabilityType.connection_type,
null: true, null: true,
description: "Vulnerabilities reported on projects on the current user's instance security dashboard", description: "Vulnerabilities reported on projects on the current user's instance security dashboard.",
resolver: ::Resolvers::VulnerabilitiesResolver resolver: ::Resolvers::VulnerabilitiesResolver
field :vulnerability, field :vulnerability,
::Types::VulnerabilityType, ::Types::VulnerabilityType,
null: true, null: true,
description: "Find a vulnerability" do description: "Find a vulnerability." do
argument :id, ::Types::GlobalIDType[::Vulnerability], argument :id, ::Types::GlobalIDType[::Vulnerability],
required: true, required: true,
description: 'The Global ID of the Vulnerability' description: 'The Global ID of the Vulnerability.'
end end
field :vulnerabilities_count_by_day, field :vulnerabilities_count_by_day,
::Types::VulnerabilitiesCountByDayType.connection_type, ::Types::VulnerabilitiesCountByDayType.connection_type,
null: true, null: true,
description: "Number of vulnerabilities per day for the projects on the current user's instance security dashboard", description: "Number of vulnerabilities per day for the projects on the current user's instance security dashboard.",
resolver: ::Resolvers::VulnerabilitiesCountPerDayResolver resolver: ::Resolvers::VulnerabilitiesCountPerDayResolver
field :vulnerabilities_count_by_day_and_severity, field :vulnerabilities_count_by_day_and_severity,
::Types::VulnerabilitiesCountByDayAndSeverityType.connection_type, ::Types::VulnerabilitiesCountByDayAndSeverityType.connection_type,
null: true, null: true,
description: "Number of vulnerabilities per severity level, per day, for the projects on the current user's instance security dashboard", description: "Number of vulnerabilities per severity level, per day, for the projects on the current user's instance security dashboard.",
resolver: ::Resolvers::VulnerabilitiesHistoryResolver, resolver: ::Resolvers::VulnerabilitiesHistoryResolver,
deprecated: { reason: 'Use `vulnerabilitiesCountByDay`', milestone: '13.3' } deprecated: { reason: 'Use `vulnerabilitiesCountByDay`', milestone: '13.3' }
field :geo_node, ::Types::Geo::GeoNodeType, field :geo_node, ::Types::Geo::GeoNodeType,
null: true, null: true,
resolver: ::Resolvers::Geo::GeoNodeResolver, resolver: ::Resolvers::Geo::GeoNodeResolver,
description: 'Find a Geo node' description: 'Find a Geo node.'
field :instance_security_dashboard, ::Types::InstanceSecurityDashboardType, field :instance_security_dashboard, ::Types::InstanceSecurityDashboardType,
null: true, null: true,
resolver: ::Resolvers::InstanceSecurityDashboardResolver, resolver: ::Resolvers::InstanceSecurityDashboardResolver,
description: 'Fields related to Instance Security Dashboard' description: 'Fields related to Instance Security Dashboard.'
field :devops_adoption_segments, ::Types::Admin::Analytics::DevopsAdoption::SegmentType.connection_type, field :devops_adoption_segments, ::Types::Admin::Analytics::DevopsAdoption::SegmentType.connection_type,
null: true, null: true,
description: 'Get configured DevOps adoption segments on the instance', description: 'Get configured DevOps adoption segments on the instance.',
resolver: ::Resolvers::Admin::Analytics::DevopsAdoption::SegmentsResolver resolver: ::Resolvers::Admin::Analytics::DevopsAdoption::SegmentsResolver
end end
......
...@@ -10,16 +10,16 @@ module Types ...@@ -10,16 +10,16 @@ module Types
description 'Segment' description 'Segment'
field :id, GraphQL::ID_TYPE, null: false, field :id, GraphQL::ID_TYPE, null: false,
description: "ID of the segment" description: "ID of the segment."
field :name, GraphQL::STRING_TYPE, null: false, field :name, GraphQL::STRING_TYPE, null: false,
description: 'Name of the segment' description: 'Name of the segment.'
field :groups, [Types::GroupType], null: true, field :groups, [Types::GroupType], null: true,
description: 'Assigned groups' description: 'Assigned groups.'
field :latest_snapshot, SnapshotType, null: true, field :latest_snapshot, SnapshotType, null: true,
description: 'The latest adoption metrics for the segment' description: 'The latest adoption metrics for the segment.'
def latest_snapshot def latest_snapshot
BatchLoader::GraphQL.for(object.id).batch(key: :devops_adoption_latest_snapshots) do |ids, loader, args| BatchLoader::GraphQL.for(object.id).batch(key: :devops_adoption_latest_snapshots) do |ids, loader, args|
......
...@@ -10,25 +10,25 @@ module Types ...@@ -10,25 +10,25 @@ module Types
description 'Snapshot' description 'Snapshot'
field :issue_opened, GraphQL::BOOLEAN_TYPE, null: false, field :issue_opened, GraphQL::BOOLEAN_TYPE, null: false,
description: 'At least one issue was opened' description: 'At least one issue was opened.'
field :merge_request_opened, GraphQL::BOOLEAN_TYPE, null: false, field :merge_request_opened, GraphQL::BOOLEAN_TYPE, null: false,
description: 'At least one merge request was opened' description: 'At least one merge request was opened.'
field :merge_request_approved, GraphQL::BOOLEAN_TYPE, null: false, field :merge_request_approved, GraphQL::BOOLEAN_TYPE, null: false,
description: 'At least one merge request was approved' description: 'At least one merge request was approved.'
field :runner_configured, GraphQL::BOOLEAN_TYPE, null: false, field :runner_configured, GraphQL::BOOLEAN_TYPE, null: false,
description: 'At least one runner was used' description: 'At least one runner was used.'
field :pipeline_succeeded, GraphQL::BOOLEAN_TYPE, null: false, field :pipeline_succeeded, GraphQL::BOOLEAN_TYPE, null: false,
description: 'At least one pipeline succeeded' description: 'At least one pipeline succeeded.'
field :deploy_succeeded, GraphQL::BOOLEAN_TYPE, null: false, field :deploy_succeeded, GraphQL::BOOLEAN_TYPE, null: false,
description: 'At least one deployment succeeded' description: 'At least one deployment succeeded.'
field :security_scan_succeeded, GraphQL::BOOLEAN_TYPE, null: false, field :security_scan_succeeded, GraphQL::BOOLEAN_TYPE, null: false,
description: 'At least one security scan succeeded' description: 'At least one security scan succeeded.'
field :recorded_at, Types::TimeType, null: false, field :recorded_at, Types::TimeType, null: false,
description: 'The time the snapshot was recorded' description: 'The time the snapshot was recorded.'
field :start_time, Types::TimeType, null: false, field :start_time, Types::TimeType, null: false,
description: 'The start time for the snapshot where the data points were collected' description: 'The start time for the snapshot where the data points were collected.'
field :end_time, Types::TimeType, null: false, field :end_time, Types::TimeType, null: false,
description: 'The end time for the snapshot where the data points were collected' description: 'The end time for the snapshot where the data points were collected.'
end end
end end
end end
......
...@@ -8,7 +8,7 @@ module Types ...@@ -8,7 +8,7 @@ module Types
description 'Represents an epic on an issue board' description 'Represents an epic on an issue board'
field :user_preferences, Types::Boards::EpicUserPreferencesType, null: true, field :user_preferences, Types::Boards::EpicUserPreferencesType, null: true,
description: 'User preferences for the epic on the issue board' description: 'User preferences for the epic on the issue board.'
def user_preferences def user_preferences
return unless current_user return unless current_user
......
...@@ -8,7 +8,7 @@ module Types ...@@ -8,7 +8,7 @@ module Types
description 'Represents user preferences for a board epic' description 'Represents user preferences for a board epic'
field :collapsed, GraphQL::BOOLEAN_TYPE, null: false, field :collapsed, GraphQL::BOOLEAN_TYPE, null: false,
description: 'Indicates epic should be displayed as collapsed' description: 'Indicates epic should be displayed as collapsed.'
end end
# rubocop: enable Graphql/AuthorizeTypes # rubocop: enable Graphql/AuthorizeTypes
end end
......
...@@ -7,18 +7,18 @@ module Types ...@@ -7,18 +7,18 @@ module Types
description 'Represents the total number of issues and their weights for a particular day' description 'Represents the total number of issues and their weights for a particular day'
field :date, GraphQL::Types::ISO8601Date, null: false, field :date, GraphQL::Types::ISO8601Date, null: false,
description: 'Date for burnup totals' description: 'Date for burnup totals.'
field :scope_count, GraphQL::INT_TYPE, null: false, field :scope_count, GraphQL::INT_TYPE, null: false,
description: 'Number of issues as of this day' description: 'Number of issues as of this day.'
field :scope_weight, GraphQL::INT_TYPE, null: false, field :scope_weight, GraphQL::INT_TYPE, null: false,
description: 'Total weight of issues as of this day' description: 'Total weight of issues as of this day.'
field :completed_count, GraphQL::INT_TYPE, null: false, field :completed_count, GraphQL::INT_TYPE, null: false,
description: 'Number of closed issues as of this day' description: 'Number of closed issues as of this day.'
field :completed_weight, GraphQL::INT_TYPE, null: false, field :completed_weight, GraphQL::INT_TYPE, null: false,
description: 'Total weight of closed issues as of this day' description: 'Total weight of closed issues as of this day.'
end end
end end
...@@ -11,18 +11,18 @@ module Types ...@@ -11,18 +11,18 @@ module Types
field :cluster_agent, field :cluster_agent,
Types::Clusters::AgentType, Types::Clusters::AgentType,
description: 'Cluster agent this token is associated with', description: 'Cluster agent this token is associated with.',
null: true null: true
field :created_at, field :created_at,
Types::TimeType, Types::TimeType,
null: true, null: true,
description: 'Timestamp the token was created' description: 'Timestamp the token was created.'
field :id, field :id,
::Types::GlobalIDType[::Clusters::AgentToken], ::Types::GlobalIDType[::Clusters::AgentToken],
null: false, null: false,
description: 'Global ID of the token' description: 'Global ID of the token.'
def cluster_agent def cluster_agent
Gitlab::Graphql::Loaders::BatchModelLoader.new(::Clusters::Agent, object.agent_id).find Gitlab::Graphql::Loaders::BatchModelLoader.new(::Clusters::Agent, object.agent_id).find
......
...@@ -12,31 +12,31 @@ module Types ...@@ -12,31 +12,31 @@ module Types
field :created_at, field :created_at,
Types::TimeType, Types::TimeType,
null: true, null: true,
description: 'Timestamp the cluster agent was created' description: 'Timestamp the cluster agent was created.'
field :id, GraphQL::ID_TYPE, field :id, GraphQL::ID_TYPE,
null: false, null: false,
description: 'ID of the cluster agent' description: 'ID of the cluster agent.'
field :name, field :name,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
null: true, null: true,
description: 'Name of the cluster agent' description: 'Name of the cluster agent.'
field :project, Types::ProjectType, field :project, Types::ProjectType,
description: 'The project this cluster agent is associated with', description: 'The project this cluster agent is associated with.',
null: true, null: true,
authorize: :read_project authorize: :read_project
field :tokens, Types::Clusters::AgentTokenType.connection_type, field :tokens, Types::Clusters::AgentTokenType.connection_type,
description: 'Tokens associated with the cluster agent', description: 'Tokens associated with the cluster agent.',
null: true, null: true,
resolver: ::Resolvers::Clusters::AgentTokensResolver resolver: ::Resolvers::Clusters::AgentTokensResolver
field :updated_at, field :updated_at,
Types::TimeType, Types::TimeType,
null: true, null: true,
description: 'Timestamp the cluster agent was updated' description: 'Timestamp the cluster agent was updated.'
def project def project
Gitlab::Graphql::Loaders::BatchModelLoader.new(Project, object.project_id).find Gitlab::Graphql::Loaders::BatchModelLoader.new(Project, object.project_id).find
......
...@@ -9,19 +9,19 @@ module Types ...@@ -9,19 +9,19 @@ module Types
field :id, GraphQL::ID_TYPE, field :id, GraphQL::ID_TYPE,
null: false, null: false,
description: 'Compliance framework ID' description: 'Compliance framework ID.'
field :name, GraphQL::STRING_TYPE, field :name, GraphQL::STRING_TYPE,
null: false, null: false,
description: 'Name of the compliance framework' description: 'Name of the compliance framework.'
field :description, GraphQL::STRING_TYPE, field :description, GraphQL::STRING_TYPE,
null: false, null: false,
description: 'Description of the compliance framework' description: 'Description of the compliance framework.'
field :color, GraphQL::STRING_TYPE, field :color, GraphQL::STRING_TYPE,
null: false, null: false,
description: 'Hexadecimal representation of compliance framework\'s label color' description: 'Hexadecimal representation of compliance framework\'s label color.'
field :pipeline_configuration_full_path, GraphQL::STRING_TYPE, field :pipeline_configuration_full_path, GraphQL::STRING_TYPE,
null: true, null: true,
......
...@@ -8,22 +8,22 @@ module Types ...@@ -8,22 +8,22 @@ module Types
authorize :read_on_demand_scans authorize :read_on_demand_scans
field :id, ::Types::GlobalIDType[::DastScannerProfile], null: false, field :id, ::Types::GlobalIDType[::DastScannerProfile], null: false,
description: 'ID of the DAST scanner profile' description: 'ID of the DAST scanner profile.'
field :global_id, ::Types::GlobalIDType[::DastScannerProfile], null: false, field :global_id, ::Types::GlobalIDType[::DastScannerProfile], null: false,
description: 'ID of the DAST scanner profile', description: 'ID of the DAST scanner profile.',
deprecated: { reason: 'Use `id`', milestone: '13.6' }, deprecated: { reason: 'Use `id`', milestone: '13.6' },
method: :id method: :id
field :profile_name, GraphQL::STRING_TYPE, null: true, field :profile_name, GraphQL::STRING_TYPE, null: true,
description: 'Name of the DAST scanner profile', description: 'Name of the DAST scanner profile.',
method: :name method: :name
field :spider_timeout, GraphQL::INT_TYPE, null: true, field :spider_timeout, GraphQL::INT_TYPE, null: true,
description: 'The maximum number of minutes allowed for the spider to traverse the site' description: 'The maximum number of minutes allowed for the spider to traverse the site.'
field :target_timeout, GraphQL::INT_TYPE, null: true, field :target_timeout, GraphQL::INT_TYPE, null: true,
description: 'The maximum number of seconds allowed for the site under test to respond to a request' description: 'The maximum number of seconds allowed for the site under test to respond to a request.'
field :scan_type, Types::DastScanTypeEnum, null: true, field :scan_type, Types::DastScanTypeEnum, null: true,
description: 'Indicates the type of DAST scan that will run. ' \ description: 'Indicates the type of DAST scan that will run. ' \
...@@ -38,7 +38,7 @@ module Types ...@@ -38,7 +38,7 @@ module Types
'True to include the debug messages.' 'True to include the debug messages.'
field :edit_path, GraphQL::STRING_TYPE, null: true, field :edit_path, GraphQL::STRING_TYPE, null: true,
description: 'Relative web path to the edit page of a scanner profile' description: 'Relative web path to the edit page of a scanner profile.'
def edit_path def edit_path
Rails.application.routes.url_helpers.edit_project_security_configuration_dast_profiles_dast_scanner_profile_path(object.project, object) Rails.application.routes.url_helpers.edit_project_security_configuration_dast_profiles_dast_scanner_profile_path(object.project, object)
......
...@@ -10,24 +10,24 @@ module Types ...@@ -10,24 +10,24 @@ module Types
expose_permissions Types::PermissionTypes::DastSiteProfile expose_permissions Types::PermissionTypes::DastSiteProfile
field :id, ::Types::GlobalIDType[::DastSiteProfile], null: false, field :id, ::Types::GlobalIDType[::DastSiteProfile], null: false,
description: 'ID of the site profile' description: 'ID of the site profile.'
field :profile_name, GraphQL::STRING_TYPE, null: true, field :profile_name, GraphQL::STRING_TYPE, null: true,
description: 'The name of the site profile', description: 'The name of the site profile.',
method: :name method: :name
field :target_url, GraphQL::STRING_TYPE, null: true, field :target_url, GraphQL::STRING_TYPE, null: true,
description: 'The URL of the target to be scanned' description: 'The URL of the target to be scanned.'
field :edit_path, GraphQL::STRING_TYPE, null: true, field :edit_path, GraphQL::STRING_TYPE, null: true,
description: 'Relative web path to the edit page of a site profile' description: 'Relative web path to the edit page of a site profile.'
field :validation_status, Types::DastSiteProfileValidationStatusEnum, null: true, field :validation_status, Types::DastSiteProfileValidationStatusEnum, null: true,
description: 'The current validation status of the site profile', description: 'The current validation status of the site profile.',
method: :status method: :status
field :normalized_target_url, GraphQL::STRING_TYPE, null: true, field :normalized_target_url, GraphQL::STRING_TYPE, null: true,
description: 'Normalized URL of the target to be scanned' description: 'Normalized URL of the target to be scanned.'
def target_url def target_url
object.dast_site.url object.dast_site.url
......
...@@ -8,14 +8,14 @@ module Types ...@@ -8,14 +8,14 @@ module Types
authorize :read_on_demand_scans authorize :read_on_demand_scans
field :id, ::Types::GlobalIDType[::DastSiteValidation], null: false, field :id, ::Types::GlobalIDType[::DastSiteValidation], null: false,
description: 'Global ID of the site validation' description: 'Global ID of the site validation.'
field :status, Types::DastSiteProfileValidationStatusEnum, null: false, field :status, Types::DastSiteProfileValidationStatusEnum, null: false,
description: 'Status of the site validation', description: 'Status of the site validation.',
method: :state method: :state
field :normalized_target_url, GraphQL::STRING_TYPE, null: true, field :normalized_target_url, GraphQL::STRING_TYPE, null: true,
description: 'Normalized URL of the target to be validated' description: 'Normalized URL of the target to be validated.'
def normalized_target_url def normalized_target_url
object.url_base object.url_base
......
...@@ -6,10 +6,10 @@ module Types ...@@ -6,10 +6,10 @@ module Types
graphql_name 'EpicDescendantCount' graphql_name 'EpicDescendantCount'
description 'Counts of descendent epics' description 'Counts of descendent epics'
field :opened_epics, GraphQL::INT_TYPE, null: true, description: 'Number of opened child epics' field :opened_epics, GraphQL::INT_TYPE, null: true, description: 'Number of opened child epics.'
field :closed_epics, GraphQL::INT_TYPE, null: true, description: 'Number of closed child epics' field :closed_epics, GraphQL::INT_TYPE, null: true, description: 'Number of closed child epics.'
field :opened_issues, GraphQL::INT_TYPE, null: true, description: 'Number of opened epic issues' field :opened_issues, GraphQL::INT_TYPE, null: true, description: 'Number of opened epic issues.'
field :closed_issues, GraphQL::INT_TYPE, null: true, description: 'Number of closed epic issues' field :closed_issues, GraphQL::INT_TYPE, null: true, description: 'Number of closed epic issues.'
end end
# rubocop: enable Graphql/AuthorizeTypes # rubocop: enable Graphql/AuthorizeTypes
end end
...@@ -7,9 +7,9 @@ module Types ...@@ -7,9 +7,9 @@ module Types
description 'Total weight of open and closed descendant issues' description 'Total weight of open and closed descendant issues'
field :opened_issues, GraphQL::INT_TYPE, null: true, field :opened_issues, GraphQL::INT_TYPE, null: true,
description: 'Total weight of opened issues in this epic, including epic descendants' description: 'Total weight of opened issues in this epic, including epic descendants.'
field :closed_issues, GraphQL::INT_TYPE, null: true, field :closed_issues, GraphQL::INT_TYPE, null: true,
description: 'Total weight of completed (closed) issues in this epic, including epic descendants' description: 'Total weight of completed (closed) issues in this epic, including epic descendants.'
end end
# rubocop: enable Graphql/AuthorizeTypes # rubocop: enable Graphql/AuthorizeTypes
end end
...@@ -6,9 +6,9 @@ module Types ...@@ -6,9 +6,9 @@ module Types
graphql_name 'EpicHealthStatus' graphql_name 'EpicHealthStatus'
description 'Health status of child issues' description 'Health status of child issues'
field :issues_on_track, GraphQL::INT_TYPE, null: true, description: 'Number of issues on track' field :issues_on_track, GraphQL::INT_TYPE, null: true, description: 'Number of issues on track.'
field :issues_needing_attention, GraphQL::INT_TYPE, null: true, description: 'Number of issues that need attention' field :issues_needing_attention, GraphQL::INT_TYPE, null: true, description: 'Number of issues that need attention.'
field :issues_at_risk, GraphQL::INT_TYPE, null: true, description: 'Number of issues at risk' field :issues_at_risk, GraphQL::INT_TYPE, null: true, description: 'Number of issues at risk.'
end end
# rubocop: enable Graphql/AuthorizeTypes # rubocop: enable Graphql/AuthorizeTypes
end end
...@@ -10,13 +10,13 @@ module Types ...@@ -10,13 +10,13 @@ module Types
present_using EpicIssuePresenter present_using EpicIssuePresenter
field :epic_issue_id, GraphQL::ID_TYPE, null: false, field :epic_issue_id, GraphQL::ID_TYPE, null: false,
description: 'ID of the epic-issue relation' description: 'ID of the epic-issue relation.'
field :relation_path, GraphQL::STRING_TYPE, null: true, field :relation_path, GraphQL::STRING_TYPE, null: true,
description: 'URI path of the epic-issue relation' description: 'URI path of the epic-issue relation.'
field :id, GraphQL::ID_TYPE, null: true, field :id, GraphQL::ID_TYPE, null: true,
description: 'Global ID of the epic-issue relation' description: 'Global ID of the epic-issue relation.'
def epic_issue_id def epic_issue_id
"gid://gitlab/EpicIssue/#{object.epic_issue_id}" "gid://gitlab/EpicIssue/#{object.epic_issue_id}"
......
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