Commit a78622c9 authored by Jarka Košanová's avatar Jarka Košanová

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

Fix half of the Graphql/Descriptions FOSS types offenses [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!52035
parents 116f3515 fab4f707
......@@ -750,66 +750,6 @@ RSpec/TimecopTravel:
Graphql/Descriptions:
Exclude:
- 'app/graphql/types/access_level_type.rb'
- 'app/graphql/types/admin/analytics/instance_statistics/measurement_type.rb'
- 'app/graphql/types/admin/sidekiq_queues/delete_jobs_response_type.rb'
- 'app/graphql/types/alert_management/alert_status_counts_type.rb'
- 'app/graphql/types/alert_management/alert_type.rb'
- 'app/graphql/types/alert_management/integration_type.rb'
- 'app/graphql/types/award_emojis/award_emoji_type.rb'
- 'app/graphql/types/board_list_type.rb'
- 'app/graphql/types/board_type.rb'
- 'app/graphql/types/boards/board_issue_input_base_type.rb'
- 'app/graphql/types/boards/board_issue_input_type.rb'
- 'app/graphql/types/branch_type.rb'
- 'app/graphql/types/ci/analytics_type.rb'
- 'app/graphql/types/ci/config/config_type.rb'
- 'app/graphql/types/ci/config/group_type.rb'
- 'app/graphql/types/ci/config/job_type.rb'
- 'app/graphql/types/ci/config/need_type.rb'
- 'app/graphql/types/ci/config/stage_type.rb'
- 'app/graphql/types/ci/detailed_status_type.rb'
- 'app/graphql/types/ci/group_type.rb'
- 'app/graphql/types/ci/job_artifact_type.rb'
- 'app/graphql/types/ci/job_type.rb'
- 'app/graphql/types/ci/pipeline_type.rb'
- 'app/graphql/types/ci/runner_architecture_type.rb'
- 'app/graphql/types/ci/runner_platform_type.rb'
- 'app/graphql/types/ci/runner_setup_type.rb'
- 'app/graphql/types/ci/stage_type.rb'
- 'app/graphql/types/ci/status_action_type.rb'
- 'app/graphql/types/commit_action_type.rb'
- 'app/graphql/types/commit_type.rb'
- 'app/graphql/types/container_expiration_policy_type.rb'
- 'app/graphql/types/container_repository_details_type.rb'
- 'app/graphql/types/container_repository_type.rb'
- 'app/graphql/types/countable_connection_type.rb'
- 'app/graphql/types/current_user_todos.rb'
- 'app/graphql/types/custom_emoji_type.rb'
- 'app/graphql/types/design_management/design_at_version_type.rb'
- 'app/graphql/types/design_management/design_collection_type.rb'
- 'app/graphql/types/design_management/design_fields.rb'
- 'app/graphql/types/design_management/design_type.rb'
- 'app/graphql/types/design_management/version_type.rb'
- 'app/graphql/types/design_management_type.rb'
- 'app/graphql/types/diff_paths_input_type.rb'
- 'app/graphql/types/diff_refs_type.rb'
- 'app/graphql/types/diff_stats_summary_type.rb'
- 'app/graphql/types/diff_stats_type.rb'
- 'app/graphql/types/environment_type.rb'
- 'app/graphql/types/error_tracking/sentry_detailed_error_type.rb'
- 'app/graphql/types/error_tracking/sentry_error_collection_type.rb'
- 'app/graphql/types/error_tracking/sentry_error_frequency_type.rb'
- 'app/graphql/types/error_tracking/sentry_error_stack_trace_context_type.rb'
- 'app/graphql/types/error_tracking/sentry_error_stack_trace_entry_type.rb'
- 'app/graphql/types/error_tracking/sentry_error_stack_trace_type.rb'
- 'app/graphql/types/error_tracking/sentry_error_tags_type.rb'
- 'app/graphql/types/error_tracking/sentry_error_type.rb'
- 'app/graphql/types/evidence_type.rb'
- 'app/graphql/types/grafana_integration_type.rb'
- 'app/graphql/types/group_invitation_type.rb'
- 'app/graphql/types/group_member_type.rb'
- 'app/graphql/types/group_type.rb'
- 'app/graphql/types/invitation_interface.rb'
- 'app/graphql/types/issue_type.rb'
- 'app/graphql/types/jira_import_type.rb'
......
......@@ -7,11 +7,11 @@ module Types
description 'Represents the access level of a relationship between a User and object that it is related to'
field :integer_value, GraphQL::INT_TYPE, null: true,
description: 'Integer representation of access level',
description: 'Integer representation of access level.',
method: :to_i
field :string_value, Types::AccessLevelEnum, null: true,
description: 'String representation of access level',
description: 'String representation of access level.',
method: :to_i
end
end
......@@ -12,13 +12,13 @@ module Types
authorize :read_instance_statistics_measurements
field :recorded_at, Types::TimeType, null: true,
description: 'The time the measurement was recorded'
description: 'The time the measurement was recorded.'
field :count, GraphQL::INT_TYPE, null: false,
description: 'Object count'
description: 'Object count.'
field :identifier, Types::Admin::Analytics::InstanceStatistics::MeasurementIdentifierEnum, null: false,
description: 'The type of objects being measured'
description: 'The type of objects being measured.'
end
end
end
......
......@@ -12,17 +12,17 @@ module Types
field :completed,
GraphQL::BOOLEAN_TYPE,
null: true,
description: 'Whether or not the entire queue was processed in time; if not, retrying the same request is safe'
description: 'Whether or not the entire queue was processed in time; if not, retrying the same request is safe.'
field :deleted_jobs,
GraphQL::INT_TYPE,
null: true,
description: 'The number of matching jobs deleted'
description: 'The number of matching jobs deleted.'
field :queue_size,
GraphQL::INT_TYPE,
null: true,
description: 'The queue size after processing'
description: 'The queue size after processing.'
end
end
end
......
......@@ -19,12 +19,12 @@ module Types
field :open,
GraphQL::INT_TYPE,
null: true,
description: 'Number of alerts with status TRIGGERED or ACKNOWLEDGED for the project'
description: 'Number of alerts with status TRIGGERED or ACKNOWLEDGED for the project.'
field :all,
GraphQL::INT_TYPE,
null: true,
description: 'Total number of alerts for the project'
description: 'Total number of alerts for the project.'
end
end
end
......@@ -15,115 +15,115 @@ module Types
field :iid,
GraphQL::ID_TYPE,
null: false,
description: 'Internal ID of the alert'
description: 'Internal ID of the alert.'
field :issue_iid,
GraphQL::ID_TYPE,
null: true,
description: 'Internal ID of the GitLab issue attached to the alert'
description: 'Internal ID of the GitLab issue attached to the alert.'
field :title,
GraphQL::STRING_TYPE,
null: true,
description: 'Title of the alert'
description: 'Title of the alert.'
field :description,
GraphQL::STRING_TYPE,
null: true,
description: 'Description of the alert'
description: 'Description of the alert.'
field :severity,
AlertManagement::SeverityEnum,
null: true,
description: 'Severity of the alert'
description: 'Severity of the alert.'
field :status,
AlertManagement::StatusEnum,
null: true,
description: 'Status of the alert',
description: 'Status of the alert.',
method: :status_name
field :service,
GraphQL::STRING_TYPE,
null: true,
description: 'Service the alert came from'
description: 'Service the alert came from.'
field :monitoring_tool,
GraphQL::STRING_TYPE,
null: true,
description: 'Monitoring tool the alert came from'
description: 'Monitoring tool the alert came from.'
field :hosts,
[GraphQL::STRING_TYPE],
null: true,
description: 'List of hosts the alert came from'
description: 'List of hosts the alert came from.'
field :started_at,
Types::TimeType,
null: true,
description: 'Timestamp the alert was raised'
description: 'Timestamp the alert was raised.'
field :ended_at,
Types::TimeType,
null: true,
description: 'Timestamp the alert ended'
description: 'Timestamp the alert ended.'
field :environment,
Types::EnvironmentType,
null: true,
description: 'Environment for the alert'
description: 'Environment for the alert.'
field :event_count,
GraphQL::INT_TYPE,
null: true,
description: 'Number of events of this alert',
description: 'Number of events of this alert.',
method: :events
field :details, # rubocop:disable Graphql/JSONType
GraphQL::Types::JSON,
null: true,
description: 'Alert details'
description: 'Alert details.'
field :created_at,
Types::TimeType,
null: true,
description: 'Timestamp the alert was created'
description: 'Timestamp the alert was created.'
field :updated_at,
Types::TimeType,
null: true,
description: 'Timestamp the alert was last updated'
description: 'Timestamp the alert was last updated.'
field :assignees,
Types::UserType.connection_type,
null: true,
description: 'Assignees of the alert'
description: 'Assignees of the alert.'
field :metrics_dashboard_url,
GraphQL::STRING_TYPE,
null: true,
description: 'URL for metrics embed for the alert'
description: 'URL for metrics embed for the alert.'
field :runbook,
GraphQL::STRING_TYPE,
null: true,
description: 'Runbook for the alert as defined in alert details'
description: 'Runbook for the alert as defined in alert details.'
field :todos,
Types::TodoType.connection_type,
null: true,
description: 'Todos of the current user for the alert',
description: 'Todos of the current user for the alert.',
resolver: Resolvers::TodoResolver
field :details_url,
GraphQL::STRING_TYPE,
null: false,
description: 'The URL of the alert detail page'
description: 'The URL of the alert detail page.'
field :prometheus_alert,
Types::PrometheusAlertType,
null: true,
description: 'The alert condition for Prometheus'
description: 'The alert condition for Prometheus.'
def notes
object.ordered_notes
......
......@@ -9,37 +9,37 @@ module Types
field :id,
GraphQL::ID_TYPE,
null: false,
description: 'ID of the integration'
description: 'ID of the integration.'
field :type,
AlertManagement::IntegrationTypeEnum,
null: false,
description: 'Type of integration'
description: 'Type of integration.'
field :name,
GraphQL::STRING_TYPE,
null: true,
description: 'Name of the integration'
description: 'Name of the integration.'
field :active,
GraphQL::BOOLEAN_TYPE,
null: true,
description: 'Whether the endpoint is currently accepting alerts'
description: 'Whether the endpoint is currently accepting alerts.'
field :token,
GraphQL::STRING_TYPE,
null: true,
description: 'Token used to authenticate alert notification requests'
description: 'Token used to authenticate alert notification requests.'
field :url,
GraphQL::STRING_TYPE,
null: true,
description: 'Endpoint which accepts alert notifications'
description: 'Endpoint which accepts alert notifications.'
field :api_url,
GraphQL::STRING_TYPE,
null: true,
description: 'URL at which Prometheus metrics can be queried to populate the metrics dashboard'
description: 'URL at which Prometheus metrics can be queried to populate the metrics dashboard.'
definition_methods do
def resolve_type(object, context)
......
......@@ -13,32 +13,32 @@ module Types
field :name,
GraphQL::STRING_TYPE,
null: false,
description: 'The emoji name'
description: 'The emoji name.'
field :description,
GraphQL::STRING_TYPE,
null: false,
description: 'The emoji description'
description: 'The emoji description.'
field :unicode,
GraphQL::STRING_TYPE,
null: false,
description: 'The emoji in unicode'
description: 'The emoji in unicode.'
field :emoji,
GraphQL::STRING_TYPE,
null: false,
description: 'The emoji as an icon'
description: 'The emoji as an icon.'
field :unicode_version,
GraphQL::STRING_TYPE,
null: false,
description: 'The unicode version for this emoji'
description: 'The unicode version for this emoji.'
field :user,
Types::UserType,
null: false,
description: 'The user who awarded the emoji'
description: 'The user who awarded the emoji.'
def user
Gitlab::Graphql::Loaders::BatchModelLoader.new(User, object.user_id).find
......
......@@ -9,22 +9,22 @@ module Types
description 'Represents a list for an issue board'
field :id, GraphQL::ID_TYPE, null: false,
description: 'ID (global ID) of the list'
description: 'ID (global ID) of the list.'
field :title, GraphQL::STRING_TYPE, null: false,
description: 'Title of the list'
description: 'Title of the list.'
field :list_type, GraphQL::STRING_TYPE, null: false,
description: 'Type of the list'
description: 'Type of the list.'
field :position, GraphQL::INT_TYPE, null: true,
description: 'Position of list within the board'
description: 'Position of list within the board.'
field :label, Types::LabelType, null: true,
description: 'Label of the list'
description: 'Label of the list.'
field :collapsed, GraphQL::BOOLEAN_TYPE, null: true,
description: 'Indicates if list is collapsed for this user'
description: 'Indicates if list is collapsed for this user.'
field :issues_count, GraphQL::INT_TYPE, null: true,
description: 'Count of issues in the list'
description: 'Count of issues in the list.'
field :issues, ::Types::IssueType.connection_type, null: true,
description: 'Board issues',
description: 'Board issues.',
resolver: ::Resolvers::BoardListIssuesResolver
def issues_count
......
......@@ -10,20 +10,20 @@ module Types
present_using BoardPresenter
field :id, type: GraphQL::ID_TYPE, null: false,
description: 'ID (global ID) of the board'
description: 'ID (global ID) of the board.'
field :name, type: GraphQL::STRING_TYPE, null: true,
description: 'Name of the board'
description: 'Name of the board.'
field :hide_backlog_list, type: GraphQL::BOOLEAN_TYPE, null: true,
description: 'Whether or not backlog list is hidden'
description: 'Whether or not backlog list is hidden.'
field :hide_closed_list, type: GraphQL::BOOLEAN_TYPE, null: true,
description: 'Whether or not closed list is hidden'
description: 'Whether or not closed list is hidden.'
field :lists,
Types::BoardListType.connection_type,
null: true,
description: 'Lists of the board',
description: 'Lists of the board.',
resolver: Resolvers::BoardListsResolver,
extras: [:lookahead]
......
......@@ -6,27 +6,27 @@ module Types
class BoardIssueInputBaseType < BaseInputObject
argument :label_name, GraphQL::STRING_TYPE.to_list_type,
required: false,
description: 'Filter by label name'
description: 'Filter by label name.'
argument :milestone_title, GraphQL::STRING_TYPE,
required: false,
description: 'Filter by milestone title'
description: 'Filter by milestone title.'
argument :assignee_username, GraphQL::STRING_TYPE.to_list_type,
required: false,
description: 'Filter by assignee username'
description: 'Filter by assignee username.'
argument :author_username, GraphQL::STRING_TYPE,
required: false,
description: 'Filter by author username'
description: 'Filter by author username.'
argument :release_tag, GraphQL::STRING_TYPE,
required: false,
description: 'Filter by release tag'
description: 'Filter by release tag.'
argument :my_reaction_emoji, GraphQL::STRING_TYPE,
required: false,
description: 'Filter by reaction emoji'
description: 'Filter by reaction emoji.'
end
# rubocop: enable Graphql/AuthorizeTypes
end
......
......@@ -11,11 +11,11 @@ module Types
argument :not, NegatedBoardIssueInputType,
required: false,
description: 'List of negated params. Warning: this argument is experimental and a subject to change in future'
description: 'List of negated params. Warning: this argument is experimental and a subject to change in future.'
argument :search, GraphQL::STRING_TYPE,
required: false,
description: 'Search query for issue title or description'
description: 'Search query for issue title or description.'
end
# rubocop: enable Graphql/AuthorizeTypes
end
......
......@@ -8,11 +8,11 @@ module Types
field :name,
GraphQL::STRING_TYPE,
null: false,
description: 'Name of the branch'
description: 'Name of the branch.'
field :commit, Types::CommitType,
null: true, resolver: Resolvers::BranchCommitResolver,
description: 'Commit for the branch'
description: 'Commit for the branch.'
end
# rubocop: enable Graphql/AuthorizeTypes
end
......@@ -7,27 +7,27 @@ module Types
graphql_name 'PipelineAnalytics'
field :week_pipelines_totals, [GraphQL::INT_TYPE], null: true,
description: 'Total weekly pipeline count'
description: 'Total weekly pipeline count.'
field :week_pipelines_successful, [GraphQL::INT_TYPE], null: true,
description: 'Total weekly successful pipeline count'
description: 'Total weekly successful pipeline count.'
field :week_pipelines_labels, [GraphQL::STRING_TYPE], null: true,
description: 'Labels for the weekly pipeline count'
description: 'Labels for the weekly pipeline count.'
field :month_pipelines_totals, [GraphQL::INT_TYPE], null: true,
description: 'Total monthly pipeline count'
description: 'Total monthly pipeline count.'
field :month_pipelines_successful, [GraphQL::INT_TYPE], null: true,
description: 'Total monthly successful pipeline count'
description: 'Total monthly successful pipeline count.'
field :month_pipelines_labels, [GraphQL::STRING_TYPE], null: true,
description: 'Labels for the monthly pipeline count'
description: 'Labels for the monthly pipeline count.'
field :year_pipelines_totals, [GraphQL::INT_TYPE], null: true,
description: 'Total yearly pipeline count'
description: 'Total yearly pipeline count.'
field :year_pipelines_successful, [GraphQL::INT_TYPE], null: true,
description: 'Total yearly successful pipeline count'
description: 'Total yearly successful pipeline count.'
field :year_pipelines_labels, [GraphQL::STRING_TYPE], null: true,
description: 'Labels for the yearly pipeline count'
description: 'Labels for the yearly pipeline count.'
field :pipeline_times_values, [GraphQL::INT_TYPE], null: true,
description: 'Pipeline times'
description: 'Pipeline times.'
field :pipeline_times_labels, [GraphQL::STRING_TYPE], null: true,
description: 'Pipeline times labels'
description: 'Pipeline times labels.'
end
end
end
......@@ -8,13 +8,13 @@ module Types
graphql_name 'CiConfig'
field :errors, [GraphQL::STRING_TYPE], null: true,
description: 'Linting errors'
description: 'Linting errors.'
field :merged_yaml, GraphQL::STRING_TYPE, null: true,
description: 'Merged CI config YAML'
description: 'Merged CI config YAML.'
field :stages, Types::Ci::Config::StageType.connection_type, null: true,
description: 'Stages of the pipeline'
description: 'Stages of the pipeline.'
field :status, Types::Ci::Config::StatusEnum, null: true,
description: 'Status of linting, can be either valid or invalid'
description: 'Status of linting, can be either valid or invalid.'
end
end
end
......
......@@ -8,11 +8,11 @@ module Types
graphql_name 'CiConfigGroup'
field :name, GraphQL::STRING_TYPE, null: true,
description: 'Name of the job group'
description: 'Name of the job group.'
field :jobs, Types::Ci::Config::JobType.connection_type, null: true,
description: 'Jobs in group'
description: 'Jobs in group.'
field :size, GraphQL::INT_TYPE, null: true,
description: 'Size of the job group'
description: 'Size of the job group.'
end
end
end
......
......@@ -8,7 +8,7 @@ module Types
graphql_name 'CiConfigNeed'
field :name, GraphQL::STRING_TYPE, null: true,
description: 'Name of the need'
description: 'Name of the need.'
end
end
end
......
......@@ -8,9 +8,9 @@ module Types
graphql_name 'CiConfigStage'
field :name, GraphQL::STRING_TYPE, null: true,
description: 'Name of the stage'
description: 'Name of the stage.'
field :groups, Types::Ci::Config::GroupType.connection_type, null: true,
description: 'Groups of jobs for the stage'
description: 'Groups of jobs for the stage.'
end
end
end
......
......@@ -7,26 +7,26 @@ module Types
graphql_name 'DetailedStatus'
field :group, GraphQL::STRING_TYPE, null: true,
description: 'Group of the status'
description: 'Group of the status.'
field :icon, GraphQL::STRING_TYPE, null: true,
description: 'Icon of the status'
description: 'Icon of the status.'
field :favicon, GraphQL::STRING_TYPE, null: true,
description: 'Favicon of the status'
description: 'Favicon of the status.'
field :details_path, GraphQL::STRING_TYPE, null: true,
description: 'Path of the details for the status'
description: 'Path of the details for the status.'
field :has_details, GraphQL::BOOLEAN_TYPE, null: true,
description: 'Indicates if the status has further details',
description: 'Indicates if the status has further details.',
method: :has_details?
field :label, GraphQL::STRING_TYPE, null: true,
description: 'Label of the status'
description: 'Label of the status.'
field :text, GraphQL::STRING_TYPE, null: true,
description: 'Text of the status'
description: 'Text of the status.'
field :tooltip, GraphQL::STRING_TYPE, null: true,
description: 'Tooltip associated with the status',
description: 'Tooltip associated with the status.',
method: :status_tooltip
field :action, Types::Ci::StatusActionType, null: true,
calls_gitaly: true,
description: 'Action information for the status. This includes method, button title, icon, path, and title'
description: 'Action information for the status. This includes method, button title, icon, path, and title.'
def action
if object.has_action?
......
......@@ -7,13 +7,13 @@ module Types
graphql_name 'CiGroup'
field :name, GraphQL::STRING_TYPE, null: true,
description: 'Name of the job group'
description: 'Name of the job group.'
field :size, GraphQL::INT_TYPE, null: true,
description: 'Size of the group'
description: 'Size of the group.'
field :jobs, Ci::JobType.connection_type, null: true,
description: 'Jobs in group'
description: 'Jobs in group.'
field :detailed_status, Types::Ci::DetailedStatusType, null: true,
description: 'Detailed status of the group'
description: 'Detailed status of the group.'
def detailed_status
object.detailed_status(context[:current_user])
......
......@@ -7,10 +7,10 @@ module Types
graphql_name 'CiJobArtifact'
field :download_path, GraphQL::STRING_TYPE, null: true,
description: "URL for downloading the artifact's file"
description: "URL for downloading the artifact's file."
field :file_type, ::Types::Ci::JobArtifactFileTypeEnum, null: true,
description: 'File type of the artifact'
description: 'File type of the artifact.'
def download_path
::Gitlab::Routing.url_helpers.download_project_job_artifacts_path(
......
......@@ -7,17 +7,17 @@ module Types
authorize :read_commit_status
field :pipeline, Types::Ci::PipelineType, null: true,
description: 'Pipeline the job belongs to'
description: 'Pipeline the job belongs to.'
field :name, GraphQL::STRING_TYPE, null: true,
description: 'Name of the job'
description: 'Name of the job.'
field :needs, BuildNeedType.connection_type, null: true,
description: 'References to builds that must complete before the jobs run'
description: 'References to builds that must complete before the jobs run.'
field :detailed_status, Types::Ci::DetailedStatusType, null: true,
description: 'Detailed status of the job'
description: 'Detailed status of the job.'
field :scheduled_at, Types::TimeType, null: true,
description: 'Schedule for the build'
description: 'Schedule for the build.'
field :artifacts, Types::Ci::JobArtifactType.connection_type, null: true,
description: 'Artifacts generated by the job'
description: 'Artifacts generated by the job.'
def pipeline
Gitlab::Graphql::Loaders::BatchModelLoader.new(::Ci::Pipeline, object.pipeline_id).find
......
......@@ -12,90 +12,90 @@ module Types
expose_permissions Types::PermissionTypes::Ci::Pipeline
field :id, GraphQL::ID_TYPE, null: false,
description: 'ID of the pipeline'
description: 'ID of the pipeline.'
field :iid, GraphQL::STRING_TYPE, null: false,
description: 'Internal ID of the pipeline'
description: 'Internal ID of the pipeline.'
field :sha, GraphQL::STRING_TYPE, null: false,
description: "SHA of the pipeline's commit"
description: "SHA of the pipeline's commit."
field :before_sha, GraphQL::STRING_TYPE, null: true,
description: 'Base SHA of the source branch'
description: 'Base SHA of the source branch.'
field :status, PipelineStatusEnum, null: false,
description: "Status of the pipeline (#{::Ci::Pipeline.all_state_names.compact.join(', ').upcase})"
field :detailed_status, Types::Ci::DetailedStatusType, null: false,
description: 'Detailed status of the pipeline'
description: 'Detailed status of the pipeline.'
field :config_source, PipelineConfigSourceEnum, null: true,
description: "Config source of the pipeline (#{::Enums::Ci::Pipeline.config_sources.keys.join(', ').upcase})"
field :duration, GraphQL::INT_TYPE, null: true,
description: 'Duration of the pipeline in seconds'
description: 'Duration of the pipeline in seconds.'
field :coverage, GraphQL::FLOAT_TYPE, null: true,
description: 'Coverage percentage'
description: 'Coverage percentage.'
field :created_at, Types::TimeType, null: false,
description: "Timestamp of the pipeline's creation"
description: "Timestamp of the pipeline's creation."
field :updated_at, Types::TimeType, null: false,
description: "Timestamp of the pipeline's last activity"
description: "Timestamp of the pipeline's last activity."
field :started_at, Types::TimeType, null: true,
description: 'Timestamp when the pipeline was started'
description: 'Timestamp when the pipeline was started.'
field :finished_at, Types::TimeType, null: true,
description: "Timestamp of the pipeline's completion"
description: "Timestamp of the pipeline's completion."
field :committed_at, Types::TimeType, null: true,
description: "Timestamp of the pipeline's commit"
description: "Timestamp of the pipeline's commit."
field :stages, Types::Ci::StageType.connection_type, null: true,
description: 'Stages of the pipeline',
description: 'Stages of the pipeline.',
extras: [:lookahead],
resolver: Resolvers::Ci::PipelineStagesResolver
field :user, Types::UserType, null: true,
description: 'Pipeline user'
description: 'Pipeline user.'
field :retryable, GraphQL::BOOLEAN_TYPE,
description: 'Specifies if a pipeline can be retried',
description: 'Specifies if a pipeline can be retried.',
method: :retryable?,
null: false
field :cancelable, GraphQL::BOOLEAN_TYPE,
description: 'Specifies if a pipeline can be canceled',
description: 'Specifies if a pipeline can be canceled.',
method: :cancelable?,
null: false
field :jobs,
::Types::Ci::JobType.connection_type,
null: true,
description: 'Jobs belonging to the pipeline',
description: 'Jobs belonging to the pipeline.',
resolver: ::Resolvers::Ci::JobsResolver
field :source_job, Types::Ci::JobType, null: true,
description: 'Job where pipeline was triggered from'
description: 'Job where pipeline was triggered from.'
field :downstream, Types::Ci::PipelineType.connection_type, null: true,
description: 'Pipelines this pipeline will trigger',
description: 'Pipelines this pipeline will trigger.',
method: :triggered_pipelines_with_preloads
field :upstream, Types::Ci::PipelineType, null: true,
description: 'Pipeline that triggered the pipeline',
description: 'Pipeline that triggered the pipeline.',
method: :triggered_by_pipeline
field :path, GraphQL::STRING_TYPE, null: true,
description: "Relative path to the pipeline's page"
description: "Relative path to the pipeline's page."
field :project, Types::ProjectType, null: true,
description: 'Project the pipeline belongs to'
description: 'Project the pipeline belongs to.'
field :active, GraphQL::BOOLEAN_TYPE, null: false, method: :active?,
description: 'Indicates if the pipeline is active'
description: 'Indicates if the pipeline is active.'
def detailed_status
object.detailed_status(context[:current_user])
......
......@@ -7,9 +7,9 @@ module Types
graphql_name 'RunnerArchitecture'
field :name, GraphQL::STRING_TYPE, null: false,
description: 'Name of the runner platform architecture'
description: 'Name of the runner platform architecture.'
field :download_location, GraphQL::STRING_TYPE, null: false,
description: 'Download location for the runner for the platform architecture'
description: 'Download location for the runner for the platform architecture.'
end
end
end
......@@ -7,11 +7,11 @@ module Types
graphql_name 'RunnerPlatform'
field :name, GraphQL::STRING_TYPE, null: false,
description: 'Name slug of the runner platform'
description: 'Name slug of the runner platform.'
field :human_readable_name, GraphQL::STRING_TYPE, null: false,
description: 'Human readable name of the runner platform'
description: 'Human readable name of the runner platform.'
field :architectures, Types::Ci::RunnerArchitectureType.connection_type, null: true,
description: 'Runner architectures supported for the platform'
description: 'Runner architectures supported for the platform.'
end
end
end
......@@ -7,9 +7,9 @@ module Types
graphql_name 'RunnerSetup'
field :install_instructions, GraphQL::STRING_TYPE, null: false,
description: 'Instructions for installing the runner on the specified architecture'
description: 'Instructions for installing the runner on the specified architecture.'
field :register_instructions, GraphQL::STRING_TYPE, null: true,
description: 'Instructions for registering the runner'
description: 'Instructions for registering the runner.'
end
end
end
......@@ -7,12 +7,12 @@ module Types
graphql_name 'CiStage'
field :name, GraphQL::STRING_TYPE, null: true,
description: 'Name of the stage'
description: 'Name of the stage.'
field :groups, Ci::GroupType.connection_type, null: true,
extras: [:lookahead],
description: 'Group of jobs for the stage'
description: 'Group of jobs for the stage.'
field :detailed_status, Types::Ci::DetailedStatusType, null: true,
description: 'Detailed status of the stage'
description: 'Detailed status of the stage.'
def detailed_status
object.detailed_status(context[:current_user])
......
......@@ -6,16 +6,16 @@ module Types
graphql_name 'StatusAction'
field :button_title, GraphQL::STRING_TYPE, null: true,
description: 'Title for the button, for example: Retry this job'
description: 'Title for the button, for example: Retry this job.'
field :icon, GraphQL::STRING_TYPE, null: true,
description: 'Icon used in the action button'
description: 'Icon used in the action button.'
field :method, GraphQL::STRING_TYPE, null: true,
description: 'Method for the action, for example: :post',
description: 'Method for the action, for example: :post.',
resolver_method: :action_method
field :path, GraphQL::STRING_TYPE, null: true,
description: 'Path for the action'
description: 'Path for the action.'
field :title, GraphQL::STRING_TYPE, null: true,
description: 'Title for the action, for example: Retry'
description: 'Title for the action, for example: Retry.'
def action_method
object[:method]
......
......@@ -4,19 +4,19 @@ module Types
# rubocop: disable Graphql/AuthorizeTypes
class CommitActionType < BaseInputObject
argument :action, type: Types::CommitActionModeEnum, required: true,
description: 'The action to perform, create, delete, move, update, chmod'
description: 'The action to perform, create, delete, move, update, chmod.'
argument :file_path, type: GraphQL::STRING_TYPE, required: true,
description: 'Full path to the file'
description: 'Full path to the file.'
argument :content, type: GraphQL::STRING_TYPE, required: false,
description: 'Content of the file'
description: 'Content of the file.'
argument :previous_path, type: GraphQL::STRING_TYPE, required: false,
description: 'Original full path to the file being moved'
description: 'Original full path to the file being moved.'
argument :last_commit_id, type: GraphQL::STRING_TYPE, required: false,
description: 'Last known file commit ID'
description: 'Last known file commit ID.'
argument :execute_filemode, type: GraphQL::BOOLEAN_TYPE, required: false,
description: 'Enables/disables the execute flag on the file'
description: 'Enables/disables the execute flag on the file.'
argument :encoding, type: Types::CommitEncodingEnum, required: false,
description: 'Encoding of the file. Default is text'
description: 'Encoding of the file. Default is text.'
end
# rubocop: enable Graphql/AuthorizeTypes
end
......@@ -9,39 +9,39 @@ module Types
present_using CommitPresenter
field :id, type: GraphQL::ID_TYPE, null: false,
description: 'ID (global ID) of the commit'
description: 'ID (global ID) of the commit.'
field :sha, type: GraphQL::STRING_TYPE, null: false,
description: 'SHA1 ID of the commit'
description: 'SHA1 ID of the commit.'
field :short_id, type: GraphQL::STRING_TYPE, null: false,
description: 'Short SHA1 ID of the commit'
description: 'Short SHA1 ID of the commit.'
field :title, type: GraphQL::STRING_TYPE, null: true, calls_gitaly: true,
description: 'Title of the commit message'
description: 'Title of the commit message.'
markdown_field :title_html, null: true
field :description, type: GraphQL::STRING_TYPE, null: true,
description: 'Description of the commit message'
description: 'Description of the commit message.'
markdown_field :description_html, null: true
field :message, type: GraphQL::STRING_TYPE, null: true,
description: 'Raw commit message'
description: 'Raw commit message.'
field :authored_date, type: Types::TimeType, null: true,
description: 'Timestamp of when the commit was authored'
description: 'Timestamp of when the commit was authored.'
field :web_url, type: GraphQL::STRING_TYPE, null: false,
description: 'Web URL of the commit'
description: 'Web URL of the commit.'
field :web_path, type: GraphQL::STRING_TYPE, null: false,
description: 'Web path of the commit'
description: 'Web path of the commit.'
field :signature_html, type: GraphQL::STRING_TYPE, null: true, calls_gitaly: true,
description: 'Rendered HTML of the commit signature'
description: 'Rendered HTML of the commit signature.'
field :author_name, type: GraphQL::STRING_TYPE, null: true,
description: 'Commit authors name'
description: 'Commit authors name.'
field :author_gravatar, type: GraphQL::STRING_TYPE, null: true,
description: 'Commit authors gravatar'
description: 'Commit authors gravatar.'
# models/commit lazy loads the author by email
field :author, type: Types::UserType, null: true,
description: 'Author of the commit'
description: 'Author of the commit.'
field :pipelines,
null: true,
description: 'Pipelines of the commit ordered latest first',
description: 'Pipelines of the commit ordered latest first.',
resolver: Resolvers::CommitPipelinesResolver
def author_gravatar
......
......@@ -8,14 +8,14 @@ module Types
authorize :destroy_container_image
field :created_at, Types::TimeType, null: false, description: 'Timestamp of when the container expiration policy was created'
field :updated_at, Types::TimeType, null: false, description: 'Timestamp of when the container expiration policy was updated'
field :enabled, GraphQL::BOOLEAN_TYPE, null: false, description: 'Indicates whether this container expiration policy is enabled'
field :older_than, Types::ContainerExpirationPolicyOlderThanEnum, null: true, description: 'Tags older that this will expire'
field :cadence, Types::ContainerExpirationPolicyCadenceEnum, null: false, description: 'This container expiration policy schedule'
field :keep_n, Types::ContainerExpirationPolicyKeepEnum, null: true, description: 'Number of tags to retain'
field :name_regex, Types::UntrustedRegexp, null: true, description: 'Tags with names matching this regex pattern will expire'
field :name_regex_keep, Types::UntrustedRegexp, null: true, description: 'Tags with names matching this regex pattern will be preserved'
field :next_run_at, Types::TimeType, null: true, description: 'Next time that this container expiration policy will get executed'
field :created_at, Types::TimeType, null: false, description: 'Timestamp of when the container expiration policy was created.'
field :updated_at, Types::TimeType, null: false, description: 'Timestamp of when the container expiration policy was updated.'
field :enabled, GraphQL::BOOLEAN_TYPE, null: false, description: 'Indicates whether this container expiration policy is enabled.'
field :older_than, Types::ContainerExpirationPolicyOlderThanEnum, null: true, description: 'Tags older that this will expire.'
field :cadence, Types::ContainerExpirationPolicyCadenceEnum, null: false, description: 'This container expiration policy schedule.'
field :keep_n, Types::ContainerExpirationPolicyKeepEnum, null: true, description: 'Number of tags to retain.'
field :name_regex, Types::UntrustedRegexp, null: true, description: 'Tags with names matching this regex pattern will expire.'
field :name_regex_keep, Types::UntrustedRegexp, null: true, description: 'Tags with names matching this regex pattern will be preserved.'
field :next_run_at, Types::TimeType, null: true, description: 'Next time that this container expiration policy will get executed.'
end
end
......@@ -11,7 +11,7 @@ module Types
field :tags,
Types::ContainerRepositoryTagType.connection_type,
null: true,
description: 'Tags of the container repository',
description: 'Tags of the container repository.',
max_page_size: 20
def can_delete
......
......@@ -19,7 +19,7 @@ module Types
field :status, Types::ContainerRepositoryStatusEnum, null: true, description: 'Status of the container repository.'
field :tags_count, GraphQL::INT_TYPE, null: false, description: 'Number of tags associated with this image.'
field :can_delete, GraphQL::BOOLEAN_TYPE, null: false, description: 'Can the current user delete the container repository.'
field :project, Types::ProjectType, null: false, description: 'Project of the container registry'
field :project, Types::ProjectType, null: false, description: 'Project of the container registry.'
def can_delete
Ability.allowed?(current_user, :update_container_image, object)
......
......@@ -4,7 +4,7 @@ module Types
# rubocop: disable Graphql/AuthorizeTypes
class CountableConnectionType < GraphQL::Types::Relay::BaseConnection
field :count, GraphQL::INT_TYPE, null: false,
description: 'Total count of collection'
description: 'Total count of collection.'
def count
# rubocop: disable CodeReuse/ActiveRecord
......
......@@ -8,10 +8,10 @@ module Types
field_class Types::BaseField
field :current_user_todos, Types::TodoType.connection_type,
description: 'Todos for the current user',
description: 'Todos for the current user.',
null: false do
argument :state, Types::TodoStateEnum,
description: 'State of the todos',
description: 'State of the todos.',
required: false
end
......
......@@ -9,19 +9,19 @@ module Types
field :id, ::Types::GlobalIDType[::CustomEmoji],
null: false,
description: 'The ID of the emoji'
description: 'The ID of the emoji.'
field :name, GraphQL::STRING_TYPE,
null: false,
description: 'The name of the emoji'
description: 'The name of the emoji.'
field :url, GraphQL::STRING_TYPE,
null: false,
method: :file,
description: 'The link to file of the emoji'
description: 'The link to file of the emoji.'
field :external, GraphQL::BOOLEAN_TYPE,
null: false,
description: 'Whether the emoji is an external link'
description: 'Whether the emoji is an external link.'
end
end
......@@ -18,12 +18,12 @@ module Types
field :version,
Types::DesignManagement::VersionType,
null: false,
description: 'The version this design-at-versions is pinned to'
description: 'The version this design-at-versions is pinned to.'
field :design,
Types::DesignManagement::DesignType,
null: false,
description: 'The underlying design'
description: 'The underlying design.'
def cached_stateful_version(_parent)
version
......
......@@ -9,40 +9,40 @@ module Types
authorize :read_design
field :project, Types::ProjectType, null: false,
description: 'Project associated with the design collection'
description: 'Project associated with the design collection.'
field :issue, Types::IssueType, null: false,
description: 'Issue associated with the design collection'
description: 'Issue associated with the design collection.'
field :designs,
Types::DesignManagement::DesignType.connection_type,
null: false,
resolver: Resolvers::DesignManagement::DesignsResolver,
description: 'All designs for the design collection',
description: 'All designs for the design collection.',
complexity: 5
field :versions,
Types::DesignManagement::VersionType.connection_type,
resolver: Resolvers::DesignManagement::VersionsResolver,
description: 'All versions related to all designs, ordered newest first'
description: 'All versions related to all designs, ordered newest first.'
field :version,
Types::DesignManagement::VersionType,
resolver: Resolvers::DesignManagement::VersionsResolver.single,
description: 'A specific version'
description: 'A specific version.'
field :design_at_version, ::Types::DesignManagement::DesignAtVersionType,
null: true,
resolver: ::Resolvers::DesignManagement::DesignAtVersionResolver,
description: 'Find a design as of a version'
description: 'Find a design as of a version.'
field :design, ::Types::DesignManagement::DesignType,
null: true,
resolver: ::Resolvers::DesignManagement::DesignResolver,
description: 'Find a specific design'
description: 'Find a specific design.'
field :copy_state, ::Types::DesignManagement::DesignCollectionCopyStateEnum,
null: true,
description: 'Copy state of the design collection'
description: 'Copy state of the design collection.'
end
end
end
......@@ -7,12 +7,12 @@ module Types
field_class Types::BaseField
field :id, GraphQL::ID_TYPE, description: 'The ID of this design', null: false
field :project, Types::ProjectType, null: false, description: 'The project the design belongs to'
field :issue, Types::IssueType, null: false, description: 'The issue the design belongs to'
field :filename, GraphQL::STRING_TYPE, null: false, description: 'The filename of the design'
field :full_path, GraphQL::STRING_TYPE, null: false, description: 'The full path to the design file'
field :image, GraphQL::STRING_TYPE, null: false, extras: [:parent], description: 'The URL of the full-sized image'
field :id, GraphQL::ID_TYPE, description: 'The ID of this design.', null: false
field :project, Types::ProjectType, null: false, description: 'The project the design belongs to.'
field :issue, Types::IssueType, null: false, description: 'The issue the design belongs to.'
field :filename, GraphQL::STRING_TYPE, null: false, description: 'The filename of the design.'
field :full_path, GraphQL::STRING_TYPE, null: false, description: 'The full path to the design file.'
field :image, GraphQL::STRING_TYPE, null: false, extras: [:parent], description: 'The URL of the full-sized image.'
field :image_v432x230, GraphQL::STRING_TYPE, null: true, extras: [:parent],
description: 'The URL of the design resized to fit within the bounds of 432x230. ' \
'This will be `null` if the image has not been generated'
......@@ -20,16 +20,16 @@ module Types
null: false,
calls_gitaly: true,
extras: [:parent],
description: 'The diff refs for this design'
description: 'The diff refs for this design.'
field :event, Types::DesignManagement::DesignVersionEventEnum,
null: false,
extras: [:parent],
description: 'How this design was changed in the current version'
description: 'How this design was changed in the current version.'
field :notes_count,
GraphQL::INT_TYPE,
null: false,
method: :user_notes_count,
description: 'The total count of user-created notes for this design'
description: 'The total count of user-created notes for this design.'
def diff_refs(parent:)
version = cached_stateful_version(parent)
......
......@@ -17,7 +17,7 @@ module Types
field :versions,
Types::DesignManagement::VersionType.connection_type,
resolver: Resolvers::DesignManagement::VersionsResolver,
description: "All versions related to this design ordered newest first",
description: "All versions related to this design ordered newest first.",
extras: [:parent]
# Returns a `DesignManagement::Version` for this query based on the
......
......@@ -12,25 +12,25 @@ module Types
authorize :read_design
field :id, GraphQL::ID_TYPE, null: false,
description: 'ID of the design version'
description: 'ID of the design version.'
field :sha, GraphQL::ID_TYPE, null: false,
description: 'SHA of the design version'
description: 'SHA of the design version.'
field :designs,
::Types::DesignManagement::DesignType.connection_type,
null: false,
description: 'All designs that were changed in the version'
description: 'All designs that were changed in the version.'
field :designs_at_version,
::Types::DesignManagement::DesignAtVersionType.connection_type,
null: false,
description: 'All designs that are visible at this version, as of this version',
description: 'All designs that are visible at this version, as of this version.',
resolver: ::Resolvers::DesignManagement::Version::DesignsAtVersionResolver
field :design_at_version,
::Types::DesignManagement::DesignAtVersionType,
null: false,
description: 'A particular design as of this version, provided it is visible at this version',
description: 'A particular design as of this version, provided it is visible at this version.',
resolver: ::Resolvers::DesignManagement::Version::DesignsAtVersionResolver.single
end
end
......
......@@ -8,11 +8,11 @@ module Types
field :version, ::Types::DesignManagement::VersionType,
null: true,
resolver: ::Resolvers::DesignManagement::VersionResolver,
description: 'Find a version'
description: 'Find a version.'
field :design_at_version, ::Types::DesignManagement::DesignAtVersionType,
null: true,
resolver: ::Resolvers::DesignManagement::DesignAtVersionResolver,
description: 'Find a design as of a version'
description: 'Find a design as of a version.'
end
end
......@@ -4,9 +4,9 @@ module Types
# rubocop: disable Graphql/AuthorizeTypes
class DiffPathsInputType < BaseInputObject
argument :old_path, GraphQL::STRING_TYPE, required: false,
description: 'The path of the file on the start sha'
description: 'The path of the file on the start sha.'
argument :new_path, GraphQL::STRING_TYPE, required: false,
description: 'The path of the file on the head sha'
description: 'The path of the file on the head sha.'
end
# rubocop: enable Graphql/AuthorizeTypes
end
......@@ -7,11 +7,11 @@ module Types
graphql_name 'DiffRefs'
field :head_sha, GraphQL::STRING_TYPE, null: false,
description: 'SHA of the HEAD at the time the comment was made'
description: 'SHA of the HEAD at the time the comment was made.'
field :base_sha, GraphQL::STRING_TYPE, null: true,
description: 'Merge base of the branch the comment was made on'
description: 'Merge base of the branch the comment was made on.'
field :start_sha, GraphQL::STRING_TYPE, null: false,
description: 'SHA of the branch being compared against'
description: 'SHA of the branch being compared against.'
end
# rubocop: enable Graphql/AuthorizeTypes
end
......@@ -9,13 +9,13 @@ module Types
description 'Aggregated summary of changes'
field :additions, GraphQL::INT_TYPE, null: false,
description: 'Number of lines added'
description: 'Number of lines added.'
field :deletions, GraphQL::INT_TYPE, null: false,
description: 'Number of lines deleted'
description: 'Number of lines deleted.'
field :changes, GraphQL::INT_TYPE, null: false,
description: 'Number of lines changed'
description: 'Number of lines changed.'
field :file_count, GraphQL::INT_TYPE, null: false,
description: 'Number of files changed'
description: 'Number of files changed.'
def changes
object[:additions] + object[:deletions]
......
......@@ -9,11 +9,11 @@ module Types
description 'Changes to a single file'
field :path, GraphQL::STRING_TYPE, null: false,
description: 'File path, relative to repository root'
description: 'File path, relative to repository root.'
field :additions, GraphQL::INT_TYPE, null: false,
description: 'Number of lines added to this file'
description: 'Number of lines added to this file.'
field :deletions, GraphQL::INT_TYPE, null: false,
description: 'Number of lines deleted from this file'
description: 'Number of lines deleted from this file.'
end
# rubocop: enable Graphql/AuthorizeTypes
end
......@@ -10,24 +10,24 @@ module Types
authorize :read_environment
field :name, GraphQL::STRING_TYPE, null: false,
description: 'Human-readable name of the environment'
description: 'Human-readable name of the environment.'
field :id, GraphQL::ID_TYPE, null: false,
description: 'ID of the environment'
description: 'ID of the environment.'
field :state, GraphQL::STRING_TYPE, null: false,
description: 'State of the environment, for example: available/stopped'
description: 'State of the environment, for example: available/stopped.'
field :path, GraphQL::STRING_TYPE, null: false,
description: 'The path to the environment.'
field :metrics_dashboard, Types::Metrics::DashboardType, null: true,
description: 'Metrics dashboard schema for the environment',
description: 'Metrics dashboard schema for the environment.',
resolver: Resolvers::Metrics::DashboardResolver
field :latest_opened_most_severe_alert,
Types::AlertManagement::AlertType,
null: true,
description: 'The most severe open alert for the environment. If multiple alerts have equal severity, the most recent is returned'
description: 'The most severe open alert for the environment. If multiple alerts have equal severity, the most recent is returned.'
end
end
......@@ -12,93 +12,93 @@ module Types
field :id, GraphQL::ID_TYPE,
null: false,
description: 'ID (global ID) of the error'
description: 'ID (global ID) of the error.'
field :sentry_id, GraphQL::STRING_TYPE,
method: :id,
null: false,
description: 'ID (Sentry ID) of the error'
description: 'ID (Sentry ID) of the error.'
field :title, GraphQL::STRING_TYPE,
null: false,
description: 'Title of the error'
description: 'Title of the error.'
field :type, GraphQL::STRING_TYPE,
null: false,
description: 'Type of the error'
description: 'Type of the error.'
field :user_count, GraphQL::INT_TYPE,
null: false,
description: 'Count of users affected by the error'
description: 'Count of users affected by the error.'
field :count, GraphQL::INT_TYPE,
null: false,
description: 'Count of occurrences'
description: 'Count of occurrences.'
field :first_seen, Types::TimeType,
null: false,
description: 'Timestamp when the error was first seen'
description: 'Timestamp when the error was first seen.'
field :last_seen, Types::TimeType,
null: false,
description: 'Timestamp when the error was last seen'
description: 'Timestamp when the error was last seen.'
field :message, GraphQL::STRING_TYPE,
null: true,
description: 'Sentry metadata message of the error'
description: 'Sentry metadata message of the error.'
field :culprit, GraphQL::STRING_TYPE,
null: false,
description: 'Culprit of the error'
description: 'Culprit of the error.'
field :external_base_url, GraphQL::STRING_TYPE,
null: false,
description: 'External Base URL of the Sentry Instance'
description: 'External Base URL of the Sentry Instance.'
field :external_url, GraphQL::STRING_TYPE,
null: false,
description: 'External URL of the error'
description: 'External URL of the error.'
field :sentry_project_id, GraphQL::ID_TYPE,
method: :project_id,
null: false,
description: 'ID of the project (Sentry project)'
description: 'ID of the project (Sentry project).'
field :sentry_project_name, GraphQL::STRING_TYPE,
method: :project_name,
null: false,
description: 'Name of the project affected by the error'
description: 'Name of the project affected by the error.'
field :sentry_project_slug, GraphQL::STRING_TYPE,
method: :project_slug,
null: false,
description: 'Slug of the project affected by the error'
description: 'Slug of the project affected by the error.'
field :short_id, GraphQL::STRING_TYPE,
null: false,
description: 'Short ID (Sentry ID) of the error'
description: 'Short ID (Sentry ID) of the error.'
field :status, Types::ErrorTracking::SentryErrorStatusEnum,
null: false,
description: 'Status of the error'
description: 'Status of the error.'
field :frequency, [Types::ErrorTracking::SentryErrorFrequencyType],
null: false,
description: 'Last 24hr stats of the error'
description: 'Last 24hr stats of the error.'
field :first_release_last_commit, GraphQL::STRING_TYPE,
null: true,
description: 'Commit the error was first seen'
description: 'Commit the error was first seen.'
field :last_release_last_commit, GraphQL::STRING_TYPE,
null: true,
description: 'Commit the error was last seen'
description: 'Commit the error was last seen.'
field :first_release_short_version, GraphQL::STRING_TYPE,
null: true,
description: 'Release short version the error was first seen'
description: 'Release short version the error was first seen.'
field :last_release_short_version, GraphQL::STRING_TYPE,
null: true,
description: 'Release short version the error was last seen'
description: 'Release short version the error was last seen.'
field :first_release_version, GraphQL::STRING_TYPE,
null: true,
description: 'Release version the error was first seen'
description: 'Release version the error was first seen.'
field :last_release_version, GraphQL::STRING_TYPE,
null: true,
description: 'Release version the error was last seen'
description: 'Release version the error was last seen.'
field :gitlab_commit, GraphQL::STRING_TYPE,
null: true,
description: 'GitLab commit SHA attributed to the Error based on the release version'
description: 'GitLab commit SHA attributed to the Error based on the release version.'
field :gitlab_commit_path, GraphQL::STRING_TYPE,
null: true,
description: 'Path to the GitLab page for the GitLab commit attributed to the error'
description: 'Path to the GitLab page for the GitLab commit attributed to the error.'
field :gitlab_issue_path, GraphQL::STRING_TYPE,
method: :gitlab_issue,
null: true,
description: 'URL of GitLab Issue'
description: 'URL of GitLab Issue.'
field :tags, Types::ErrorTracking::SentryErrorTagsType,
null: false,
description: 'Tags associated with the Sentry Error'
description: 'Tags associated with the Sentry Error.'
end
end
end
......@@ -9,18 +9,18 @@ module Types
authorize :read_sentry_issue
field :errors,
description: "Collection of Sentry Errors",
description: "Collection of Sentry Errors.",
resolver: Resolvers::ErrorTracking::SentryErrorsResolver
field :detailed_error,
description: 'Detailed version of a Sentry error on the project',
description: 'Detailed version of a Sentry error on the project.',
resolver: Resolvers::ErrorTracking::SentryDetailedErrorResolver
field :error_stack_trace,
description: 'Stack Trace of Sentry Error',
description: 'Stack Trace of Sentry Error.',
resolver: Resolvers::ErrorTracking::SentryErrorStackTraceResolver
field :external_url,
GraphQL::STRING_TYPE,
null: true,
description: "External URL for Sentry"
description: "External URL for Sentry."
end
end
end
......@@ -8,10 +8,10 @@ module Types
field :time, Types::TimeType,
null: false,
description: "Time the error frequency stats were recorded"
description: "Time the error frequency stats were recorded."
field :count, GraphQL::INT_TYPE,
null: false,
description: "Count of errors received since the previously recorded time"
description: "Count of errors received since the previously recorded time."
end
# rubocop: enable Graphql/AuthorizeTypes
end
......
......@@ -10,11 +10,11 @@ module Types
field :line,
GraphQL::INT_TYPE,
null: false,
description: 'Line number of the context'
description: 'Line number of the context.'
field :code,
GraphQL::STRING_TYPE,
null: false,
description: 'Code number of the context'
description: 'Code number of the context.'
def line
object[0]
......
......@@ -9,19 +9,19 @@ module Types
field :function, GraphQL::STRING_TYPE,
null: true,
description: 'Function in which the Sentry error occurred'
description: 'Function in which the Sentry error occurred.'
field :col, GraphQL::STRING_TYPE,
null: true,
description: 'Function in which the Sentry error occurred'
description: 'Function in which the Sentry error occurred.'
field :line, GraphQL::STRING_TYPE,
null: true,
description: 'Function in which the Sentry error occurred'
description: 'Function in which the Sentry error occurred.'
field :file_name, GraphQL::STRING_TYPE,
null: true,
description: 'File in which the Sentry error occurred'
description: 'File in which the Sentry error occurred.'
field :trace_context, [Types::ErrorTracking::SentryErrorStackTraceContextType],
null: true,
description: 'Context of the Sentry error'
description: 'Context of the Sentry error.'
def function
object['function']
......
......@@ -10,13 +10,13 @@ module Types
field :issue_id, GraphQL::STRING_TYPE,
null: false,
description: 'ID of the Sentry error'
description: 'ID of the Sentry error.'
field :date_received, GraphQL::STRING_TYPE,
null: false,
description: 'Time the stack trace was received by Sentry'
description: 'Time the stack trace was received by Sentry.'
field :stack_trace_entries, [Types::ErrorTracking::SentryErrorStackTraceEntryType],
null: false,
description: 'Stack trace entries for the Sentry error'
description: 'Stack trace entries for the Sentry error.'
end
end
end
......@@ -9,10 +9,10 @@ module Types
field :level, GraphQL::STRING_TYPE,
null: true,
description: "Severity level of the Sentry Error"
description: "Severity level of the Sentry Error."
field :logger, GraphQL::STRING_TYPE,
null: true,
description: "Logger of the Sentry Error"
description: "Logger of the Sentry Error."
end
# rubocop: enable Graphql/AuthorizeTypes
end
......
......@@ -11,59 +11,59 @@ module Types
field :id, GraphQL::ID_TYPE,
null: false,
description: 'ID (global ID) of the error'
description: 'ID (global ID) of the error.'
field :sentry_id, GraphQL::STRING_TYPE,
method: :id,
null: false,
description: 'ID (Sentry ID) of the error'
description: 'ID (Sentry ID) of the error.'
field :first_seen, Types::TimeType,
null: false,
description: 'Timestamp when the error was first seen'
description: 'Timestamp when the error was first seen.'
field :last_seen, Types::TimeType,
null: false,
description: 'Timestamp when the error was last seen'
description: 'Timestamp when the error was last seen.'
field :title, GraphQL::STRING_TYPE,
null: false,
description: 'Title of the error'
description: 'Title of the error.'
field :type, GraphQL::STRING_TYPE,
null: false,
description: 'Type of the error'
description: 'Type of the error.'
field :user_count, GraphQL::INT_TYPE,
null: false,
description: 'Count of users affected by the error'
description: 'Count of users affected by the error.'
field :count, GraphQL::INT_TYPE,
null: false,
description: 'Count of occurrences'
description: 'Count of occurrences.'
field :message, GraphQL::STRING_TYPE,
null: true,
description: 'Sentry metadata message of the error'
description: 'Sentry metadata message of the error.'
field :culprit, GraphQL::STRING_TYPE,
null: false,
description: 'Culprit of the error'
description: 'Culprit of the error.'
field :external_url, GraphQL::STRING_TYPE,
null: false,
description: 'External URL of the error'
description: 'External URL of the error.'
field :short_id, GraphQL::STRING_TYPE,
null: false,
description: 'Short ID (Sentry ID) of the error'
description: 'Short ID (Sentry ID) of the error.'
field :status, Types::ErrorTracking::SentryErrorStatusEnum,
null: false,
description: 'Status of the error'
description: 'Status of the error.'
field :frequency, [Types::ErrorTracking::SentryErrorFrequencyType],
null: false,
description: 'Last 24hr stats of the error'
description: 'Last 24hr stats of the error.'
field :sentry_project_id, GraphQL::ID_TYPE,
method: :project_id,
null: false,
description: 'ID of the project (Sentry project)'
description: 'ID of the project (Sentry project).'
field :sentry_project_name, GraphQL::STRING_TYPE,
method: :project_name,
null: false,
description: 'Name of the project affected by the error'
description: 'Name of the project affected by the error.'
field :sentry_project_slug, GraphQL::STRING_TYPE,
method: :project_slug,
null: false,
description: 'Slug of the project affected by the error'
description: 'Slug of the project affected by the error.'
end
# rubocop: enable Graphql/AuthorizeTypes
end
......
......@@ -10,12 +10,12 @@ module Types
present_using Releases::EvidencePresenter
field :id, GraphQL::ID_TYPE, null: false,
description: 'ID of the evidence'
description: 'ID of the evidence.'
field :sha, GraphQL::STRING_TYPE, null: true,
description: 'SHA1 ID of the evidence hash'
description: 'SHA1 ID of the evidence hash.'
field :filepath, GraphQL::STRING_TYPE, null: true,
description: 'URL from where the evidence can be downloaded'
description: 'URL from where the evidence can be downloaded.'
field :collected_at, Types::TimeType, null: true,
description: 'Timestamp when the evidence was collected'
description: 'Timestamp when the evidence was collected.'
end
end
......@@ -7,14 +7,14 @@ module Types
authorize :admin_operations
field :id, GraphQL::ID_TYPE, null: false,
description: 'Internal ID of the Grafana integration'
description: 'Internal ID of the Grafana integration.'
field :grafana_url, GraphQL::STRING_TYPE, null: false,
description: 'URL for the Grafana host for the Grafana integration'
description: 'URL for the Grafana host for the Grafana integration.'
field :enabled, GraphQL::BOOLEAN_TYPE, null: false,
description: 'Indicates whether Grafana integration is enabled'
description: 'Indicates whether Grafana integration is enabled.'
field :created_at, Types::TimeType, null: false,
description: 'Timestamp of the issue\'s creation'
description: 'Timestamp of the issue\'s creation.'
field :updated_at, Types::TimeType, null: false,
description: 'Timestamp of the issue\'s last activity'
description: 'Timestamp of the issue\'s last activity.'
end
end
......@@ -11,7 +11,7 @@ module Types
description 'Represents a Group Invitation'
field :group, Types::GroupType, null: true,
description: 'Group that a User is invited to'
description: 'Group that a User is invited to.'
def group
Gitlab::Graphql::Loaders::BatchModelLoader.new(Group, object.source_id).find
......
......@@ -11,7 +11,7 @@ module Types
description 'Represents a Group Membership'
field :group, Types::GroupType, null: true,
description: 'Group that a User is a member of'
description: 'Group that a User is a member of.'
def group
Gitlab::Graphql::Loaders::BatchModelLoader.new(Group, object.source_id).find
......
......@@ -9,91 +9,91 @@ module Types
expose_permissions Types::PermissionTypes::Group
field :web_url, GraphQL::STRING_TYPE, null: false,
description: 'Web URL of the group'
description: 'Web URL of the group.'
field :avatar_url, GraphQL::STRING_TYPE, null: true,
description: 'Avatar URL of the group'
description: 'Avatar URL of the group.'
field :custom_emoji, Types::CustomEmojiType.connection_type, null: true,
description: 'Custom emoji within this namespace',
description: 'Custom emoji within this namespace.',
feature_flag: :custom_emoji
field :share_with_group_lock, GraphQL::BOOLEAN_TYPE, null: true,
description: 'Indicates if sharing a project with another group within this group is prevented'
description: 'Indicates if sharing a project with another group within this group is prevented.'
field :project_creation_level, GraphQL::STRING_TYPE, null: true, method: :project_creation_level_str,
description: 'The permission level required to create projects in the group'
description: 'The permission level required to create projects in the group.'
field :subgroup_creation_level, GraphQL::STRING_TYPE, null: true, method: :subgroup_creation_level_str,
description: 'The permission level required to create subgroups within the group'
description: 'The permission level required to create subgroups within the group.'
field :require_two_factor_authentication, GraphQL::BOOLEAN_TYPE, null: true,
description: 'Indicates if all users in this group are required to set up two-factor authentication'
description: 'Indicates if all users in this group are required to set up two-factor authentication.'
field :two_factor_grace_period, GraphQL::INT_TYPE, null: true,
description: 'Time before two-factor authentication is enforced'
description: 'Time before two-factor authentication is enforced.'
field :auto_devops_enabled, GraphQL::BOOLEAN_TYPE, null: true,
description: 'Indicates whether Auto DevOps is enabled for all projects within this group'
description: 'Indicates whether Auto DevOps is enabled for all projects within this group.'
field :emails_disabled, GraphQL::BOOLEAN_TYPE, null: true,
description: 'Indicates if a group has email notifications disabled'
description: 'Indicates if a group has email notifications disabled.'
field :mentions_disabled, GraphQL::BOOLEAN_TYPE, null: true,
description: 'Indicates if a group is disabled from getting mentioned'
description: 'Indicates if a group is disabled from getting mentioned.'
field :parent, GroupType, null: true,
description: 'Parent group'
description: 'Parent group.'
field :issues,
Types::IssueType.connection_type,
null: true,
description: 'Issues for projects in this group',
description: 'Issues for projects in this group.',
resolver: Resolvers::GroupIssuesResolver
field :merge_requests,
Types::MergeRequestType.connection_type,
null: true,
description: 'Merge requests for projects in this group',
description: 'Merge requests for projects in this group.',
resolver: Resolvers::GroupMergeRequestsResolver
field :milestones, Types::MilestoneType.connection_type, null: true,
description: 'Milestones of the group',
description: 'Milestones of the group.',
resolver: Resolvers::GroupMilestonesResolver
field :boards,
Types::BoardType.connection_type,
null: true,
description: 'Boards of the group',
description: 'Boards of the group.',
max_page_size: 2000,
resolver: Resolvers::BoardsResolver
field :board,
Types::BoardType,
null: true,
description: 'A single board of the group',
description: 'A single board of the group.',
resolver: Resolvers::BoardResolver
field :label,
Types::LabelType,
null: true,
description: 'A label available on this group' do
description: 'A label available on this group.' do
argument :title, GraphQL::STRING_TYPE,
required: true,
description: 'Title of the label'
description: 'Title of the label.'
end
field :group_members,
description: 'A membership of a user within this group',
description: 'A membership of a user within this group.',
resolver: Resolvers::GroupMembersResolver
field :container_repositories,
Types::ContainerRepositoryType.connection_type,
null: true,
description: 'Container repositories of the group',
description: 'Container repositories of the group.',
resolver: Resolvers::ContainerRepositoriesResolver,
authorize: :read_container_image
field :container_repositories_count, GraphQL::INT_TYPE, null: false,
description: 'Number of container repositories in the group'
description: 'Number of container repositories in the group.'
def label(title:)
BatchLoader::GraphQL.for(title).batch(key: group) do |titles, loader, args|
......@@ -107,10 +107,10 @@ module Types
field :labels,
Types::LabelType.connection_type,
null: true,
description: 'Labels available on this group' do
description: 'Labels available on this group.' do
argument :search_term, GraphQL::STRING_TYPE,
required: false,
description: 'A search term to find labels with'
description: 'A search term to find labels with.'
end
def labels(search_term: nil)
......
This diff is collapsed.
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