Commit e61d55ec authored by Kamil Trzciński's avatar Kamil Trzciński

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

Fix Graphql/Descriptions EE types offenses

See merge request gitlab-org/gitlab!53674
parents a67e8bb4 d0085211
......@@ -693,37 +693,6 @@ RSpec/TimecopTravel:
Graphql/Descriptions:
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/external_issue_type.rb'
- 'ee/app/graphql/types/geo/geo_node_type.rb'
......
This diff is collapsed.
......@@ -7,19 +7,19 @@ module EE
prepended do
field :milestone, ::Types::MilestoneType, null: true,
description: 'Milestone of the list'
description: 'Milestone of the list.'
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,
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,
description: 'Maximum weight of issues in the list'
description: 'Maximum weight of issues in the list.'
field :assignee, ::Types::UserType, null: true,
description: 'Assignee in the list'
description: 'Assignee in the list.'
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,
description: 'Total weight of all issues in the list'
description: 'Total weight of all issues in the list.'
def milestone
::Gitlab::Graphql::Loaders::BatchModelLoader.new(::Milestone, object.milestone_id).find
......
......@@ -7,24 +7,24 @@ module EE
prepended do
field :assignee, type: ::Types::UserType, null: true,
description: 'The board assignee'
description: 'The board assignee.'
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,
complexity: 5
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,
description: 'The board milestone'
description: 'The board milestone.'
field :iteration, type: ::Types::IterationType, null: true,
description: 'The board iteration.'
field :weight, type: GraphQL::INT_TYPE, null: true,
description: 'Weight of the board'
description: 'Weight of the board.'
end
end
end
......
......@@ -9,15 +9,15 @@ module EE
prepended do
argument :epic_id, ::Types::GlobalIDType[::Epic],
required: false,
description: 'Filter by epic ID. Incompatible with epicWildcardId'
description: 'Filter by epic ID. Incompatible with epicWildcardId.'
argument :iteration_title, GraphQL::STRING_TYPE,
required: false,
description: 'Filter by iteration title'
description: 'Filter by iteration title.'
argument :weight, GraphQL::STRING_TYPE,
required: false,
description: 'Filter by weight'
description: 'Filter by weight.'
end
end
end
......
......@@ -10,11 +10,11 @@ module EE
# NONE/ANY epic filter can not be negated
argument :epic_wildcard_id, ::Types::Boards::EpicWildcardIdEnum,
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,
required: false,
description: 'Filter by iteration ID wildcard'
description: 'Filter by iteration ID wildcard.'
end
end
end
......
......@@ -11,7 +11,7 @@ module EE
::Types::SecurityReportSummaryType,
null: true,
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
end
end
......
......@@ -16,31 +16,31 @@ module EE
end
field :epic, ::Types::EpicType, null: true,
description: 'Find a single epic',
description: 'Find a single epic.',
resolver: ::Resolvers::EpicsResolver.single
field :epics, ::Types::EpicType.connection_type, null: true,
description: 'Find epics',
description: 'Find epics.',
extras: [:lookahead],
max_page_size: 2000,
resolver: ::Resolvers::EpicsResolver
field :epic_board,
::Types::Boards::EpicBoardType, null: true,
description: 'Find a single epic board',
description: 'Find a single epic board.',
resolver: ::Resolvers::Boards::EpicBoardsResolver.single
field :epic_boards,
::Types::Boards::EpicBoardType.connection_type, null: true,
description: 'Find epic boards',
description: 'Find epic boards.',
resolver: ::Resolvers::Boards::EpicBoardsResolver
field :iterations, ::Types::IterationType.connection_type, null: true,
description: 'Find iterations',
description: 'Find iterations.',
resolver: ::Resolvers::IterationsResolver
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],
complexity: 5,
resolver: ::Resolvers::TimelogResolver
......@@ -48,48 +48,48 @@ module EE
field :vulnerabilities,
::Types::VulnerabilityType.connection_type,
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
field :vulnerability_scanners,
::Types::VulnerabilityScannerType.connection_type,
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
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
field :vulnerabilities_count_by_day,
::Types::VulnerabilitiesCountByDayType.connection_type,
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
field :vulnerabilities_count_by_day_and_severity,
::Types::VulnerabilitiesCountByDayAndSeverityType.connection_type,
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,
deprecated: { reason: 'Use `vulnerabilitiesCountByDay`', milestone: '13.3' }
field :vulnerability_grades,
[::Types::VulnerableProjectsByGradeType],
null: false,
description: 'Represents vulnerable project counts for each grade',
description: 'Represents vulnerable project counts for each grade.',
resolver: ::Resolvers::VulnerabilitiesGradeResolver
field :code_coverage_activities,
::Types::Ci::CodeCoverageActivityType.connection_type,
null: true,
description: 'Represents the code coverage activity for this group',
description: 'Represents the code coverage activity for this group.',
resolver: ::Resolvers::Ci::CodeCoverageActivitiesResolver
field :stats,
::Types::GroupStatsType,
null: true,
description: 'Group statistics',
description: 'Group statistics.',
method: :itself
end
end
......
......@@ -6,7 +6,7 @@ module EE
extend ActiveSupport::Concern
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
def weight
......
......@@ -9,11 +9,11 @@ module EE
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.'
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,
description: 'Number of approvals required'
description: 'Number of approvals required.'
field :merge_trains_count, GraphQL::INT_TYPE, null: true,
description: ''
description: 'Number of merge requests in the merge train.'
end
def merge_trains_count
......
......@@ -9,50 +9,50 @@ module EE
field :additional_purchased_storage_size,
GraphQL::FLOAT_TYPE,
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,
GraphQL::FLOAT_TYPE,
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,
GraphQL::FLOAT_TYPE,
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,
GraphQL::BOOLEAN_TYPE,
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?
field :repository_size_excess_project_count,
GraphQL::INT_TYPE,
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,
GraphQL::FLOAT_TYPE,
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
field :storage_size_limit,
GraphQL::FLOAT_TYPE,
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,
GraphQL::BOOLEAN_TYPE,
null: false,
description: 'Status of the temporary storage increase',
description: 'Status of the temporary storage increase.',
method: :temporary_storage_increase_enabled?
field :temporary_storage_increase_ends_on,
::Types::TimeType,
null: true,
description: 'Date until the temporary storage increase is active'
description: 'Date until the temporary storage increase is active.'
field :compliance_frameworks,
::Types::ComplianceManagement::ComplianceFrameworkType.connection_type,
......
......@@ -7,53 +7,53 @@ module EE
prepended do
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
field :vulnerabilities,
::Types::VulnerabilityType.connection_type,
null: true,
description: 'Vulnerabilities reported on the project',
description: 'Vulnerabilities reported on the project.',
resolver: ::Resolvers::VulnerabilitiesResolver
field :vulnerability_scanners,
::Types::VulnerabilityScannerType.connection_type,
null: true,
description: 'Vulnerability scanners reported on the project vulnerabilities',
description: 'Vulnerability scanners reported on the project vulnerabilities.',
resolver: ::Resolvers::Vulnerabilities::ScannersResolver
field :vulnerabilities_count_by_day,
::Types::VulnerabilitiesCountByDayType.connection_type,
null: true,
description: 'Number of vulnerabilities per day for the project',
description: 'Number of vulnerabilities per day for the project.',
resolver: ::Resolvers::VulnerabilitiesCountPerDayResolver
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
field :requirement, ::Types::RequirementsManagement::RequirementType, null: true,
description: 'Find a single requirement',
description: 'Find a single requirement.',
resolver: ::Resolvers::RequirementsManagement::RequirementsResolver.single
field :requirements, ::Types::RequirementsManagement::RequirementType.connection_type, null: true,
description: 'Find requirements',
description: 'Find requirements.',
extras: [:lookahead],
resolver: ::Resolvers::RequirementsManagement::RequirementsResolver
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,
description: 'Compliance frameworks associated with the project',
description: 'Compliance frameworks associated with the project.',
null: true
field :security_dashboard_path, GraphQL::STRING_TYPE,
description: "Path to project's security dashboard",
description: "Path to project's security dashboard.",
null: true
field :iterations, ::Types::IterationType.connection_type, null: true,
description: 'Find iterations',
description: 'Find iterations.',
resolver: ::Resolvers::IterationsResolver
field :dast_profiles,
......@@ -89,43 +89,43 @@ module EE
field :cluster_agent,
::Types::Clusters::AgentType,
null: true,
description: 'Find a single cluster agent by name',
description: 'Find a single cluster agent by name.',
resolver: ::Resolvers::Clusters::AgentsResolver.single
field :cluster_agents,
::Types::Clusters::AgentType.connection_type,
extras: [:lookahead],
null: true,
description: 'Cluster agents associated with the project',
description: 'Cluster agents associated with the project.',
resolver: ::Resolvers::Clusters::AgentsResolver
field :repository_size_excess,
GraphQL::FLOAT_TYPE,
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,
GraphQL::FLOAT_TYPE,
null: true,
description: 'Size limit for the repository in bytes',
description: 'Size limit for the repository in bytes.',
method: :actual_size_limit
field :code_coverage_summary,
::Types::Ci::CodeCoverageSummaryType,
null: true,
description: 'Code coverage summary associated with the project',
description: 'Code coverage summary associated with the project.',
resolver: ::Resolvers::Ci::CodeCoverageSummaryResolver
field :alert_management_payload_fields,
[::Types::AlertManagement::PayloadAlertFieldType],
null: true,
description: 'Extract alert fields from payload for custom mapping',
description: 'Extract alert fields from payload for custom mapping.',
resolver: ::Resolvers::AlertManagement::PayloadAlertFieldResolver
field :incident_management_oncall_schedules,
::Types::IncidentManagement::OncallScheduleType.connection_type,
null: true,
description: 'Incident Management On-call schedules of the project',
description: 'Incident Management On-call schedules of the project.',
resolver: ::Resolvers::IncidentManagement::OncallScheduleResolver
field :api_fuzzing_ci_configuration,
......
......@@ -8,53 +8,53 @@ module EE
prepended do
field :iteration, ::Types::IterationType,
null: true,
description: 'Find an iteration' do
description: 'Find an iteration.' do
argument :id, ::Types::GlobalIDType[::Iteration],
required: true,
description: 'Find an iteration by its ID'
description: 'Find an iteration by its ID.'
end
field :vulnerabilities,
::Types::VulnerabilityType.connection_type,
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
field :vulnerability,
::Types::VulnerabilityType,
null: true,
description: "Find a vulnerability" do
description: "Find a vulnerability." do
argument :id, ::Types::GlobalIDType[::Vulnerability],
required: true,
description: 'The Global ID of the Vulnerability'
description: 'The Global ID of the Vulnerability.'
end
field :vulnerabilities_count_by_day,
::Types::VulnerabilitiesCountByDayType.connection_type,
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
field :vulnerabilities_count_by_day_and_severity,
::Types::VulnerabilitiesCountByDayAndSeverityType.connection_type,
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,
deprecated: { reason: 'Use `vulnerabilitiesCountByDay`', milestone: '13.3' }
field :geo_node, ::Types::Geo::GeoNodeType,
null: true,
resolver: ::Resolvers::Geo::GeoNodeResolver,
description: 'Find a Geo node'
description: 'Find a Geo node.'
field :instance_security_dashboard, ::Types::InstanceSecurityDashboardType,
null: true,
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,
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
end
......
......@@ -10,16 +10,16 @@ module Types
description 'Segment'
field :id, GraphQL::ID_TYPE, null: false,
description: "ID of the segment"
description: "ID of the segment."
field :name, GraphQL::STRING_TYPE, null: false,
description: 'Name of the segment'
description: 'Name of the segment.'
field :groups, [Types::GroupType], null: true,
description: 'Assigned groups'
description: 'Assigned groups.'
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
BatchLoader::GraphQL.for(object.id).batch(key: :devops_adoption_latest_snapshots) do |ids, loader, args|
......
......@@ -10,25 +10,25 @@ module Types
description 'Snapshot'
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,
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,
description: 'At least one merge request was approved'
description: 'At least one merge request was approved.'
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,
description: 'At least one pipeline succeeded'
description: 'At least one pipeline succeeded.'
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,
description: 'At least one security scan succeeded'
description: 'At least one security scan succeeded.'
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,
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,
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
......
......@@ -8,7 +8,7 @@ module Types
description 'Represents an epic on an issue board'
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
return unless current_user
......
......@@ -8,7 +8,7 @@ module Types
description 'Represents user preferences for a board epic'
field :collapsed, GraphQL::BOOLEAN_TYPE, null: false,
description: 'Indicates epic should be displayed as collapsed'
description: 'Indicates epic should be displayed as collapsed.'
end
# rubocop: enable Graphql/AuthorizeTypes
end
......
......@@ -7,18 +7,18 @@ module Types
description 'Represents the total number of issues and their weights for a particular day'
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,
description: 'Number of issues as of this day'
description: 'Number of issues as of this day.'
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,
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,
description: 'Total weight of closed issues as of this day'
description: 'Total weight of closed issues as of this day.'
end
end
......@@ -11,18 +11,18 @@ module Types
field :cluster_agent,
Types::Clusters::AgentType,
description: 'Cluster agent this token is associated with',
description: 'Cluster agent this token is associated with.',
null: true
field :created_at,
Types::TimeType,
null: true,
description: 'Timestamp the token was created'
description: 'Timestamp the token was created.'
field :id,
::Types::GlobalIDType[::Clusters::AgentToken],
null: false,
description: 'Global ID of the token'
description: 'Global ID of the token.'
def cluster_agent
Gitlab::Graphql::Loaders::BatchModelLoader.new(::Clusters::Agent, object.agent_id).find
......
......@@ -12,31 +12,31 @@ module Types
field :created_at,
Types::TimeType,
null: true,
description: 'Timestamp the cluster agent was created'
description: 'Timestamp the cluster agent was created.'
field :id, GraphQL::ID_TYPE,
null: false,
description: 'ID of the cluster agent'
description: 'ID of the cluster agent.'
field :name,
GraphQL::STRING_TYPE,
null: true,
description: 'Name of the cluster agent'
description: 'Name of the cluster agent.'
field :project, Types::ProjectType,
description: 'The project this cluster agent is associated with',
description: 'The project this cluster agent is associated with.',
null: true,
authorize: :read_project
field :tokens, Types::Clusters::AgentTokenType.connection_type,
description: 'Tokens associated with the cluster agent',
description: 'Tokens associated with the cluster agent.',
null: true,
resolver: ::Resolvers::Clusters::AgentTokensResolver
field :updated_at,
Types::TimeType,
null: true,
description: 'Timestamp the cluster agent was updated'
description: 'Timestamp the cluster agent was updated.'
def project
Gitlab::Graphql::Loaders::BatchModelLoader.new(Project, object.project_id).find
......
......@@ -9,19 +9,19 @@ module Types
field :id, GraphQL::ID_TYPE,
null: false,
description: 'Compliance framework ID'
description: 'Compliance framework ID.'
field :name, GraphQL::STRING_TYPE,
null: false,
description: 'Name of the compliance framework'
description: 'Name of the compliance framework.'
field :description, GraphQL::STRING_TYPE,
null: false,
description: 'Description of the compliance framework'
description: 'Description of the compliance framework.'
field :color, GraphQL::STRING_TYPE,
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,
null: true,
......
......@@ -8,22 +8,22 @@ module Types
authorize :read_on_demand_scans
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,
description: 'ID of the DAST scanner profile',
description: 'ID of the DAST scanner profile.',
deprecated: { reason: 'Use `id`', milestone: '13.6' },
method: :id
field :profile_name, GraphQL::STRING_TYPE, null: true,
description: 'Name of the DAST scanner profile',
description: 'Name of the DAST scanner profile.',
method: :name
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,
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,
description: 'Indicates the type of DAST scan that will run. ' \
......@@ -38,7 +38,7 @@ module Types
'True to include the debug messages.'
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
Rails.application.routes.url_helpers.edit_project_security_configuration_dast_profiles_dast_scanner_profile_path(object.project, object)
......
......@@ -10,24 +10,24 @@ module Types
expose_permissions Types::PermissionTypes::DastSiteProfile
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,
description: 'The name of the site profile',
description: 'The name of the site profile.',
method: :name
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,
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,
description: 'The current validation status of the site profile',
description: 'The current validation status of the site profile.',
method: :status
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
object.dast_site.url
......
......@@ -8,14 +8,14 @@ module Types
authorize :read_on_demand_scans
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,
description: 'Status of the site validation',
description: 'Status of the site validation.',
method: :state
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
object.url_base
......
......@@ -6,10 +6,10 @@ module Types
graphql_name 'EpicDescendantCount'
description 'Counts of descendent 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 :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 :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 :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.'
end
# rubocop: enable Graphql/AuthorizeTypes
end
......@@ -7,9 +7,9 @@ module Types
description 'Total weight of open and closed descendant issues'
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,
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
# rubocop: enable Graphql/AuthorizeTypes
end
......@@ -6,9 +6,9 @@ module Types
graphql_name 'EpicHealthStatus'
description 'Health status of child issues'
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_at_risk, GraphQL::INT_TYPE, null: true, description: 'Number of issues at risk'
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_at_risk, GraphQL::INT_TYPE, null: true, description: 'Number of issues at risk.'
end
# rubocop: enable Graphql/AuthorizeTypes
end
......@@ -10,13 +10,13 @@ module Types
present_using EpicIssuePresenter
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,
description: 'URI path of the epic-issue relation'
description: 'URI path of the epic-issue relation.'
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
"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