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: ...@@ -750,66 +750,6 @@ RSpec/TimecopTravel:
Graphql/Descriptions: Graphql/Descriptions:
Exclude: 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/invitation_interface.rb'
- 'app/graphql/types/issue_type.rb' - 'app/graphql/types/issue_type.rb'
- 'app/graphql/types/jira_import_type.rb' - 'app/graphql/types/jira_import_type.rb'
......
...@@ -7,11 +7,11 @@ module Types ...@@ -7,11 +7,11 @@ module Types
description 'Represents the access level of a relationship between a User and object that it is related to' 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, field :integer_value, GraphQL::INT_TYPE, null: true,
description: 'Integer representation of access level', description: 'Integer representation of access level.',
method: :to_i method: :to_i
field :string_value, Types::AccessLevelEnum, null: true, field :string_value, Types::AccessLevelEnum, null: true,
description: 'String representation of access level', description: 'String representation of access level.',
method: :to_i method: :to_i
end end
end end
...@@ -12,13 +12,13 @@ module Types ...@@ -12,13 +12,13 @@ module Types
authorize :read_instance_statistics_measurements authorize :read_instance_statistics_measurements
field :recorded_at, Types::TimeType, null: true, 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, field :count, GraphQL::INT_TYPE, null: false,
description: 'Object count' description: 'Object count.'
field :identifier, Types::Admin::Analytics::InstanceStatistics::MeasurementIdentifierEnum, null: false, 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 end
end end
......
...@@ -12,17 +12,17 @@ module Types ...@@ -12,17 +12,17 @@ module Types
field :completed, field :completed,
GraphQL::BOOLEAN_TYPE, GraphQL::BOOLEAN_TYPE,
null: true, 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, field :deleted_jobs,
GraphQL::INT_TYPE, GraphQL::INT_TYPE,
null: true, null: true,
description: 'The number of matching jobs deleted' description: 'The number of matching jobs deleted.'
field :queue_size, field :queue_size,
GraphQL::INT_TYPE, GraphQL::INT_TYPE,
null: true, null: true,
description: 'The queue size after processing' description: 'The queue size after processing.'
end end
end end
end end
......
...@@ -19,12 +19,12 @@ module Types ...@@ -19,12 +19,12 @@ module Types
field :open, field :open,
GraphQL::INT_TYPE, GraphQL::INT_TYPE,
null: true, 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, field :all,
GraphQL::INT_TYPE, GraphQL::INT_TYPE,
null: true, null: true,
description: 'Total number of alerts for the project' description: 'Total number of alerts for the project.'
end end
end end
end end
...@@ -15,115 +15,115 @@ module Types ...@@ -15,115 +15,115 @@ module Types
field :iid, field :iid,
GraphQL::ID_TYPE, GraphQL::ID_TYPE,
null: false, null: false,
description: 'Internal ID of the alert' description: 'Internal ID of the alert.'
field :issue_iid, field :issue_iid,
GraphQL::ID_TYPE, GraphQL::ID_TYPE,
null: true, 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, field :title,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
null: true, null: true,
description: 'Title of the alert' description: 'Title of the alert.'
field :description, field :description,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
null: true, null: true,
description: 'Description of the alert' description: 'Description of the alert.'
field :severity, field :severity,
AlertManagement::SeverityEnum, AlertManagement::SeverityEnum,
null: true, null: true,
description: 'Severity of the alert' description: 'Severity of the alert.'
field :status, field :status,
AlertManagement::StatusEnum, AlertManagement::StatusEnum,
null: true, null: true,
description: 'Status of the alert', description: 'Status of the alert.',
method: :status_name method: :status_name
field :service, field :service,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
null: true, null: true,
description: 'Service the alert came from' description: 'Service the alert came from.'
field :monitoring_tool, field :monitoring_tool,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
null: true, null: true,
description: 'Monitoring tool the alert came from' description: 'Monitoring tool the alert came from.'
field :hosts, field :hosts,
[GraphQL::STRING_TYPE], [GraphQL::STRING_TYPE],
null: true, null: true,
description: 'List of hosts the alert came from' description: 'List of hosts the alert came from.'
field :started_at, field :started_at,
Types::TimeType, Types::TimeType,
null: true, null: true,
description: 'Timestamp the alert was raised' description: 'Timestamp the alert was raised.'
field :ended_at, field :ended_at,
Types::TimeType, Types::TimeType,
null: true, null: true,
description: 'Timestamp the alert ended' description: 'Timestamp the alert ended.'
field :environment, field :environment,
Types::EnvironmentType, Types::EnvironmentType,
null: true, null: true,
description: 'Environment for the alert' description: 'Environment for the alert.'
field :event_count, field :event_count,
GraphQL::INT_TYPE, GraphQL::INT_TYPE,
null: true, null: true,
description: 'Number of events of this alert', description: 'Number of events of this alert.',
method: :events method: :events
field :details, # rubocop:disable Graphql/JSONType field :details, # rubocop:disable Graphql/JSONType
GraphQL::Types::JSON, GraphQL::Types::JSON,
null: true, null: true,
description: 'Alert details' description: 'Alert details.'
field :created_at, field :created_at,
Types::TimeType, Types::TimeType,
null: true, null: true,
description: 'Timestamp the alert was created' description: 'Timestamp the alert was created.'
field :updated_at, field :updated_at,
Types::TimeType, Types::TimeType,
null: true, null: true,
description: 'Timestamp the alert was last updated' description: 'Timestamp the alert was last updated.'
field :assignees, field :assignees,
Types::UserType.connection_type, Types::UserType.connection_type,
null: true, null: true,
description: 'Assignees of the alert' description: 'Assignees of the alert.'
field :metrics_dashboard_url, field :metrics_dashboard_url,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
null: true, null: true,
description: 'URL for metrics embed for the alert' description: 'URL for metrics embed for the alert.'
field :runbook, field :runbook,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
null: true, null: true,
description: 'Runbook for the alert as defined in alert details' description: 'Runbook for the alert as defined in alert details.'
field :todos, field :todos,
Types::TodoType.connection_type, Types::TodoType.connection_type,
null: true, null: true,
description: 'Todos of the current user for the alert', description: 'Todos of the current user for the alert.',
resolver: Resolvers::TodoResolver resolver: Resolvers::TodoResolver
field :details_url, field :details_url,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
null: false, null: false,
description: 'The URL of the alert detail page' description: 'The URL of the alert detail page.'
field :prometheus_alert, field :prometheus_alert,
Types::PrometheusAlertType, Types::PrometheusAlertType,
null: true, null: true,
description: 'The alert condition for Prometheus' description: 'The alert condition for Prometheus.'
def notes def notes
object.ordered_notes object.ordered_notes
......
...@@ -9,37 +9,37 @@ module Types ...@@ -9,37 +9,37 @@ module Types
field :id, field :id,
GraphQL::ID_TYPE, GraphQL::ID_TYPE,
null: false, null: false,
description: 'ID of the integration' description: 'ID of the integration.'
field :type, field :type,
AlertManagement::IntegrationTypeEnum, AlertManagement::IntegrationTypeEnum,
null: false, null: false,
description: 'Type of integration' description: 'Type of integration.'
field :name, field :name,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
null: true, null: true,
description: 'Name of the integration' description: 'Name of the integration.'
field :active, field :active,
GraphQL::BOOLEAN_TYPE, GraphQL::BOOLEAN_TYPE,
null: true, null: true,
description: 'Whether the endpoint is currently accepting alerts' description: 'Whether the endpoint is currently accepting alerts.'
field :token, field :token,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
null: true, null: true,
description: 'Token used to authenticate alert notification requests' description: 'Token used to authenticate alert notification requests.'
field :url, field :url,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
null: true, null: true,
description: 'Endpoint which accepts alert notifications' description: 'Endpoint which accepts alert notifications.'
field :api_url, field :api_url,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
null: true, 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 definition_methods do
def resolve_type(object, context) def resolve_type(object, context)
......
...@@ -13,32 +13,32 @@ module Types ...@@ -13,32 +13,32 @@ module Types
field :name, field :name,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
null: false, null: false,
description: 'The emoji name' description: 'The emoji name.'
field :description, field :description,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
null: false, null: false,
description: 'The emoji description' description: 'The emoji description.'
field :unicode, field :unicode,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
null: false, null: false,
description: 'The emoji in unicode' description: 'The emoji in unicode.'
field :emoji, field :emoji,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
null: false, null: false,
description: 'The emoji as an icon' description: 'The emoji as an icon.'
field :unicode_version, field :unicode_version,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
null: false, null: false,
description: 'The unicode version for this emoji' description: 'The unicode version for this emoji.'
field :user, field :user,
Types::UserType, Types::UserType,
null: false, null: false,
description: 'The user who awarded the emoji' description: 'The user who awarded the emoji.'
def user def user
Gitlab::Graphql::Loaders::BatchModelLoader.new(User, object.user_id).find Gitlab::Graphql::Loaders::BatchModelLoader.new(User, object.user_id).find
......
...@@ -9,22 +9,22 @@ module Types ...@@ -9,22 +9,22 @@ module Types
description 'Represents a list for an issue board' description 'Represents a list for an issue board'
field :id, GraphQL::ID_TYPE, null: false, 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, 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, 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, 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, field :label, Types::LabelType, null: true,
description: 'Label of the list' description: 'Label of the list.'
field :collapsed, GraphQL::BOOLEAN_TYPE, null: true, 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, 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, field :issues, ::Types::IssueType.connection_type, null: true,
description: 'Board issues', description: 'Board issues.',
resolver: ::Resolvers::BoardListIssuesResolver resolver: ::Resolvers::BoardListIssuesResolver
def issues_count def issues_count
......
...@@ -10,20 +10,20 @@ module Types ...@@ -10,20 +10,20 @@ module Types
present_using BoardPresenter present_using BoardPresenter
field :id, type: GraphQL::ID_TYPE, null: false, 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, 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, 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, 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, field :lists,
Types::BoardListType.connection_type, Types::BoardListType.connection_type,
null: true, null: true,
description: 'Lists of the board', description: 'Lists of the board.',
resolver: Resolvers::BoardListsResolver, resolver: Resolvers::BoardListsResolver,
extras: [:lookahead] extras: [:lookahead]
......
...@@ -6,27 +6,27 @@ module Types ...@@ -6,27 +6,27 @@ module Types
class BoardIssueInputBaseType < BaseInputObject class BoardIssueInputBaseType < BaseInputObject
argument :label_name, GraphQL::STRING_TYPE.to_list_type, argument :label_name, GraphQL::STRING_TYPE.to_list_type,
required: false, required: false,
description: 'Filter by label name' description: 'Filter by label name.'
argument :milestone_title, GraphQL::STRING_TYPE, argument :milestone_title, GraphQL::STRING_TYPE,
required: false, required: false,
description: 'Filter by milestone title' description: 'Filter by milestone title.'
argument :assignee_username, GraphQL::STRING_TYPE.to_list_type, argument :assignee_username, GraphQL::STRING_TYPE.to_list_type,
required: false, required: false,
description: 'Filter by assignee username' description: 'Filter by assignee username.'
argument :author_username, GraphQL::STRING_TYPE, argument :author_username, GraphQL::STRING_TYPE,
required: false, required: false,
description: 'Filter by author username' description: 'Filter by author username.'
argument :release_tag, GraphQL::STRING_TYPE, argument :release_tag, GraphQL::STRING_TYPE,
required: false, required: false,
description: 'Filter by release tag' description: 'Filter by release tag.'
argument :my_reaction_emoji, GraphQL::STRING_TYPE, argument :my_reaction_emoji, GraphQL::STRING_TYPE,
required: false, required: false,
description: 'Filter by reaction emoji' description: 'Filter by reaction emoji.'
end end
# rubocop: enable Graphql/AuthorizeTypes # rubocop: enable Graphql/AuthorizeTypes
end end
......
...@@ -11,11 +11,11 @@ module Types ...@@ -11,11 +11,11 @@ module Types
argument :not, NegatedBoardIssueInputType, argument :not, NegatedBoardIssueInputType,
required: false, 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, argument :search, GraphQL::STRING_TYPE,
required: false, required: false,
description: 'Search query for issue title or description' description: 'Search query for issue title or description.'
end end
# rubocop: enable Graphql/AuthorizeTypes # rubocop: enable Graphql/AuthorizeTypes
end end
......
...@@ -8,11 +8,11 @@ module Types ...@@ -8,11 +8,11 @@ module Types
field :name, field :name,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
null: false, null: false,
description: 'Name of the branch' description: 'Name of the branch.'
field :commit, Types::CommitType, field :commit, Types::CommitType,
null: true, resolver: Resolvers::BranchCommitResolver, null: true, resolver: Resolvers::BranchCommitResolver,
description: 'Commit for the branch' description: 'Commit for the branch.'
end end
# rubocop: enable Graphql/AuthorizeTypes # rubocop: enable Graphql/AuthorizeTypes
end end
...@@ -7,27 +7,27 @@ module Types ...@@ -7,27 +7,27 @@ module Types
graphql_name 'PipelineAnalytics' graphql_name 'PipelineAnalytics'
field :week_pipelines_totals, [GraphQL::INT_TYPE], null: true, 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, 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, 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, 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, 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, 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, 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, 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, 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, field :pipeline_times_values, [GraphQL::INT_TYPE], null: true,
description: 'Pipeline times' description: 'Pipeline times.'
field :pipeline_times_labels, [GraphQL::STRING_TYPE], null: true, field :pipeline_times_labels, [GraphQL::STRING_TYPE], null: true,
description: 'Pipeline times labels' description: 'Pipeline times labels.'
end end
end end
end end
...@@ -8,13 +8,13 @@ module Types ...@@ -8,13 +8,13 @@ module Types
graphql_name 'CiConfig' graphql_name 'CiConfig'
field :errors, [GraphQL::STRING_TYPE], null: true, field :errors, [GraphQL::STRING_TYPE], null: true,
description: 'Linting errors' description: 'Linting errors.'
field :merged_yaml, GraphQL::STRING_TYPE, null: true, 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, 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, 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 end
end end
......
...@@ -8,11 +8,11 @@ module Types ...@@ -8,11 +8,11 @@ module Types
graphql_name 'CiConfigGroup' graphql_name 'CiConfigGroup'
field :name, GraphQL::STRING_TYPE, null: true, 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, 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, field :size, GraphQL::INT_TYPE, null: true,
description: 'Size of the job group' description: 'Size of the job group.'
end end
end end
end end
......
...@@ -8,7 +8,7 @@ module Types ...@@ -8,7 +8,7 @@ module Types
graphql_name 'CiConfigNeed' graphql_name 'CiConfigNeed'
field :name, GraphQL::STRING_TYPE, null: true, field :name, GraphQL::STRING_TYPE, null: true,
description: 'Name of the need' description: 'Name of the need.'
end end
end end
end end
......
...@@ -8,9 +8,9 @@ module Types ...@@ -8,9 +8,9 @@ module Types
graphql_name 'CiConfigStage' graphql_name 'CiConfigStage'
field :name, GraphQL::STRING_TYPE, null: true, 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, 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 end
end end
......
...@@ -7,26 +7,26 @@ module Types ...@@ -7,26 +7,26 @@ module Types
graphql_name 'DetailedStatus' graphql_name 'DetailedStatus'
field :group, GraphQL::STRING_TYPE, null: true, field :group, GraphQL::STRING_TYPE, null: true,
description: 'Group of the status' description: 'Group of the status.'
field :icon, GraphQL::STRING_TYPE, null: true, field :icon, GraphQL::STRING_TYPE, null: true,
description: 'Icon of the status' description: 'Icon of the status.'
field :favicon, GraphQL::STRING_TYPE, null: true, 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, 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, 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? method: :has_details?
field :label, GraphQL::STRING_TYPE, null: true, field :label, GraphQL::STRING_TYPE, null: true,
description: 'Label of the status' description: 'Label of the status.'
field :text, GraphQL::STRING_TYPE, null: true, field :text, GraphQL::STRING_TYPE, null: true,
description: 'Text of the status' description: 'Text of the status.'
field :tooltip, GraphQL::STRING_TYPE, null: true, field :tooltip, GraphQL::STRING_TYPE, null: true,
description: 'Tooltip associated with the status', description: 'Tooltip associated with the status.',
method: :status_tooltip method: :status_tooltip
field :action, Types::Ci::StatusActionType, null: true, field :action, Types::Ci::StatusActionType, null: true,
calls_gitaly: 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 def action
if object.has_action? if object.has_action?
......
...@@ -7,13 +7,13 @@ module Types ...@@ -7,13 +7,13 @@ module Types
graphql_name 'CiGroup' graphql_name 'CiGroup'
field :name, GraphQL::STRING_TYPE, null: true, 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, 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, field :jobs, Ci::JobType.connection_type, null: true,
description: 'Jobs in group' description: 'Jobs in group.'
field :detailed_status, Types::Ci::DetailedStatusType, null: true, field :detailed_status, Types::Ci::DetailedStatusType, null: true,
description: 'Detailed status of the group' description: 'Detailed status of the group.'
def detailed_status def detailed_status
object.detailed_status(context[:current_user]) object.detailed_status(context[:current_user])
......
...@@ -7,10 +7,10 @@ module Types ...@@ -7,10 +7,10 @@ module Types
graphql_name 'CiJobArtifact' graphql_name 'CiJobArtifact'
field :download_path, GraphQL::STRING_TYPE, null: true, 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, field :file_type, ::Types::Ci::JobArtifactFileTypeEnum, null: true,
description: 'File type of the artifact' description: 'File type of the artifact.'
def download_path def download_path
::Gitlab::Routing.url_helpers.download_project_job_artifacts_path( ::Gitlab::Routing.url_helpers.download_project_job_artifacts_path(
......
...@@ -7,17 +7,17 @@ module Types ...@@ -7,17 +7,17 @@ module Types
authorize :read_commit_status authorize :read_commit_status
field :pipeline, Types::Ci::PipelineType, null: true, 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, field :name, GraphQL::STRING_TYPE, null: true,
description: 'Name of the job' description: 'Name of the job.'
field :needs, BuildNeedType.connection_type, null: true, 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, 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, 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, field :artifacts, Types::Ci::JobArtifactType.connection_type, null: true,
description: 'Artifacts generated by the job' description: 'Artifacts generated by the job.'
def pipeline def pipeline
Gitlab::Graphql::Loaders::BatchModelLoader.new(::Ci::Pipeline, object.pipeline_id).find Gitlab::Graphql::Loaders::BatchModelLoader.new(::Ci::Pipeline, object.pipeline_id).find
......
...@@ -12,90 +12,90 @@ module Types ...@@ -12,90 +12,90 @@ module Types
expose_permissions Types::PermissionTypes::Ci::Pipeline expose_permissions Types::PermissionTypes::Ci::Pipeline
field :id, GraphQL::ID_TYPE, null: false, field :id, GraphQL::ID_TYPE, null: false,
description: 'ID of the pipeline' description: 'ID of the pipeline.'
field :iid, GraphQL::STRING_TYPE, null: false, 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, 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, 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, field :status, PipelineStatusEnum, null: false,
description: "Status of the pipeline (#{::Ci::Pipeline.all_state_names.compact.join(', ').upcase})" description: "Status of the pipeline (#{::Ci::Pipeline.all_state_names.compact.join(', ').upcase})"
field :detailed_status, Types::Ci::DetailedStatusType, null: false, 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, field :config_source, PipelineConfigSourceEnum, null: true,
description: "Config source of the pipeline (#{::Enums::Ci::Pipeline.config_sources.keys.join(', ').upcase})" description: "Config source of the pipeline (#{::Enums::Ci::Pipeline.config_sources.keys.join(', ').upcase})"
field :duration, GraphQL::INT_TYPE, null: true, 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, field :coverage, GraphQL::FLOAT_TYPE, null: true,
description: 'Coverage percentage' description: 'Coverage percentage.'
field :created_at, Types::TimeType, null: false, 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, 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, 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, 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, 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, field :stages, Types::Ci::StageType.connection_type, null: true,
description: 'Stages of the pipeline', description: 'Stages of the pipeline.',
extras: [:lookahead], extras: [:lookahead],
resolver: Resolvers::Ci::PipelineStagesResolver resolver: Resolvers::Ci::PipelineStagesResolver
field :user, Types::UserType, null: true, field :user, Types::UserType, null: true,
description: 'Pipeline user' description: 'Pipeline user.'
field :retryable, GraphQL::BOOLEAN_TYPE, field :retryable, GraphQL::BOOLEAN_TYPE,
description: 'Specifies if a pipeline can be retried', description: 'Specifies if a pipeline can be retried.',
method: :retryable?, method: :retryable?,
null: false null: false
field :cancelable, GraphQL::BOOLEAN_TYPE, field :cancelable, GraphQL::BOOLEAN_TYPE,
description: 'Specifies if a pipeline can be canceled', description: 'Specifies if a pipeline can be canceled.',
method: :cancelable?, method: :cancelable?,
null: false null: false
field :jobs, field :jobs,
::Types::Ci::JobType.connection_type, ::Types::Ci::JobType.connection_type,
null: true, null: true,
description: 'Jobs belonging to the pipeline', description: 'Jobs belonging to the pipeline.',
resolver: ::Resolvers::Ci::JobsResolver resolver: ::Resolvers::Ci::JobsResolver
field :source_job, Types::Ci::JobType, null: true, 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, 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 method: :triggered_pipelines_with_preloads
field :upstream, Types::Ci::PipelineType, null: true, field :upstream, Types::Ci::PipelineType, null: true,
description: 'Pipeline that triggered the pipeline', description: 'Pipeline that triggered the pipeline.',
method: :triggered_by_pipeline method: :triggered_by_pipeline
field :path, GraphQL::STRING_TYPE, null: true, 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, 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?, 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 def detailed_status
object.detailed_status(context[:current_user]) object.detailed_status(context[:current_user])
......
...@@ -7,9 +7,9 @@ module Types ...@@ -7,9 +7,9 @@ module Types
graphql_name 'RunnerArchitecture' graphql_name 'RunnerArchitecture'
field :name, GraphQL::STRING_TYPE, null: false, 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, 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 end
end end
...@@ -7,11 +7,11 @@ module Types ...@@ -7,11 +7,11 @@ module Types
graphql_name 'RunnerPlatform' graphql_name 'RunnerPlatform'
field :name, GraphQL::STRING_TYPE, null: false, 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, 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, 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 end
end end
...@@ -7,9 +7,9 @@ module Types ...@@ -7,9 +7,9 @@ module Types
graphql_name 'RunnerSetup' graphql_name 'RunnerSetup'
field :install_instructions, GraphQL::STRING_TYPE, null: false, 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, field :register_instructions, GraphQL::STRING_TYPE, null: true,
description: 'Instructions for registering the runner' description: 'Instructions for registering the runner.'
end end
end end
end end
...@@ -7,12 +7,12 @@ module Types ...@@ -7,12 +7,12 @@ module Types
graphql_name 'CiStage' graphql_name 'CiStage'
field :name, GraphQL::STRING_TYPE, null: true, 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, field :groups, Ci::GroupType.connection_type, null: true,
extras: [:lookahead], extras: [:lookahead],
description: 'Group of jobs for the stage' description: 'Group of jobs for the stage.'
field :detailed_status, Types::Ci::DetailedStatusType, null: true, field :detailed_status, Types::Ci::DetailedStatusType, null: true,
description: 'Detailed status of the stage' description: 'Detailed status of the stage.'
def detailed_status def detailed_status
object.detailed_status(context[:current_user]) object.detailed_status(context[:current_user])
......
...@@ -6,16 +6,16 @@ module Types ...@@ -6,16 +6,16 @@ module Types
graphql_name 'StatusAction' graphql_name 'StatusAction'
field :button_title, GraphQL::STRING_TYPE, null: true, 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, 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, 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 resolver_method: :action_method
field :path, GraphQL::STRING_TYPE, null: true, field :path, GraphQL::STRING_TYPE, null: true,
description: 'Path for the action' description: 'Path for the action.'
field :title, GraphQL::STRING_TYPE, null: true, 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 def action_method
object[:method] object[:method]
......
...@@ -4,19 +4,19 @@ module Types ...@@ -4,19 +4,19 @@ module Types
# rubocop: disable Graphql/AuthorizeTypes # rubocop: disable Graphql/AuthorizeTypes
class CommitActionType < BaseInputObject class CommitActionType < BaseInputObject
argument :action, type: Types::CommitActionModeEnum, required: true, 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, 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, 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, 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, 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, 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, argument :encoding, type: Types::CommitEncodingEnum, required: false,
description: 'Encoding of the file. Default is text' description: 'Encoding of the file. Default is text.'
end end
# rubocop: enable Graphql/AuthorizeTypes # rubocop: enable Graphql/AuthorizeTypes
end end
...@@ -9,39 +9,39 @@ module Types ...@@ -9,39 +9,39 @@ module Types
present_using CommitPresenter present_using CommitPresenter
field :id, type: GraphQL::ID_TYPE, null: false, 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, 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, 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, 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 markdown_field :title_html, null: true
field :description, type: GraphQL::STRING_TYPE, 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 markdown_field :description_html, null: true
field :message, type: GraphQL::STRING_TYPE, 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, 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, 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, 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, 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, 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, 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 # models/commit lazy loads the author by email
field :author, type: Types::UserType, null: true, field :author, type: Types::UserType, null: true,
description: 'Author of the commit' description: 'Author of the commit.'
field :pipelines, field :pipelines,
null: true, null: true,
description: 'Pipelines of the commit ordered latest first', description: 'Pipelines of the commit ordered latest first.',
resolver: Resolvers::CommitPipelinesResolver resolver: Resolvers::CommitPipelinesResolver
def author_gravatar def author_gravatar
......
...@@ -8,14 +8,14 @@ module Types ...@@ -8,14 +8,14 @@ module Types
authorize :destroy_container_image authorize :destroy_container_image
field :created_at, Types::TimeType, null: false, description: 'Timestamp of when the container expiration policy was created' 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 :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 :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 :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 :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 :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, 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 :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 :next_run_at, Types::TimeType, null: true, description: 'Next time that this container expiration policy will get executed.'
end end
end end
...@@ -11,7 +11,7 @@ module Types ...@@ -11,7 +11,7 @@ module Types
field :tags, field :tags,
Types::ContainerRepositoryTagType.connection_type, Types::ContainerRepositoryTagType.connection_type,
null: true, null: true,
description: 'Tags of the container repository', description: 'Tags of the container repository.',
max_page_size: 20 max_page_size: 20
def can_delete def can_delete
......
...@@ -19,7 +19,7 @@ module Types ...@@ -19,7 +19,7 @@ module Types
field :status, Types::ContainerRepositoryStatusEnum, null: true, description: 'Status of the container repository.' 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 :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 :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 def can_delete
Ability.allowed?(current_user, :update_container_image, object) Ability.allowed?(current_user, :update_container_image, object)
......
...@@ -4,7 +4,7 @@ module Types ...@@ -4,7 +4,7 @@ module Types
# rubocop: disable Graphql/AuthorizeTypes # rubocop: disable Graphql/AuthorizeTypes
class CountableConnectionType < GraphQL::Types::Relay::BaseConnection class CountableConnectionType < GraphQL::Types::Relay::BaseConnection
field :count, GraphQL::INT_TYPE, null: false, field :count, GraphQL::INT_TYPE, null: false,
description: 'Total count of collection' description: 'Total count of collection.'
def count def count
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
......
...@@ -8,10 +8,10 @@ module Types ...@@ -8,10 +8,10 @@ module Types
field_class Types::BaseField field_class Types::BaseField
field :current_user_todos, Types::TodoType.connection_type, field :current_user_todos, Types::TodoType.connection_type,
description: 'Todos for the current user', description: 'Todos for the current user.',
null: false do null: false do
argument :state, Types::TodoStateEnum, argument :state, Types::TodoStateEnum,
description: 'State of the todos', description: 'State of the todos.',
required: false required: false
end end
......
...@@ -9,19 +9,19 @@ module Types ...@@ -9,19 +9,19 @@ module Types
field :id, ::Types::GlobalIDType[::CustomEmoji], field :id, ::Types::GlobalIDType[::CustomEmoji],
null: false, null: false,
description: 'The ID of the emoji' description: 'The ID of the emoji.'
field :name, GraphQL::STRING_TYPE, field :name, GraphQL::STRING_TYPE,
null: false, null: false,
description: 'The name of the emoji' description: 'The name of the emoji.'
field :url, GraphQL::STRING_TYPE, field :url, GraphQL::STRING_TYPE,
null: false, null: false,
method: :file, method: :file,
description: 'The link to file of the emoji' description: 'The link to file of the emoji.'
field :external, GraphQL::BOOLEAN_TYPE, field :external, GraphQL::BOOLEAN_TYPE,
null: false, null: false,
description: 'Whether the emoji is an external link' description: 'Whether the emoji is an external link.'
end end
end end
...@@ -18,12 +18,12 @@ module Types ...@@ -18,12 +18,12 @@ module Types
field :version, field :version,
Types::DesignManagement::VersionType, Types::DesignManagement::VersionType,
null: false, null: false,
description: 'The version this design-at-versions is pinned to' description: 'The version this design-at-versions is pinned to.'
field :design, field :design,
Types::DesignManagement::DesignType, Types::DesignManagement::DesignType,
null: false, null: false,
description: 'The underlying design' description: 'The underlying design.'
def cached_stateful_version(_parent) def cached_stateful_version(_parent)
version version
......
...@@ -9,40 +9,40 @@ module Types ...@@ -9,40 +9,40 @@ module Types
authorize :read_design authorize :read_design
field :project, Types::ProjectType, null: false, 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, field :issue, Types::IssueType, null: false,
description: 'Issue associated with the design collection' description: 'Issue associated with the design collection.'
field :designs, field :designs,
Types::DesignManagement::DesignType.connection_type, Types::DesignManagement::DesignType.connection_type,
null: false, null: false,
resolver: Resolvers::DesignManagement::DesignsResolver, resolver: Resolvers::DesignManagement::DesignsResolver,
description: 'All designs for the design collection', description: 'All designs for the design collection.',
complexity: 5 complexity: 5
field :versions, field :versions,
Types::DesignManagement::VersionType.connection_type, Types::DesignManagement::VersionType.connection_type,
resolver: Resolvers::DesignManagement::VersionsResolver, 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, field :version,
Types::DesignManagement::VersionType, Types::DesignManagement::VersionType,
resolver: Resolvers::DesignManagement::VersionsResolver.single, resolver: Resolvers::DesignManagement::VersionsResolver.single,
description: 'A specific version' description: 'A specific version.'
field :design_at_version, ::Types::DesignManagement::DesignAtVersionType, field :design_at_version, ::Types::DesignManagement::DesignAtVersionType,
null: true, null: true,
resolver: ::Resolvers::DesignManagement::DesignAtVersionResolver, 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, field :design, ::Types::DesignManagement::DesignType,
null: true, null: true,
resolver: ::Resolvers::DesignManagement::DesignResolver, resolver: ::Resolvers::DesignManagement::DesignResolver,
description: 'Find a specific design' description: 'Find a specific design.'
field :copy_state, ::Types::DesignManagement::DesignCollectionCopyStateEnum, field :copy_state, ::Types::DesignManagement::DesignCollectionCopyStateEnum,
null: true, null: true,
description: 'Copy state of the design collection' description: 'Copy state of the design collection.'
end end
end end
end end
...@@ -7,12 +7,12 @@ module Types ...@@ -7,12 +7,12 @@ module Types
field_class Types::BaseField field_class Types::BaseField
field :id, GraphQL::ID_TYPE, description: 'The ID of this design', null: false 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 :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 :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 :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 :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, 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], field :image_v432x230, GraphQL::STRING_TYPE, null: true, extras: [:parent],
description: 'The URL of the design resized to fit within the bounds of 432x230. ' \ 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' 'This will be `null` if the image has not been generated'
...@@ -20,16 +20,16 @@ module Types ...@@ -20,16 +20,16 @@ module Types
null: false, null: false,
calls_gitaly: true, calls_gitaly: true,
extras: [:parent], extras: [:parent],
description: 'The diff refs for this design' description: 'The diff refs for this design.'
field :event, Types::DesignManagement::DesignVersionEventEnum, field :event, Types::DesignManagement::DesignVersionEventEnum,
null: false, null: false,
extras: [:parent], 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, field :notes_count,
GraphQL::INT_TYPE, GraphQL::INT_TYPE,
null: false, null: false,
method: :user_notes_count, 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:) def diff_refs(parent:)
version = cached_stateful_version(parent) version = cached_stateful_version(parent)
......
...@@ -17,7 +17,7 @@ module Types ...@@ -17,7 +17,7 @@ module Types
field :versions, field :versions,
Types::DesignManagement::VersionType.connection_type, Types::DesignManagement::VersionType.connection_type,
resolver: Resolvers::DesignManagement::VersionsResolver, 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] extras: [:parent]
# Returns a `DesignManagement::Version` for this query based on the # Returns a `DesignManagement::Version` for this query based on the
......
...@@ -12,25 +12,25 @@ module Types ...@@ -12,25 +12,25 @@ module Types
authorize :read_design authorize :read_design
field :id, GraphQL::ID_TYPE, null: false, 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, field :sha, GraphQL::ID_TYPE, null: false,
description: 'SHA of the design version' description: 'SHA of the design version.'
field :designs, field :designs,
::Types::DesignManagement::DesignType.connection_type, ::Types::DesignManagement::DesignType.connection_type,
null: false, null: false,
description: 'All designs that were changed in the version' description: 'All designs that were changed in the version.'
field :designs_at_version, field :designs_at_version,
::Types::DesignManagement::DesignAtVersionType.connection_type, ::Types::DesignManagement::DesignAtVersionType.connection_type,
null: false, 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 resolver: ::Resolvers::DesignManagement::Version::DesignsAtVersionResolver
field :design_at_version, field :design_at_version,
::Types::DesignManagement::DesignAtVersionType, ::Types::DesignManagement::DesignAtVersionType,
null: false, 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 resolver: ::Resolvers::DesignManagement::Version::DesignsAtVersionResolver.single
end end
end end
......
...@@ -8,11 +8,11 @@ module Types ...@@ -8,11 +8,11 @@ module Types
field :version, ::Types::DesignManagement::VersionType, field :version, ::Types::DesignManagement::VersionType,
null: true, null: true,
resolver: ::Resolvers::DesignManagement::VersionResolver, resolver: ::Resolvers::DesignManagement::VersionResolver,
description: 'Find a version' description: 'Find a version.'
field :design_at_version, ::Types::DesignManagement::DesignAtVersionType, field :design_at_version, ::Types::DesignManagement::DesignAtVersionType,
null: true, null: true,
resolver: ::Resolvers::DesignManagement::DesignAtVersionResolver, resolver: ::Resolvers::DesignManagement::DesignAtVersionResolver,
description: 'Find a design as of a version' description: 'Find a design as of a version.'
end end
end end
...@@ -4,9 +4,9 @@ module Types ...@@ -4,9 +4,9 @@ module Types
# rubocop: disable Graphql/AuthorizeTypes # rubocop: disable Graphql/AuthorizeTypes
class DiffPathsInputType < BaseInputObject class DiffPathsInputType < BaseInputObject
argument :old_path, GraphQL::STRING_TYPE, required: false, 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, 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 end
# rubocop: enable Graphql/AuthorizeTypes # rubocop: enable Graphql/AuthorizeTypes
end end
...@@ -7,11 +7,11 @@ module Types ...@@ -7,11 +7,11 @@ module Types
graphql_name 'DiffRefs' graphql_name 'DiffRefs'
field :head_sha, GraphQL::STRING_TYPE, null: false, 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, 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, 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 end
# rubocop: enable Graphql/AuthorizeTypes # rubocop: enable Graphql/AuthorizeTypes
end end
...@@ -9,13 +9,13 @@ module Types ...@@ -9,13 +9,13 @@ module Types
description 'Aggregated summary of changes' description 'Aggregated summary of changes'
field :additions, GraphQL::INT_TYPE, null: false, field :additions, GraphQL::INT_TYPE, null: false,
description: 'Number of lines added' description: 'Number of lines added.'
field :deletions, GraphQL::INT_TYPE, null: false, field :deletions, GraphQL::INT_TYPE, null: false,
description: 'Number of lines deleted' description: 'Number of lines deleted.'
field :changes, GraphQL::INT_TYPE, null: false, 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, field :file_count, GraphQL::INT_TYPE, null: false,
description: 'Number of files changed' description: 'Number of files changed.'
def changes def changes
object[:additions] + object[:deletions] object[:additions] + object[:deletions]
......
...@@ -9,11 +9,11 @@ module Types ...@@ -9,11 +9,11 @@ module Types
description 'Changes to a single file' description 'Changes to a single file'
field :path, GraphQL::STRING_TYPE, null: false, 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, 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, field :deletions, GraphQL::INT_TYPE, null: false,
description: 'Number of lines deleted from this file' description: 'Number of lines deleted from this file.'
end end
# rubocop: enable Graphql/AuthorizeTypes # rubocop: enable Graphql/AuthorizeTypes
end end
...@@ -10,24 +10,24 @@ module Types ...@@ -10,24 +10,24 @@ module Types
authorize :read_environment authorize :read_environment
field :name, GraphQL::STRING_TYPE, null: false, 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, field :id, GraphQL::ID_TYPE, null: false,
description: 'ID of the environment' description: 'ID of the environment.'
field :state, GraphQL::STRING_TYPE, null: false, 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, field :path, GraphQL::STRING_TYPE, null: false,
description: 'The path to the environment.' description: 'The path to the environment.'
field :metrics_dashboard, Types::Metrics::DashboardType, null: true, 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 resolver: Resolvers::Metrics::DashboardResolver
field :latest_opened_most_severe_alert, field :latest_opened_most_severe_alert,
Types::AlertManagement::AlertType, Types::AlertManagement::AlertType,
null: true, 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
end end
...@@ -12,93 +12,93 @@ module Types ...@@ -12,93 +12,93 @@ module Types
field :id, GraphQL::ID_TYPE, field :id, GraphQL::ID_TYPE,
null: false, null: false,
description: 'ID (global ID) of the error' description: 'ID (global ID) of the error.'
field :sentry_id, GraphQL::STRING_TYPE, field :sentry_id, GraphQL::STRING_TYPE,
method: :id, method: :id,
null: false, null: false,
description: 'ID (Sentry ID) of the error' description: 'ID (Sentry ID) of the error.'
field :title, GraphQL::STRING_TYPE, field :title, GraphQL::STRING_TYPE,
null: false, null: false,
description: 'Title of the error' description: 'Title of the error.'
field :type, GraphQL::STRING_TYPE, field :type, GraphQL::STRING_TYPE,
null: false, null: false,
description: 'Type of the error' description: 'Type of the error.'
field :user_count, GraphQL::INT_TYPE, field :user_count, GraphQL::INT_TYPE,
null: false, null: false,
description: 'Count of users affected by the error' description: 'Count of users affected by the error.'
field :count, GraphQL::INT_TYPE, field :count, GraphQL::INT_TYPE,
null: false, null: false,
description: 'Count of occurrences' description: 'Count of occurrences.'
field :first_seen, Types::TimeType, field :first_seen, Types::TimeType,
null: false, null: false,
description: 'Timestamp when the error was first seen' description: 'Timestamp when the error was first seen.'
field :last_seen, Types::TimeType, field :last_seen, Types::TimeType,
null: false, null: false,
description: 'Timestamp when the error was last seen' description: 'Timestamp when the error was last seen.'
field :message, GraphQL::STRING_TYPE, field :message, GraphQL::STRING_TYPE,
null: true, null: true,
description: 'Sentry metadata message of the error' description: 'Sentry metadata message of the error.'
field :culprit, GraphQL::STRING_TYPE, field :culprit, GraphQL::STRING_TYPE,
null: false, null: false,
description: 'Culprit of the error' description: 'Culprit of the error.'
field :external_base_url, GraphQL::STRING_TYPE, field :external_base_url, GraphQL::STRING_TYPE,
null: false, null: false,
description: 'External Base URL of the Sentry Instance' description: 'External Base URL of the Sentry Instance.'
field :external_url, GraphQL::STRING_TYPE, field :external_url, GraphQL::STRING_TYPE,
null: false, null: false,
description: 'External URL of the error' description: 'External URL of the error.'
field :sentry_project_id, GraphQL::ID_TYPE, field :sentry_project_id, GraphQL::ID_TYPE,
method: :project_id, method: :project_id,
null: false, null: false,
description: 'ID of the project (Sentry project)' description: 'ID of the project (Sentry project).'
field :sentry_project_name, GraphQL::STRING_TYPE, field :sentry_project_name, GraphQL::STRING_TYPE,
method: :project_name, method: :project_name,
null: false, 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, field :sentry_project_slug, GraphQL::STRING_TYPE,
method: :project_slug, method: :project_slug,
null: false, 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, field :short_id, GraphQL::STRING_TYPE,
null: false, null: false,
description: 'Short ID (Sentry ID) of the error' description: 'Short ID (Sentry ID) of the error.'
field :status, Types::ErrorTracking::SentryErrorStatusEnum, field :status, Types::ErrorTracking::SentryErrorStatusEnum,
null: false, null: false,
description: 'Status of the error' description: 'Status of the error.'
field :frequency, [Types::ErrorTracking::SentryErrorFrequencyType], field :frequency, [Types::ErrorTracking::SentryErrorFrequencyType],
null: false, null: false,
description: 'Last 24hr stats of the error' description: 'Last 24hr stats of the error.'
field :first_release_last_commit, GraphQL::STRING_TYPE, field :first_release_last_commit, GraphQL::STRING_TYPE,
null: true, null: true,
description: 'Commit the error was first seen' description: 'Commit the error was first seen.'
field :last_release_last_commit, GraphQL::STRING_TYPE, field :last_release_last_commit, GraphQL::STRING_TYPE,
null: true, null: true,
description: 'Commit the error was last seen' description: 'Commit the error was last seen.'
field :first_release_short_version, GraphQL::STRING_TYPE, field :first_release_short_version, GraphQL::STRING_TYPE,
null: true, 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, field :last_release_short_version, GraphQL::STRING_TYPE,
null: true, 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, field :first_release_version, GraphQL::STRING_TYPE,
null: true, 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, field :last_release_version, GraphQL::STRING_TYPE,
null: true, null: true,
description: 'Release version the error was last seen' description: 'Release version the error was last seen.'
field :gitlab_commit, GraphQL::STRING_TYPE, field :gitlab_commit, GraphQL::STRING_TYPE,
null: true, 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, field :gitlab_commit_path, GraphQL::STRING_TYPE,
null: true, 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, field :gitlab_issue_path, GraphQL::STRING_TYPE,
method: :gitlab_issue, method: :gitlab_issue,
null: true, null: true,
description: 'URL of GitLab Issue' description: 'URL of GitLab Issue.'
field :tags, Types::ErrorTracking::SentryErrorTagsType, field :tags, Types::ErrorTracking::SentryErrorTagsType,
null: false, null: false,
description: 'Tags associated with the Sentry Error' description: 'Tags associated with the Sentry Error.'
end end
end end
end end
...@@ -9,18 +9,18 @@ module Types ...@@ -9,18 +9,18 @@ module Types
authorize :read_sentry_issue authorize :read_sentry_issue
field :errors, field :errors,
description: "Collection of Sentry Errors", description: "Collection of Sentry Errors.",
resolver: Resolvers::ErrorTracking::SentryErrorsResolver resolver: Resolvers::ErrorTracking::SentryErrorsResolver
field :detailed_error, 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 resolver: Resolvers::ErrorTracking::SentryDetailedErrorResolver
field :error_stack_trace, field :error_stack_trace,
description: 'Stack Trace of Sentry Error', description: 'Stack Trace of Sentry Error.',
resolver: Resolvers::ErrorTracking::SentryErrorStackTraceResolver resolver: Resolvers::ErrorTracking::SentryErrorStackTraceResolver
field :external_url, field :external_url,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
null: true, null: true,
description: "External URL for Sentry" description: "External URL for Sentry."
end end
end end
end end
...@@ -8,10 +8,10 @@ module Types ...@@ -8,10 +8,10 @@ module Types
field :time, Types::TimeType, field :time, Types::TimeType,
null: false, null: false,
description: "Time the error frequency stats were recorded" description: "Time the error frequency stats were recorded."
field :count, GraphQL::INT_TYPE, field :count, GraphQL::INT_TYPE,
null: false, null: false,
description: "Count of errors received since the previously recorded time" description: "Count of errors received since the previously recorded time."
end end
# rubocop: enable Graphql/AuthorizeTypes # rubocop: enable Graphql/AuthorizeTypes
end end
......
...@@ -10,11 +10,11 @@ module Types ...@@ -10,11 +10,11 @@ module Types
field :line, field :line,
GraphQL::INT_TYPE, GraphQL::INT_TYPE,
null: false, null: false,
description: 'Line number of the context' description: 'Line number of the context.'
field :code, field :code,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
null: false, null: false,
description: 'Code number of the context' description: 'Code number of the context.'
def line def line
object[0] object[0]
......
...@@ -9,19 +9,19 @@ module Types ...@@ -9,19 +9,19 @@ module Types
field :function, GraphQL::STRING_TYPE, field :function, GraphQL::STRING_TYPE,
null: true, null: true,
description: 'Function in which the Sentry error occurred' description: 'Function in which the Sentry error occurred.'
field :col, GraphQL::STRING_TYPE, field :col, GraphQL::STRING_TYPE,
null: true, null: true,
description: 'Function in which the Sentry error occurred' description: 'Function in which the Sentry error occurred.'
field :line, GraphQL::STRING_TYPE, field :line, GraphQL::STRING_TYPE,
null: true, null: true,
description: 'Function in which the Sentry error occurred' description: 'Function in which the Sentry error occurred.'
field :file_name, GraphQL::STRING_TYPE, field :file_name, GraphQL::STRING_TYPE,
null: true, null: true,
description: 'File in which the Sentry error occurred' description: 'File in which the Sentry error occurred.'
field :trace_context, [Types::ErrorTracking::SentryErrorStackTraceContextType], field :trace_context, [Types::ErrorTracking::SentryErrorStackTraceContextType],
null: true, null: true,
description: 'Context of the Sentry error' description: 'Context of the Sentry error.'
def function def function
object['function'] object['function']
......
...@@ -10,13 +10,13 @@ module Types ...@@ -10,13 +10,13 @@ module Types
field :issue_id, GraphQL::STRING_TYPE, field :issue_id, GraphQL::STRING_TYPE,
null: false, null: false,
description: 'ID of the Sentry error' description: 'ID of the Sentry error.'
field :date_received, GraphQL::STRING_TYPE, field :date_received, GraphQL::STRING_TYPE,
null: false, 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], field :stack_trace_entries, [Types::ErrorTracking::SentryErrorStackTraceEntryType],
null: false, null: false,
description: 'Stack trace entries for the Sentry error' description: 'Stack trace entries for the Sentry error.'
end end
end end
end end
...@@ -9,10 +9,10 @@ module Types ...@@ -9,10 +9,10 @@ module Types
field :level, GraphQL::STRING_TYPE, field :level, GraphQL::STRING_TYPE,
null: true, null: true,
description: "Severity level of the Sentry Error" description: "Severity level of the Sentry Error."
field :logger, GraphQL::STRING_TYPE, field :logger, GraphQL::STRING_TYPE,
null: true, null: true,
description: "Logger of the Sentry Error" description: "Logger of the Sentry Error."
end end
# rubocop: enable Graphql/AuthorizeTypes # rubocop: enable Graphql/AuthorizeTypes
end end
......
...@@ -11,59 +11,59 @@ module Types ...@@ -11,59 +11,59 @@ module Types
field :id, GraphQL::ID_TYPE, field :id, GraphQL::ID_TYPE,
null: false, null: false,
description: 'ID (global ID) of the error' description: 'ID (global ID) of the error.'
field :sentry_id, GraphQL::STRING_TYPE, field :sentry_id, GraphQL::STRING_TYPE,
method: :id, method: :id,
null: false, null: false,
description: 'ID (Sentry ID) of the error' description: 'ID (Sentry ID) of the error.'
field :first_seen, Types::TimeType, field :first_seen, Types::TimeType,
null: false, null: false,
description: 'Timestamp when the error was first seen' description: 'Timestamp when the error was first seen.'
field :last_seen, Types::TimeType, field :last_seen, Types::TimeType,
null: false, null: false,
description: 'Timestamp when the error was last seen' description: 'Timestamp when the error was last seen.'
field :title, GraphQL::STRING_TYPE, field :title, GraphQL::STRING_TYPE,
null: false, null: false,
description: 'Title of the error' description: 'Title of the error.'
field :type, GraphQL::STRING_TYPE, field :type, GraphQL::STRING_TYPE,
null: false, null: false,
description: 'Type of the error' description: 'Type of the error.'
field :user_count, GraphQL::INT_TYPE, field :user_count, GraphQL::INT_TYPE,
null: false, null: false,
description: 'Count of users affected by the error' description: 'Count of users affected by the error.'
field :count, GraphQL::INT_TYPE, field :count, GraphQL::INT_TYPE,
null: false, null: false,
description: 'Count of occurrences' description: 'Count of occurrences.'
field :message, GraphQL::STRING_TYPE, field :message, GraphQL::STRING_TYPE,
null: true, null: true,
description: 'Sentry metadata message of the error' description: 'Sentry metadata message of the error.'
field :culprit, GraphQL::STRING_TYPE, field :culprit, GraphQL::STRING_TYPE,
null: false, null: false,
description: 'Culprit of the error' description: 'Culprit of the error.'
field :external_url, GraphQL::STRING_TYPE, field :external_url, GraphQL::STRING_TYPE,
null: false, null: false,
description: 'External URL of the error' description: 'External URL of the error.'
field :short_id, GraphQL::STRING_TYPE, field :short_id, GraphQL::STRING_TYPE,
null: false, null: false,
description: 'Short ID (Sentry ID) of the error' description: 'Short ID (Sentry ID) of the error.'
field :status, Types::ErrorTracking::SentryErrorStatusEnum, field :status, Types::ErrorTracking::SentryErrorStatusEnum,
null: false, null: false,
description: 'Status of the error' description: 'Status of the error.'
field :frequency, [Types::ErrorTracking::SentryErrorFrequencyType], field :frequency, [Types::ErrorTracking::SentryErrorFrequencyType],
null: false, null: false,
description: 'Last 24hr stats of the error' description: 'Last 24hr stats of the error.'
field :sentry_project_id, GraphQL::ID_TYPE, field :sentry_project_id, GraphQL::ID_TYPE,
method: :project_id, method: :project_id,
null: false, null: false,
description: 'ID of the project (Sentry project)' description: 'ID of the project (Sentry project).'
field :sentry_project_name, GraphQL::STRING_TYPE, field :sentry_project_name, GraphQL::STRING_TYPE,
method: :project_name, method: :project_name,
null: false, 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, field :sentry_project_slug, GraphQL::STRING_TYPE,
method: :project_slug, method: :project_slug,
null: false, null: false,
description: 'Slug of the project affected by the error' description: 'Slug of the project affected by the error.'
end end
# rubocop: enable Graphql/AuthorizeTypes # rubocop: enable Graphql/AuthorizeTypes
end end
......
...@@ -10,12 +10,12 @@ module Types ...@@ -10,12 +10,12 @@ module Types
present_using Releases::EvidencePresenter present_using Releases::EvidencePresenter
field :id, GraphQL::ID_TYPE, null: false, field :id, GraphQL::ID_TYPE, null: false,
description: 'ID of the evidence' description: 'ID of the evidence.'
field :sha, GraphQL::STRING_TYPE, null: true, 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, 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, field :collected_at, Types::TimeType, null: true,
description: 'Timestamp when the evidence was collected' description: 'Timestamp when the evidence was collected.'
end end
end end
...@@ -7,14 +7,14 @@ module Types ...@@ -7,14 +7,14 @@ module Types
authorize :admin_operations authorize :admin_operations
field :id, GraphQL::ID_TYPE, null: false, 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, 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, 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, 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, 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
end end
...@@ -11,7 +11,7 @@ module Types ...@@ -11,7 +11,7 @@ module Types
description 'Represents a Group Invitation' description 'Represents a Group Invitation'
field :group, Types::GroupType, null: true, field :group, Types::GroupType, null: true,
description: 'Group that a User is invited to' description: 'Group that a User is invited to.'
def group def group
Gitlab::Graphql::Loaders::BatchModelLoader.new(Group, object.source_id).find Gitlab::Graphql::Loaders::BatchModelLoader.new(Group, object.source_id).find
......
...@@ -11,7 +11,7 @@ module Types ...@@ -11,7 +11,7 @@ module Types
description 'Represents a Group Membership' description 'Represents a Group Membership'
field :group, Types::GroupType, null: true, 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 def group
Gitlab::Graphql::Loaders::BatchModelLoader.new(Group, object.source_id).find Gitlab::Graphql::Loaders::BatchModelLoader.new(Group, object.source_id).find
......
...@@ -9,91 +9,91 @@ module Types ...@@ -9,91 +9,91 @@ module Types
expose_permissions Types::PermissionTypes::Group expose_permissions Types::PermissionTypes::Group
field :web_url, GraphQL::STRING_TYPE, null: false, 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, 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, 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 feature_flag: :custom_emoji
field :share_with_group_lock, GraphQL::BOOLEAN_TYPE, null: true, 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, 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, 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, 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, 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, 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, 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, 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, field :parent, GroupType, null: true,
description: 'Parent group' description: 'Parent group.'
field :issues, field :issues,
Types::IssueType.connection_type, Types::IssueType.connection_type,
null: true, null: true,
description: 'Issues for projects in this group', description: 'Issues for projects in this group.',
resolver: Resolvers::GroupIssuesResolver resolver: Resolvers::GroupIssuesResolver
field :merge_requests, field :merge_requests,
Types::MergeRequestType.connection_type, Types::MergeRequestType.connection_type,
null: true, null: true,
description: 'Merge requests for projects in this group', description: 'Merge requests for projects in this group.',
resolver: Resolvers::GroupMergeRequestsResolver resolver: Resolvers::GroupMergeRequestsResolver
field :milestones, Types::MilestoneType.connection_type, null: true, field :milestones, Types::MilestoneType.connection_type, null: true,
description: 'Milestones of the group', description: 'Milestones of the group.',
resolver: Resolvers::GroupMilestonesResolver resolver: Resolvers::GroupMilestonesResolver
field :boards, field :boards,
Types::BoardType.connection_type, Types::BoardType.connection_type,
null: true, null: true,
description: 'Boards of the group', description: 'Boards of the group.',
max_page_size: 2000, max_page_size: 2000,
resolver: Resolvers::BoardsResolver resolver: Resolvers::BoardsResolver
field :board, field :board,
Types::BoardType, Types::BoardType,
null: true, null: true,
description: 'A single board of the group', description: 'A single board of the group.',
resolver: Resolvers::BoardResolver resolver: Resolvers::BoardResolver
field :label, field :label,
Types::LabelType, Types::LabelType,
null: true, null: true,
description: 'A label available on this group' do description: 'A label available on this group.' do
argument :title, GraphQL::STRING_TYPE, argument :title, GraphQL::STRING_TYPE,
required: true, required: true,
description: 'Title of the label' description: 'Title of the label.'
end end
field :group_members, field :group_members,
description: 'A membership of a user within this group', description: 'A membership of a user within this group.',
resolver: Resolvers::GroupMembersResolver resolver: Resolvers::GroupMembersResolver
field :container_repositories, field :container_repositories,
Types::ContainerRepositoryType.connection_type, Types::ContainerRepositoryType.connection_type,
null: true, null: true,
description: 'Container repositories of the group', description: 'Container repositories of the group.',
resolver: Resolvers::ContainerRepositoriesResolver, resolver: Resolvers::ContainerRepositoriesResolver,
authorize: :read_container_image authorize: :read_container_image
field :container_repositories_count, GraphQL::INT_TYPE, null: false, 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:) def label(title:)
BatchLoader::GraphQL.for(title).batch(key: group) do |titles, loader, args| BatchLoader::GraphQL.for(title).batch(key: group) do |titles, loader, args|
...@@ -107,10 +107,10 @@ module Types ...@@ -107,10 +107,10 @@ module Types
field :labels, field :labels,
Types::LabelType.connection_type, Types::LabelType.connection_type,
null: true, null: true,
description: 'Labels available on this group' do description: 'Labels available on this group.' do
argument :search_term, GraphQL::STRING_TYPE, argument :search_term, GraphQL::STRING_TYPE,
required: false, required: false,
description: 'A search term to find labels with' description: 'A search term to find labels with.'
end end
def labels(search_term: nil) 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