diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-05 19:20:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-05 19:20:45 +0300 |
commit | d298fad0c0564454271cba11e6f20c19681534ac (patch) | |
tree | 0a19d07d8b3bdd2574617305c300e404f2ace581 /app/graphql/types | |
parent | c9f9eec79cab801a50db698f682aacffbedf07f7 (diff) |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc41
Diffstat (limited to 'app/graphql/types')
86 files changed, 649 insertions, 401 deletions
diff --git a/app/graphql/types/access_level_type.rb b/app/graphql/types/access_level_type.rb index c7f915f5038..21c3669979c 100644 --- a/app/graphql/types/access_level_type.rb +++ b/app/graphql/types/access_level_type.rb @@ -7,11 +7,11 @@ module Types description 'Represents the access level of a relationship between a User and object that it is related to' field :integer_value, GraphQL::INT_TYPE, null: true, - description: 'Integer representation of access level', + description: 'Integer representation of access level.', method: :to_i field :string_value, Types::AccessLevelEnum, null: true, - description: 'String representation of access level', + description: 'String representation of access level.', method: :to_i end end diff --git a/app/graphql/types/admin/analytics/instance_statistics/measurement_type.rb b/app/graphql/types/admin/analytics/instance_statistics/measurement_type.rb index eab42c2b78d..17a5af8d36b 100644 --- a/app/graphql/types/admin/analytics/instance_statistics/measurement_type.rb +++ b/app/graphql/types/admin/analytics/instance_statistics/measurement_type.rb @@ -12,13 +12,13 @@ module Types authorize :read_instance_statistics_measurements field :recorded_at, Types::TimeType, null: true, - description: 'The time the measurement was recorded' + description: 'The time the measurement was recorded.' field :count, GraphQL::INT_TYPE, null: false, - description: 'Object count' + description: 'Object count.' field :identifier, Types::Admin::Analytics::InstanceStatistics::MeasurementIdentifierEnum, null: false, - description: 'The type of objects being measured' + description: 'The type of objects being measured.' end end end diff --git a/app/graphql/types/admin/sidekiq_queues/delete_jobs_response_type.rb b/app/graphql/types/admin/sidekiq_queues/delete_jobs_response_type.rb index 93dd49b3c38..996300edad3 100644 --- a/app/graphql/types/admin/sidekiq_queues/delete_jobs_response_type.rb +++ b/app/graphql/types/admin/sidekiq_queues/delete_jobs_response_type.rb @@ -12,17 +12,17 @@ module Types field :completed, GraphQL::BOOLEAN_TYPE, null: true, - description: 'Whether or not the entire queue was processed in time; if not, retrying the same request is safe' + description: 'Whether or not the entire queue was processed in time; if not, retrying the same request is safe.' field :deleted_jobs, GraphQL::INT_TYPE, null: true, - description: 'The number of matching jobs deleted' + description: 'The number of matching jobs deleted.' field :queue_size, GraphQL::INT_TYPE, null: true, - description: 'The queue size after processing' + description: 'The queue size after processing.' end end end diff --git a/app/graphql/types/alert_management/alert_status_counts_type.rb b/app/graphql/types/alert_management/alert_status_counts_type.rb index a84be705445..14a81735fa5 100644 --- a/app/graphql/types/alert_management/alert_status_counts_type.rb +++ b/app/graphql/types/alert_management/alert_status_counts_type.rb @@ -19,12 +19,12 @@ module Types field :open, GraphQL::INT_TYPE, null: true, - description: 'Number of alerts with status TRIGGERED or ACKNOWLEDGED for the project' + description: 'Number of alerts with status TRIGGERED or ACKNOWLEDGED for the project.' field :all, GraphQL::INT_TYPE, null: true, - description: 'Total number of alerts for the project' + description: 'Total number of alerts for the project.' end end end diff --git a/app/graphql/types/alert_management/alert_type.rb b/app/graphql/types/alert_management/alert_type.rb index 623762de208..6b7e7030c1f 100644 --- a/app/graphql/types/alert_management/alert_type.rb +++ b/app/graphql/types/alert_management/alert_type.rb @@ -15,115 +15,115 @@ module Types field :iid, GraphQL::ID_TYPE, null: false, - description: 'Internal ID of the alert' + description: 'Internal ID of the alert.' field :issue_iid, GraphQL::ID_TYPE, null: true, - description: 'Internal ID of the GitLab issue attached to the alert' + description: 'Internal ID of the GitLab issue attached to the alert.' field :title, GraphQL::STRING_TYPE, null: true, - description: 'Title of the alert' + description: 'Title of the alert.' field :description, GraphQL::STRING_TYPE, null: true, - description: 'Description of the alert' + description: 'Description of the alert.' field :severity, AlertManagement::SeverityEnum, null: true, - description: 'Severity of the alert' + description: 'Severity of the alert.' field :status, AlertManagement::StatusEnum, null: true, - description: 'Status of the alert', + description: 'Status of the alert.', method: :status_name field :service, GraphQL::STRING_TYPE, null: true, - description: 'Service the alert came from' + description: 'Service the alert came from.' field :monitoring_tool, GraphQL::STRING_TYPE, null: true, - description: 'Monitoring tool the alert came from' + description: 'Monitoring tool the alert came from.' field :hosts, [GraphQL::STRING_TYPE], null: true, - description: 'List of hosts the alert came from' + description: 'List of hosts the alert came from.' field :started_at, Types::TimeType, null: true, - description: 'Timestamp the alert was raised' + description: 'Timestamp the alert was raised.' field :ended_at, Types::TimeType, null: true, - description: 'Timestamp the alert ended' + description: 'Timestamp the alert ended.' field :environment, Types::EnvironmentType, null: true, - description: 'Environment for the alert' + description: 'Environment for the alert.' field :event_count, GraphQL::INT_TYPE, null: true, - description: 'Number of events of this alert', + description: 'Number of events of this alert.', method: :events field :details, # rubocop:disable Graphql/JSONType GraphQL::Types::JSON, null: true, - description: 'Alert details' + description: 'Alert details.' field :created_at, Types::TimeType, null: true, - description: 'Timestamp the alert was created' + description: 'Timestamp the alert was created.' field :updated_at, Types::TimeType, null: true, - description: 'Timestamp the alert was last updated' + description: 'Timestamp the alert was last updated.' field :assignees, Types::UserType.connection_type, null: true, - description: 'Assignees of the alert' + description: 'Assignees of the alert.' field :metrics_dashboard_url, GraphQL::STRING_TYPE, null: true, - description: 'URL for metrics embed for the alert' + description: 'URL for metrics embed for the alert.' field :runbook, GraphQL::STRING_TYPE, null: true, - description: 'Runbook for the alert as defined in alert details' + description: 'Runbook for the alert as defined in alert details.' field :todos, Types::TodoType.connection_type, null: true, - description: 'Todos of the current user for the alert', + description: 'To-do items of the current user for the alert.', resolver: Resolvers::TodoResolver field :details_url, GraphQL::STRING_TYPE, null: false, - description: 'The URL of the alert detail page' + description: 'The URL of the alert detail page.' field :prometheus_alert, Types::PrometheusAlertType, null: true, - description: 'The alert condition for Prometheus' + description: 'The alert condition for Prometheus.' def notes object.ordered_notes diff --git a/app/graphql/types/alert_management/integration_type.rb b/app/graphql/types/alert_management/integration_type.rb index bf599885584..d26d7348765 100644 --- a/app/graphql/types/alert_management/integration_type.rb +++ b/app/graphql/types/alert_management/integration_type.rb @@ -9,37 +9,37 @@ module Types field :id, GraphQL::ID_TYPE, null: false, - description: 'ID of the integration' + description: 'ID of the integration.' field :type, AlertManagement::IntegrationTypeEnum, null: false, - description: 'Type of integration' + description: 'Type of integration.' field :name, GraphQL::STRING_TYPE, null: true, - description: 'Name of the integration' + description: 'Name of the integration.' field :active, GraphQL::BOOLEAN_TYPE, null: true, - description: 'Whether the endpoint is currently accepting alerts' + description: 'Whether the endpoint is currently accepting alerts.' field :token, GraphQL::STRING_TYPE, null: true, - description: 'Token used to authenticate alert notification requests' + description: 'Token used to authenticate alert notification requests.' field :url, GraphQL::STRING_TYPE, null: true, - description: 'Endpoint which accepts alert notifications' + description: 'Endpoint which accepts alert notifications.' field :api_url, GraphQL::STRING_TYPE, null: true, - description: 'URL at which Prometheus metrics can be queried to populate the metrics dashboard' + description: 'URL at which Prometheus metrics can be queried to populate the metrics dashboard.' definition_methods do def resolve_type(object, context) diff --git a/app/graphql/types/award_emojis/award_emoji_type.rb b/app/graphql/types/award_emojis/award_emoji_type.rb index cd7a2f34ba6..9409304e28f 100644 --- a/app/graphql/types/award_emojis/award_emoji_type.rb +++ b/app/graphql/types/award_emojis/award_emoji_type.rb @@ -13,32 +13,32 @@ module Types field :name, GraphQL::STRING_TYPE, null: false, - description: 'The emoji name' + description: 'The emoji name.' field :description, GraphQL::STRING_TYPE, null: false, - description: 'The emoji description' + description: 'The emoji description.' field :unicode, GraphQL::STRING_TYPE, null: false, - description: 'The emoji in unicode' + description: 'The emoji in Unicode.' field :emoji, GraphQL::STRING_TYPE, null: false, - description: 'The emoji as an icon' + description: 'The emoji as an icon.' field :unicode_version, GraphQL::STRING_TYPE, null: false, - description: 'The unicode version for this emoji' + description: 'The Unicode version for this emoji.' field :user, Types::UserType, null: false, - description: 'The user who awarded the emoji' + description: 'The user who awarded the emoji.' def user Gitlab::Graphql::Loaders::BatchModelLoader.new(User, object.user_id).find diff --git a/app/graphql/types/base_enum.rb b/app/graphql/types/base_enum.rb index cbd45b46dd6..4d470aceca4 100644 --- a/app/graphql/types/base_enum.rb +++ b/app/graphql/types/base_enum.rb @@ -21,7 +21,7 @@ module Types graphql_name(enum_mod.name) if use_name description(enum_mod.description) if use_description - enum_mod.definition.each { |key, content| value(key.to_s.upcase, content) } + enum_mod.definition.each { |key, content| value(key.to_s.upcase, **content) } end def value(*args, **kwargs, &block) diff --git a/app/graphql/types/board_list_type.rb b/app/graphql/types/board_list_type.rb index 7999e77eb30..46b49c5d8a4 100644 --- a/app/graphql/types/board_list_type.rb +++ b/app/graphql/types/board_list_type.rb @@ -9,22 +9,22 @@ module Types description 'Represents a list for an issue board' field :id, GraphQL::ID_TYPE, null: false, - description: 'ID (global ID) of the list' + description: 'ID (global ID) of the list.' field :title, GraphQL::STRING_TYPE, null: false, - description: 'Title of the list' + description: 'Title of the list.' field :list_type, GraphQL::STRING_TYPE, null: false, - description: 'Type of the list' + description: 'Type of the list.' field :position, GraphQL::INT_TYPE, null: true, - description: 'Position of list within the board' + description: 'Position of list within the board.' field :label, Types::LabelType, null: true, - description: 'Label of the list' + description: 'Label of the list.' field :collapsed, GraphQL::BOOLEAN_TYPE, null: true, - description: 'Indicates if list is collapsed for this user' + description: 'Indicates if list is collapsed for this user.' field :issues_count, GraphQL::INT_TYPE, null: true, - description: 'Count of issues in the list' + description: 'Count of issues in the list.' field :issues, ::Types::IssueType.connection_type, null: true, - description: 'Board issues', + description: 'Board issues.', resolver: ::Resolvers::BoardListIssuesResolver def issues_count diff --git a/app/graphql/types/board_type.rb b/app/graphql/types/board_type.rb index f576fd83840..f8bd31d5fa0 100644 --- a/app/graphql/types/board_type.rb +++ b/app/graphql/types/board_type.rb @@ -10,20 +10,20 @@ module Types present_using BoardPresenter field :id, type: GraphQL::ID_TYPE, null: false, - description: 'ID (global ID) of the board' + description: 'ID (global ID) of the board.' field :name, type: GraphQL::STRING_TYPE, null: true, - description: 'Name of the board' + description: 'Name of the board.' field :hide_backlog_list, type: GraphQL::BOOLEAN_TYPE, null: true, - description: 'Whether or not backlog list is hidden' + description: 'Whether or not backlog list is hidden.' field :hide_closed_list, type: GraphQL::BOOLEAN_TYPE, null: true, - description: 'Whether or not closed list is hidden' + description: 'Whether or not closed list is hidden.' field :lists, Types::BoardListType.connection_type, null: true, - description: 'Lists of the board', + description: 'Lists of the board.', resolver: Resolvers::BoardListsResolver, extras: [:lookahead] diff --git a/app/graphql/types/boards/board_issue_input_base_type.rb b/app/graphql/types/boards/board_issue_input_base_type.rb index 1187b3352cd..dab1414760b 100644 --- a/app/graphql/types/boards/board_issue_input_base_type.rb +++ b/app/graphql/types/boards/board_issue_input_base_type.rb @@ -6,27 +6,27 @@ module Types class BoardIssueInputBaseType < BaseInputObject argument :label_name, GraphQL::STRING_TYPE.to_list_type, required: false, - description: 'Filter by label name' + description: 'Filter by label name.' argument :milestone_title, GraphQL::STRING_TYPE, required: false, - description: 'Filter by milestone title' + description: 'Filter by milestone title.' argument :assignee_username, GraphQL::STRING_TYPE.to_list_type, required: false, - description: 'Filter by assignee username' + description: 'Filter by assignee username.' argument :author_username, GraphQL::STRING_TYPE, required: false, - description: 'Filter by author username' + description: 'Filter by author username.' argument :release_tag, GraphQL::STRING_TYPE, required: false, - description: 'Filter by release tag' + description: 'Filter by release tag.' argument :my_reaction_emoji, GraphQL::STRING_TYPE, required: false, - description: 'Filter by reaction emoji' + description: 'Filter by reaction emoji.' end # rubocop: enable Graphql/AuthorizeTypes end diff --git a/app/graphql/types/boards/board_issue_input_type.rb b/app/graphql/types/boards/board_issue_input_type.rb index 40d065d8ea9..62a402ee724 100644 --- a/app/graphql/types/boards/board_issue_input_type.rb +++ b/app/graphql/types/boards/board_issue_input_type.rb @@ -11,11 +11,11 @@ module Types argument :not, NegatedBoardIssueInputType, required: false, - description: 'List of negated params. Warning: this argument is experimental and a subject to change in future' + description: 'List of negated params. Warning: this argument is experimental and a subject to change in future.' argument :search, GraphQL::STRING_TYPE, required: false, - description: 'Search query for issue title or description' + description: 'Search query for issue title or description.' end # rubocop: enable Graphql/AuthorizeTypes end diff --git a/app/graphql/types/branch_type.rb b/app/graphql/types/branch_type.rb index b15038a46de..b788ba79769 100644 --- a/app/graphql/types/branch_type.rb +++ b/app/graphql/types/branch_type.rb @@ -8,11 +8,11 @@ module Types field :name, GraphQL::STRING_TYPE, null: false, - description: 'Name of the branch' + description: 'Name of the branch.' field :commit, Types::CommitType, null: true, resolver: Resolvers::BranchCommitResolver, - description: 'Commit for the branch' + description: 'Commit for the branch.' end # rubocop: enable Graphql/AuthorizeTypes end diff --git a/app/graphql/types/ci/analytics_type.rb b/app/graphql/types/ci/analytics_type.rb index c8b12c6a9b8..ba987b133bd 100644 --- a/app/graphql/types/ci/analytics_type.rb +++ b/app/graphql/types/ci/analytics_type.rb @@ -7,27 +7,27 @@ module Types graphql_name 'PipelineAnalytics' field :week_pipelines_totals, [GraphQL::INT_TYPE], null: true, - description: 'Total weekly pipeline count' + description: 'Total weekly pipeline count.' field :week_pipelines_successful, [GraphQL::INT_TYPE], null: true, - description: 'Total weekly successful pipeline count' + description: 'Total weekly successful pipeline count.' field :week_pipelines_labels, [GraphQL::STRING_TYPE], null: true, - description: 'Labels for the weekly pipeline count' + description: 'Labels for the weekly pipeline count.' field :month_pipelines_totals, [GraphQL::INT_TYPE], null: true, - description: 'Total monthly pipeline count' + description: 'Total monthly pipeline count.' field :month_pipelines_successful, [GraphQL::INT_TYPE], null: true, - description: 'Total monthly successful pipeline count' + description: 'Total monthly successful pipeline count.' field :month_pipelines_labels, [GraphQL::STRING_TYPE], null: true, - description: 'Labels for the monthly pipeline count' + description: 'Labels for the monthly pipeline count.' field :year_pipelines_totals, [GraphQL::INT_TYPE], null: true, - description: 'Total yearly pipeline count' + description: 'Total yearly pipeline count.' field :year_pipelines_successful, [GraphQL::INT_TYPE], null: true, - description: 'Total yearly successful pipeline count' + description: 'Total yearly successful pipeline count.' field :year_pipelines_labels, [GraphQL::STRING_TYPE], null: true, - description: 'Labels for the yearly pipeline count' + description: 'Labels for the yearly pipeline count.' field :pipeline_times_values, [GraphQL::INT_TYPE], null: true, - description: 'Pipeline times' + description: 'Pipeline times.' field :pipeline_times_labels, [GraphQL::STRING_TYPE], null: true, - description: 'Pipeline times labels' + description: 'Pipeline times labels.' end end end diff --git a/app/graphql/types/ci/config/config_type.rb b/app/graphql/types/ci/config/config_type.rb index 29093c6d3c9..88caf21c376 100644 --- a/app/graphql/types/ci/config/config_type.rb +++ b/app/graphql/types/ci/config/config_type.rb @@ -8,13 +8,13 @@ module Types graphql_name 'CiConfig' field :errors, [GraphQL::STRING_TYPE], null: true, - description: 'Linting errors' + description: 'Linting errors.' field :merged_yaml, GraphQL::STRING_TYPE, null: true, - description: 'Merged CI config YAML' + description: 'Merged CI configuration YAML.' field :stages, Types::Ci::Config::StageType.connection_type, null: true, - description: 'Stages of the pipeline' + description: 'Stages of the pipeline.' field :status, Types::Ci::Config::StatusEnum, null: true, - description: 'Status of linting, can be either valid or invalid' + description: 'Status of linting, can be either valid or invalid.' end end end diff --git a/app/graphql/types/ci/config/group_type.rb b/app/graphql/types/ci/config/group_type.rb index 8e133bbcba8..11be701e73f 100644 --- a/app/graphql/types/ci/config/group_type.rb +++ b/app/graphql/types/ci/config/group_type.rb @@ -8,11 +8,11 @@ module Types graphql_name 'CiConfigGroup' field :name, GraphQL::STRING_TYPE, null: true, - description: 'Name of the job group' + description: 'Name of the job group.' field :jobs, Types::Ci::Config::JobType.connection_type, null: true, - description: 'Jobs in group' + description: 'Jobs in group.' field :size, GraphQL::INT_TYPE, null: true, - description: 'Size of the job group' + description: 'Size of the job group.' end end end diff --git a/app/graphql/types/ci/config/need_type.rb b/app/graphql/types/ci/config/need_type.rb index a442450b9ae..01f73100409 100644 --- a/app/graphql/types/ci/config/need_type.rb +++ b/app/graphql/types/ci/config/need_type.rb @@ -8,7 +8,7 @@ module Types graphql_name 'CiConfigNeed' field :name, GraphQL::STRING_TYPE, null: true, - description: 'Name of the need' + description: 'Name of the need.' end end end diff --git a/app/graphql/types/ci/config/stage_type.rb b/app/graphql/types/ci/config/stage_type.rb index 2008c553629..060efb7d45c 100644 --- a/app/graphql/types/ci/config/stage_type.rb +++ b/app/graphql/types/ci/config/stage_type.rb @@ -8,9 +8,9 @@ module Types graphql_name 'CiConfigStage' field :name, GraphQL::STRING_TYPE, null: true, - description: 'Name of the stage' + description: 'Name of the stage.' field :groups, Types::Ci::Config::GroupType.connection_type, null: true, - description: 'Groups of jobs for the stage' + description: 'Groups of jobs for the stage.' end end end diff --git a/app/graphql/types/ci/detailed_status_type.rb b/app/graphql/types/ci/detailed_status_type.rb index 80d73e9b174..0b643a6b676 100644 --- a/app/graphql/types/ci/detailed_status_type.rb +++ b/app/graphql/types/ci/detailed_status_type.rb @@ -7,26 +7,27 @@ module Types graphql_name 'DetailedStatus' field :group, GraphQL::STRING_TYPE, null: true, - description: 'Group of the status' + description: 'Group of the status.' field :icon, GraphQL::STRING_TYPE, null: true, - description: 'Icon of the status' + description: 'Icon of the status.' field :favicon, GraphQL::STRING_TYPE, null: true, - description: 'Favicon of the status' + description: 'Favicon of the status.' field :details_path, GraphQL::STRING_TYPE, null: true, - description: 'Path of the details for the status' + description: 'Path of the details for the status.' field :has_details, GraphQL::BOOLEAN_TYPE, null: true, - description: 'Indicates if the status has further details', + description: 'Indicates if the status has further details.', method: :has_details? field :label, GraphQL::STRING_TYPE, null: true, - description: 'Label of the status' + calls_gitaly: true, + description: 'Label of the status.' field :text, GraphQL::STRING_TYPE, null: true, - description: 'Text of the status' + description: 'Text of the status.' field :tooltip, GraphQL::STRING_TYPE, null: true, - description: 'Tooltip associated with the status', + description: 'Tooltip associated with the status.', method: :status_tooltip field :action, Types::Ci::StatusActionType, null: true, - calls_gitaly: true, - description: 'Action information for the status. This includes method, button title, icon, path, and title' + calls_gitaly: true, + description: 'Action information for the status. This includes method, button title, icon, path, and title.' def action if object.has_action? diff --git a/app/graphql/types/ci/group_type.rb b/app/graphql/types/ci/group_type.rb index 03fd50d5dbb..d6d4252e8d7 100644 --- a/app/graphql/types/ci/group_type.rb +++ b/app/graphql/types/ci/group_type.rb @@ -7,13 +7,13 @@ module Types graphql_name 'CiGroup' field :name, GraphQL::STRING_TYPE, null: true, - description: 'Name of the job group' + description: 'Name of the job group.' field :size, GraphQL::INT_TYPE, null: true, - description: 'Size of the group' + description: 'Size of the group.' field :jobs, Ci::JobType.connection_type, null: true, - description: 'Jobs in group' + description: 'Jobs in group.' field :detailed_status, Types::Ci::DetailedStatusType, null: true, - description: 'Detailed status of the group' + description: 'Detailed status of the group.' def detailed_status object.detailed_status(context[:current_user]) diff --git a/app/graphql/types/ci/job_artifact_type.rb b/app/graphql/types/ci/job_artifact_type.rb index c34a12dcc61..7dc93041b53 100644 --- a/app/graphql/types/ci/job_artifact_type.rb +++ b/app/graphql/types/ci/job_artifact_type.rb @@ -7,10 +7,10 @@ module Types graphql_name 'CiJobArtifact' field :download_path, GraphQL::STRING_TYPE, null: true, - description: "URL for downloading the artifact's file" + description: "URL for downloading the artifact's file." field :file_type, ::Types::Ci::JobArtifactFileTypeEnum, null: true, - description: 'File type of the artifact' + description: 'File type of the artifact.' def download_path ::Gitlab::Routing.url_helpers.download_project_job_artifacts_path( diff --git a/app/graphql/types/ci/job_type.rb b/app/graphql/types/ci/job_type.rb index f8bf1732e63..ba463cdd9c1 100644 --- a/app/graphql/types/ci/job_type.rb +++ b/app/graphql/types/ci/job_type.rb @@ -7,17 +7,17 @@ module Types authorize :read_commit_status field :pipeline, Types::Ci::PipelineType, null: true, - description: 'Pipeline the job belongs to' + description: 'Pipeline the job belongs to.' field :name, GraphQL::STRING_TYPE, null: true, - description: 'Name of the job' + description: 'Name of the job.' field :needs, BuildNeedType.connection_type, null: true, - description: 'References to builds that must complete before the jobs run' + description: 'References to builds that must complete before the jobs run.' field :detailed_status, Types::Ci::DetailedStatusType, null: true, - description: 'Detailed status of the job' + description: 'Detailed status of the job.' field :scheduled_at, Types::TimeType, null: true, - description: 'Schedule for the build' + description: 'Schedule for the build.' field :artifacts, Types::Ci::JobArtifactType.connection_type, null: true, - description: 'Artifacts generated by the job' + description: 'Artifacts generated by the job.' def pipeline Gitlab::Graphql::Loaders::BatchModelLoader.new(::Ci::Pipeline, object.pipeline_id).find diff --git a/app/graphql/types/ci/pipeline_type.rb b/app/graphql/types/ci/pipeline_type.rb index 4709d5e8dd6..af7e0fa224f 100644 --- a/app/graphql/types/ci/pipeline_type.rb +++ b/app/graphql/types/ci/pipeline_type.rb @@ -8,94 +8,95 @@ module Types connection_type_class(Types::CountableConnectionType) authorize :read_pipeline + present_using ::Ci::PipelinePresenter expose_permissions Types::PermissionTypes::Ci::Pipeline field :id, GraphQL::ID_TYPE, null: false, - description: 'ID of the pipeline' + description: 'ID of the pipeline.' field :iid, GraphQL::STRING_TYPE, null: false, - description: 'Internal ID of the pipeline' + description: 'Internal ID of the pipeline.' field :sha, GraphQL::STRING_TYPE, null: false, - description: "SHA of the pipeline's commit" + description: "SHA of the pipeline's commit." field :before_sha, GraphQL::STRING_TYPE, null: true, - description: 'Base SHA of the source branch' + description: 'Base SHA of the source branch.' field :status, PipelineStatusEnum, null: false, description: "Status of the pipeline (#{::Ci::Pipeline.all_state_names.compact.join(', ').upcase})" field :detailed_status, Types::Ci::DetailedStatusType, null: false, - description: 'Detailed status of the pipeline' + description: 'Detailed status of the pipeline.' field :config_source, PipelineConfigSourceEnum, null: true, - description: "Config source of the pipeline (#{::Enums::Ci::Pipeline.config_sources.keys.join(', ').upcase})" + description: "Configuration source of the pipeline (#{::Enums::Ci::Pipeline.config_sources.keys.join(', ').upcase})" field :duration, GraphQL::INT_TYPE, null: true, - description: 'Duration of the pipeline in seconds' + description: 'Duration of the pipeline in seconds.' field :coverage, GraphQL::FLOAT_TYPE, null: true, - description: 'Coverage percentage' + description: 'Coverage percentage.' field :created_at, Types::TimeType, null: false, - description: "Timestamp of the pipeline's creation" + description: "Timestamp of the pipeline's creation." field :updated_at, Types::TimeType, null: false, - description: "Timestamp of the pipeline's last activity" + description: "Timestamp of the pipeline's last activity." field :started_at, Types::TimeType, null: true, - description: 'Timestamp when the pipeline was started' + description: 'Timestamp when the pipeline was started.' field :finished_at, Types::TimeType, null: true, - description: "Timestamp of the pipeline's completion" + description: "Timestamp of the pipeline's completion." field :committed_at, Types::TimeType, null: true, - description: "Timestamp of the pipeline's commit" + description: "Timestamp of the pipeline's commit." field :stages, Types::Ci::StageType.connection_type, null: true, - description: 'Stages of the pipeline', + description: 'Stages of the pipeline.', extras: [:lookahead], resolver: Resolvers::Ci::PipelineStagesResolver field :user, Types::UserType, null: true, - description: 'Pipeline user' + description: 'Pipeline user.' field :retryable, GraphQL::BOOLEAN_TYPE, - description: 'Specifies if a pipeline can be retried', + description: 'Specifies if a pipeline can be retried.', method: :retryable?, null: false field :cancelable, GraphQL::BOOLEAN_TYPE, - description: 'Specifies if a pipeline can be canceled', + description: 'Specifies if a pipeline can be canceled.', method: :cancelable?, null: false field :jobs, ::Types::Ci::JobType.connection_type, null: true, - description: 'Jobs belonging to the pipeline', + description: 'Jobs belonging to the pipeline.', resolver: ::Resolvers::Ci::JobsResolver field :source_job, Types::Ci::JobType, null: true, - description: 'Job where pipeline was triggered from' + description: 'Job where pipeline was triggered from.' field :downstream, Types::Ci::PipelineType.connection_type, null: true, - description: 'Pipelines this pipeline will trigger', + description: 'Pipelines this pipeline will trigger.', method: :triggered_pipelines_with_preloads field :upstream, Types::Ci::PipelineType, null: true, - description: 'Pipeline that triggered the pipeline', + description: 'Pipeline that triggered the pipeline.', method: :triggered_by_pipeline field :path, GraphQL::STRING_TYPE, null: true, - description: "Relative path to the pipeline's page" + description: "Relative path to the pipeline's page." field :project, Types::ProjectType, null: true, - description: 'Project the pipeline belongs to' + description: 'Project the pipeline belongs to.' field :active, GraphQL::BOOLEAN_TYPE, null: false, method: :active?, - description: 'Indicates if the pipeline is active' + description: 'Indicates if the pipeline is active.' def detailed_status object.detailed_status(context[:current_user]) diff --git a/app/graphql/types/ci/runner_architecture_type.rb b/app/graphql/types/ci/runner_architecture_type.rb index 526348abd9d..229974d4d13 100644 --- a/app/graphql/types/ci/runner_architecture_type.rb +++ b/app/graphql/types/ci/runner_architecture_type.rb @@ -7,9 +7,9 @@ module Types graphql_name 'RunnerArchitecture' field :name, GraphQL::STRING_TYPE, null: false, - description: 'Name of the runner platform architecture' + description: 'Name of the runner platform architecture.' field :download_location, GraphQL::STRING_TYPE, null: false, - description: 'Download location for the runner for the platform architecture' + description: 'Download location for the runner for the platform architecture.' end end end diff --git a/app/graphql/types/ci/runner_platform_type.rb b/app/graphql/types/ci/runner_platform_type.rb index 64719bc4908..5636f88835e 100644 --- a/app/graphql/types/ci/runner_platform_type.rb +++ b/app/graphql/types/ci/runner_platform_type.rb @@ -7,11 +7,11 @@ module Types graphql_name 'RunnerPlatform' field :name, GraphQL::STRING_TYPE, null: false, - description: 'Name slug of the runner platform' + description: 'Name slug of the runner platform.' field :human_readable_name, GraphQL::STRING_TYPE, null: false, - description: 'Human readable name of the runner platform' + description: 'Human readable name of the runner platform.' field :architectures, Types::Ci::RunnerArchitectureType.connection_type, null: true, - description: 'Runner architectures supported for the platform' + description: 'Runner architectures supported for the platform.' end end end diff --git a/app/graphql/types/ci/runner_setup_type.rb b/app/graphql/types/ci/runner_setup_type.rb index 66abcf65adf..61a2ea2a411 100644 --- a/app/graphql/types/ci/runner_setup_type.rb +++ b/app/graphql/types/ci/runner_setup_type.rb @@ -7,9 +7,9 @@ module Types graphql_name 'RunnerSetup' field :install_instructions, GraphQL::STRING_TYPE, null: false, - description: 'Instructions for installing the runner on the specified architecture' + description: 'Instructions for installing the runner on the specified architecture.' field :register_instructions, GraphQL::STRING_TYPE, null: true, - description: 'Instructions for registering the runner' + description: 'Instructions for registering the runner.' end end end diff --git a/app/graphql/types/ci/stage_type.rb b/app/graphql/types/ci/stage_type.rb index 695e7c61bd9..836f2430890 100644 --- a/app/graphql/types/ci/stage_type.rb +++ b/app/graphql/types/ci/stage_type.rb @@ -7,12 +7,12 @@ module Types graphql_name 'CiStage' field :name, GraphQL::STRING_TYPE, null: true, - description: 'Name of the stage' + description: 'Name of the stage.' field :groups, Ci::GroupType.connection_type, null: true, extras: [:lookahead], - description: 'Group of jobs for the stage' + description: 'Group of jobs for the stage.' field :detailed_status, Types::Ci::DetailedStatusType, null: true, - description: 'Detailed status of the stage' + description: 'Detailed status of the stage.' def detailed_status object.detailed_status(context[:current_user]) diff --git a/app/graphql/types/ci/status_action_type.rb b/app/graphql/types/ci/status_action_type.rb index 08cbb6d3b59..9f7299c0270 100644 --- a/app/graphql/types/ci/status_action_type.rb +++ b/app/graphql/types/ci/status_action_type.rb @@ -6,16 +6,16 @@ module Types graphql_name 'StatusAction' field :button_title, GraphQL::STRING_TYPE, null: true, - description: 'Title for the button, for example: Retry this job' + description: 'Title for the button, for example: Retry this job.' field :icon, GraphQL::STRING_TYPE, null: true, - description: 'Icon used in the action button' + description: 'Icon used in the action button.' field :method, GraphQL::STRING_TYPE, null: true, - description: 'Method for the action, for example: :post', + description: 'Method for the action, for example: :post.', resolver_method: :action_method field :path, GraphQL::STRING_TYPE, null: true, - description: 'Path for the action' + description: 'Path for the action.' field :title, GraphQL::STRING_TYPE, null: true, - description: 'Title for the action, for example: Retry' + description: 'Title for the action, for example: Retry.' def action_method object[:method] diff --git a/app/graphql/types/ci_configuration/sast/analyzers_entity_input_type.rb b/app/graphql/types/ci_configuration/sast/analyzers_entity_input_type.rb new file mode 100644 index 00000000000..9835a7ef208 --- /dev/null +++ b/app/graphql/types/ci_configuration/sast/analyzers_entity_input_type.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module Types + module CiConfiguration + module Sast + # rubocop: disable Graphql/AuthorizeTypes + class AnalyzersEntityInputType < BaseInputObject + graphql_name 'SastCiConfigurationAnalyzersEntityInput' + description 'Represents the analyzers entity in SAST CI configuration' + + argument :name, GraphQL::STRING_TYPE, required: true, + description: 'Name of analyzer.' + + argument :enabled, GraphQL::BOOLEAN_TYPE, required: true, + description: 'State of the analyzer.' + + argument :variables, [::Types::CiConfiguration::Sast::EntityInputType], + description: 'List of variables for the analyzer.', + required: false + end + end + end +end diff --git a/app/graphql/types/ci_configuration/sast/analyzers_entity_type.rb b/app/graphql/types/ci_configuration/sast/analyzers_entity_type.rb new file mode 100644 index 00000000000..3c6202ca7e0 --- /dev/null +++ b/app/graphql/types/ci_configuration/sast/analyzers_entity_type.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +module Types + module CiConfiguration + module Sast + # rubocop: disable Graphql/AuthorizeTypes + class AnalyzersEntityType < BaseObject + graphql_name 'SastCiConfigurationAnalyzersEntity' + description 'Represents an analyzer entity in SAST CI configuration' + + field :name, GraphQL::STRING_TYPE, null: true, + description: 'Name of the analyzer.' + + field :label, GraphQL::STRING_TYPE, null: true, + description: 'Analyzer label used in the config UI.' + + field :enabled, GraphQL::BOOLEAN_TYPE, null: true, + description: 'Indicates whether an analyzer is enabled.' + + field :description, GraphQL::STRING_TYPE, null: true, + description: 'Analyzer description that is displayed on the form.' + + field :variables, ::Types::CiConfiguration::Sast::EntityType.connection_type, null: true, + description: 'List of supported variables.' + end + end + end +end diff --git a/app/graphql/types/ci_configuration/sast/entity_input_type.rb b/app/graphql/types/ci_configuration/sast/entity_input_type.rb new file mode 100644 index 00000000000..39b3efb3db8 --- /dev/null +++ b/app/graphql/types/ci_configuration/sast/entity_input_type.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +module Types + module CiConfiguration + module Sast + # rubocop: disable Graphql/AuthorizeTypes + class EntityInputType < BaseInputObject + graphql_name 'SastCiConfigurationEntityInput' + description 'Represents an entity in SAST CI configuration' + + argument :field, GraphQL::STRING_TYPE, required: true, + description: 'CI keyword of entity.' + + argument :default_value, GraphQL::STRING_TYPE, required: true, + description: 'Default value that is used if value is empty.' + + argument :value, GraphQL::STRING_TYPE, required: true, + description: 'Current value of the entity.' + end + end + end +end diff --git a/app/graphql/types/ci_configuration/sast/entity_type.rb b/app/graphql/types/ci_configuration/sast/entity_type.rb new file mode 100644 index 00000000000..eeb9025391f --- /dev/null +++ b/app/graphql/types/ci_configuration/sast/entity_type.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +module Types + module CiConfiguration + module Sast + # rubocop: disable Graphql/AuthorizeTypes + class EntityType < BaseObject + graphql_name 'SastCiConfigurationEntity' + description 'Represents an entity in SAST CI configuration' + + field :field, GraphQL::STRING_TYPE, null: true, + description: 'CI keyword of entity.' + + field :label, GraphQL::STRING_TYPE, null: true, + description: 'Label for entity used in the form.' + + field :type, GraphQL::STRING_TYPE, null: true, + description: 'Type of the field value.' + + field :options, ::Types::CiConfiguration::Sast::OptionsEntityType.connection_type, null: true, + description: 'Different possible values of the field.' + + field :default_value, GraphQL::STRING_TYPE, null: true, + description: 'Default value that is used if value is empty.' + + field :description, GraphQL::STRING_TYPE, null: true, + description: 'Entity description that is displayed on the form.' + + field :value, GraphQL::STRING_TYPE, null: true, + description: 'Current value of the entity.' + + field :size, ::Types::CiConfiguration::Sast::UiComponentSizeEnum, null: true, + description: 'Size of the UI component.' + end + end + end +end diff --git a/app/graphql/types/ci_configuration/sast/input_type.rb b/app/graphql/types/ci_configuration/sast/input_type.rb new file mode 100644 index 00000000000..615436683f6 --- /dev/null +++ b/app/graphql/types/ci_configuration/sast/input_type.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +module Types + module CiConfiguration + module Sast + class InputType < BaseInputObject # rubocop:disable Graphql/AuthorizeTypes + graphql_name 'SastCiConfigurationInput' + description 'Represents a CI configuration of SAST' + + argument :global, [::Types::CiConfiguration::Sast::EntityInputType], + description: 'List of global entities related to SAST configuration.', + required: false + + argument :pipeline, [::Types::CiConfiguration::Sast::EntityInputType], + description: 'List of pipeline entities related to SAST configuration.', + required: false + + argument :analyzers, [::Types::CiConfiguration::Sast::AnalyzersEntityInputType], + description: 'List of analyzers and related variables for the SAST configuration.', + required: false + end + end + end +end diff --git a/app/graphql/types/ci_configuration/sast/options_entity_type.rb b/app/graphql/types/ci_configuration/sast/options_entity_type.rb new file mode 100644 index 00000000000..86d104a7fda --- /dev/null +++ b/app/graphql/types/ci_configuration/sast/options_entity_type.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module Types + module CiConfiguration + module Sast + # rubocop: disable Graphql/AuthorizeTypes + class OptionsEntityType < BaseObject + graphql_name 'SastCiConfigurationOptionsEntity' + description 'Represents an entity for options in SAST CI configuration' + + field :label, GraphQL::STRING_TYPE, null: true, + description: 'Label of option entity.' + + field :value, GraphQL::STRING_TYPE, null: true, + description: 'Value of option entity.' + end + end + end +end diff --git a/app/graphql/types/ci_configuration/sast/type.rb b/app/graphql/types/ci_configuration/sast/type.rb new file mode 100644 index 00000000000..35d11584ac7 --- /dev/null +++ b/app/graphql/types/ci_configuration/sast/type.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +module Types + module CiConfiguration + module Sast + # rubocop: disable Graphql/AuthorizeTypes + class Type < BaseObject + graphql_name 'SastCiConfiguration' + description 'Represents a CI configuration of SAST' + + field :global, ::Types::CiConfiguration::Sast::EntityType.connection_type, null: true, + description: 'List of global entities related to SAST configuration.' + + field :pipeline, ::Types::CiConfiguration::Sast::EntityType.connection_type, null: true, + description: 'List of pipeline entities related to SAST configuration.' + + field :analyzers, ::Types::CiConfiguration::Sast::AnalyzersEntityType.connection_type, null: true, + description: 'List of analyzers entities attached to SAST configuration.' + end + end + end +end diff --git a/app/graphql/types/ci_configuration/sast/ui_component_size_enum.rb b/app/graphql/types/ci_configuration/sast/ui_component_size_enum.rb new file mode 100644 index 00000000000..3a208f9d3e4 --- /dev/null +++ b/app/graphql/types/ci_configuration/sast/ui_component_size_enum.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +module Types + module CiConfiguration + module Sast + class UiComponentSizeEnum < BaseEnum + graphql_name 'SastUiComponentSize' + description 'Size of UI component in SAST configuration page' + + value 'SMALL' + value 'MEDIUM' + value 'LARGE' + end + end + end +end diff --git a/app/graphql/types/commit_action_type.rb b/app/graphql/types/commit_action_type.rb index 7674abb11eb..e14e7157752 100644 --- a/app/graphql/types/commit_action_type.rb +++ b/app/graphql/types/commit_action_type.rb @@ -4,19 +4,19 @@ module Types # rubocop: disable Graphql/AuthorizeTypes class CommitActionType < BaseInputObject argument :action, type: Types::CommitActionModeEnum, required: true, - description: 'The action to perform, create, delete, move, update, chmod' + description: 'The action to perform, create, delete, move, update, chmod.' argument :file_path, type: GraphQL::STRING_TYPE, required: true, - description: 'Full path to the file' + description: 'Full path to the file.' argument :content, type: GraphQL::STRING_TYPE, required: false, - description: 'Content of the file' + description: 'Content of the file.' argument :previous_path, type: GraphQL::STRING_TYPE, required: false, - description: 'Original full path to the file being moved' + description: 'Original full path to the file being moved.' argument :last_commit_id, type: GraphQL::STRING_TYPE, required: false, - description: 'Last known file commit ID' + description: 'Last known file commit ID.' argument :execute_filemode, type: GraphQL::BOOLEAN_TYPE, required: false, - description: 'Enables/disables the execute flag on the file' + description: 'Enables/disables the execute flag on the file.' argument :encoding, type: Types::CommitEncodingEnum, required: false, - description: 'Encoding of the file. Default is text' + description: 'Encoding of the file. Default is text.' end # rubocop: enable Graphql/AuthorizeTypes end diff --git a/app/graphql/types/commit_type.rb b/app/graphql/types/commit_type.rb index 37d19b4148b..d137901380b 100644 --- a/app/graphql/types/commit_type.rb +++ b/app/graphql/types/commit_type.rb @@ -9,39 +9,39 @@ module Types present_using CommitPresenter field :id, type: GraphQL::ID_TYPE, null: false, - description: 'ID (global ID) of the commit' + description: 'ID (global ID) of the commit.' field :sha, type: GraphQL::STRING_TYPE, null: false, - description: 'SHA1 ID of the commit' + description: 'SHA1 ID of the commit.' field :short_id, type: GraphQL::STRING_TYPE, null: false, - description: 'Short SHA1 ID of the commit' + description: 'Short SHA1 ID of the commit.' field :title, type: GraphQL::STRING_TYPE, null: true, calls_gitaly: true, - description: 'Title of the commit message' + description: 'Title of the commit message.' markdown_field :title_html, null: true field :description, type: GraphQL::STRING_TYPE, null: true, - description: 'Description of the commit message' + description: 'Description of the commit message.' markdown_field :description_html, null: true field :message, type: GraphQL::STRING_TYPE, null: true, - description: 'Raw commit message' + description: 'Raw commit message.' field :authored_date, type: Types::TimeType, null: true, - description: 'Timestamp of when the commit was authored' + description: 'Timestamp of when the commit was authored.' field :web_url, type: GraphQL::STRING_TYPE, null: false, - description: 'Web URL of the commit' + description: 'Web URL of the commit.' field :web_path, type: GraphQL::STRING_TYPE, null: false, - description: 'Web path of the commit' + description: 'Web path of the commit.' field :signature_html, type: GraphQL::STRING_TYPE, null: true, calls_gitaly: true, - description: 'Rendered HTML of the commit signature' + description: 'Rendered HTML of the commit signature.' field :author_name, type: GraphQL::STRING_TYPE, null: true, - description: 'Commit authors name' + description: 'Commit authors name.' field :author_gravatar, type: GraphQL::STRING_TYPE, null: true, - description: 'Commit authors gravatar' + description: 'Commit authors gravatar.' # models/commit lazy loads the author by email field :author, type: Types::UserType, null: true, - description: 'Author of the commit' + description: 'Author of the commit.' field :pipelines, null: true, - description: 'Pipelines of the commit ordered latest first', + description: 'Pipelines of the commit ordered latest first.', resolver: Resolvers::CommitPipelinesResolver def author_gravatar diff --git a/app/graphql/types/container_expiration_policy_type.rb b/app/graphql/types/container_expiration_policy_type.rb index f19aa964377..2b01474617a 100644 --- a/app/graphql/types/container_expiration_policy_type.rb +++ b/app/graphql/types/container_expiration_policy_type.rb @@ -8,14 +8,14 @@ module Types authorize :destroy_container_image - field :created_at, Types::TimeType, null: false, description: 'Timestamp of when the container expiration policy was created' - field :updated_at, Types::TimeType, null: false, description: 'Timestamp of when the container expiration policy was updated' - field :enabled, GraphQL::BOOLEAN_TYPE, null: false, description: 'Indicates whether this container expiration policy is enabled' - field :older_than, Types::ContainerExpirationPolicyOlderThanEnum, null: true, description: 'Tags older that this will expire' - field :cadence, Types::ContainerExpirationPolicyCadenceEnum, null: false, description: 'This container expiration policy schedule' - field :keep_n, Types::ContainerExpirationPolicyKeepEnum, null: true, description: 'Number of tags to retain' - field :name_regex, Types::UntrustedRegexp, null: true, description: 'Tags with names matching this regex pattern will expire' - field :name_regex_keep, Types::UntrustedRegexp, null: true, description: 'Tags with names matching this regex pattern will be preserved' - field :next_run_at, Types::TimeType, null: true, description: 'Next time that this container expiration policy will get executed' + field :created_at, Types::TimeType, null: false, description: 'Timestamp of when the container expiration policy was created.' + field :updated_at, Types::TimeType, null: false, description: 'Timestamp of when the container expiration policy was updated.' + field :enabled, GraphQL::BOOLEAN_TYPE, null: false, description: 'Indicates whether this container expiration policy is enabled.' + field :older_than, Types::ContainerExpirationPolicyOlderThanEnum, null: true, description: 'Tags older that this will expire.' + field :cadence, Types::ContainerExpirationPolicyCadenceEnum, null: false, description: 'This container expiration policy schedule.' + field :keep_n, Types::ContainerExpirationPolicyKeepEnum, null: true, description: 'Number of tags to retain.' + field :name_regex, Types::UntrustedRegexp, null: true, description: 'Tags with names matching this regex pattern will expire.' + field :name_regex_keep, Types::UntrustedRegexp, null: true, description: 'Tags with names matching this regex pattern will be preserved.' + field :next_run_at, Types::TimeType, null: true, description: 'Next time that this container expiration policy will get executed.' end end diff --git a/app/graphql/types/container_repository_details_type.rb b/app/graphql/types/container_repository_details_type.rb index 34523f3ea4a..1a9f57e701f 100644 --- a/app/graphql/types/container_repository_details_type.rb +++ b/app/graphql/types/container_repository_details_type.rb @@ -11,7 +11,7 @@ module Types field :tags, Types::ContainerRepositoryTagType.connection_type, null: true, - description: 'Tags of the container repository', + description: 'Tags of the container repository.', max_page_size: 20 def can_delete diff --git a/app/graphql/types/container_repository_type.rb b/app/graphql/types/container_repository_type.rb index 8735f8a173d..48c2b9f460f 100644 --- a/app/graphql/types/container_repository_type.rb +++ b/app/graphql/types/container_repository_type.rb @@ -19,7 +19,7 @@ module Types field :status, Types::ContainerRepositoryStatusEnum, null: true, description: 'Status of the container repository.' field :tags_count, GraphQL::INT_TYPE, null: false, description: 'Number of tags associated with this image.' field :can_delete, GraphQL::BOOLEAN_TYPE, null: false, description: 'Can the current user delete the container repository.' - field :project, Types::ProjectType, null: false, description: 'Project of the container registry' + field :project, Types::ProjectType, null: false, description: 'Project of the container registry.' def can_delete Ability.allowed?(current_user, :update_container_image, object) diff --git a/app/graphql/types/countable_connection_type.rb b/app/graphql/types/countable_connection_type.rb index f67194d99b3..0a9699a4570 100644 --- a/app/graphql/types/countable_connection_type.rb +++ b/app/graphql/types/countable_connection_type.rb @@ -4,7 +4,7 @@ module Types # rubocop: disable Graphql/AuthorizeTypes class CountableConnectionType < GraphQL::Types::Relay::BaseConnection field :count, GraphQL::INT_TYPE, null: false, - description: 'Total count of collection' + description: 'Total count of collection.' def count # rubocop: disable CodeReuse/ActiveRecord diff --git a/app/graphql/types/current_user_todos.rb b/app/graphql/types/current_user_todos.rb index e610286c1a9..79a430af1d7 100644 --- a/app/graphql/types/current_user_todos.rb +++ b/app/graphql/types/current_user_todos.rb @@ -8,10 +8,10 @@ module Types field_class Types::BaseField field :current_user_todos, Types::TodoType.connection_type, - description: 'Todos for the current user', + description: 'To-do items for the current user.', null: false do argument :state, Types::TodoStateEnum, - description: 'State of the todos', + description: 'State of the to-do items.', required: false end diff --git a/app/graphql/types/custom_emoji_type.rb b/app/graphql/types/custom_emoji_type.rb index f7d1a7800bc..246b60ce184 100644 --- a/app/graphql/types/custom_emoji_type.rb +++ b/app/graphql/types/custom_emoji_type.rb @@ -9,19 +9,19 @@ module Types field :id, ::Types::GlobalIDType[::CustomEmoji], null: false, - description: 'The ID of the emoji' + description: 'The ID of the emoji.' field :name, GraphQL::STRING_TYPE, null: false, - description: 'The name of the emoji' + description: 'The name of the emoji.' field :url, GraphQL::STRING_TYPE, null: false, method: :file, - description: 'The link to file of the emoji' + description: 'The link to file of the emoji.' field :external, GraphQL::BOOLEAN_TYPE, null: false, - description: 'Whether the emoji is an external link' + description: 'Whether the emoji is an external link.' end end diff --git a/app/graphql/types/design_management/design_at_version_type.rb b/app/graphql/types/design_management/design_at_version_type.rb index e10a0de1715..4240b8f3aae 100644 --- a/app/graphql/types/design_management/design_at_version_type.rb +++ b/app/graphql/types/design_management/design_at_version_type.rb @@ -18,12 +18,12 @@ module Types field :version, Types::DesignManagement::VersionType, null: false, - description: 'The version this design-at-versions is pinned to' + description: 'The version this design-at-versions is pinned to.' field :design, Types::DesignManagement::DesignType, null: false, - description: 'The underlying design' + description: 'The underlying design.' def cached_stateful_version(_parent) version diff --git a/app/graphql/types/design_management/design_collection_type.rb b/app/graphql/types/design_management/design_collection_type.rb index 26fbac15b30..570eac907f3 100644 --- a/app/graphql/types/design_management/design_collection_type.rb +++ b/app/graphql/types/design_management/design_collection_type.rb @@ -9,40 +9,40 @@ module Types authorize :read_design field :project, Types::ProjectType, null: false, - description: 'Project associated with the design collection' + description: 'Project associated with the design collection.' field :issue, Types::IssueType, null: false, - description: 'Issue associated with the design collection' + description: 'Issue associated with the design collection.' field :designs, Types::DesignManagement::DesignType.connection_type, null: false, resolver: Resolvers::DesignManagement::DesignsResolver, - description: 'All designs for the design collection', + description: 'All designs for the design collection.', complexity: 5 field :versions, Types::DesignManagement::VersionType.connection_type, resolver: Resolvers::DesignManagement::VersionsResolver, - description: 'All versions related to all designs, ordered newest first' + description: 'All versions related to all designs, ordered newest first.' field :version, Types::DesignManagement::VersionType, resolver: Resolvers::DesignManagement::VersionsResolver.single, - description: 'A specific version' + description: 'A specific version.' field :design_at_version, ::Types::DesignManagement::DesignAtVersionType, null: true, resolver: ::Resolvers::DesignManagement::DesignAtVersionResolver, - description: 'Find a design as of a version' + description: 'Find a design as of a version.' field :design, ::Types::DesignManagement::DesignType, null: true, resolver: ::Resolvers::DesignManagement::DesignResolver, - description: 'Find a specific design' + description: 'Find a specific design.' field :copy_state, ::Types::DesignManagement::DesignCollectionCopyStateEnum, null: true, - description: 'Copy state of the design collection' + description: 'Copy state of the design collection.' end end end diff --git a/app/graphql/types/design_management/design_fields.rb b/app/graphql/types/design_management/design_fields.rb index b03b3927392..b770e30f5be 100644 --- a/app/graphql/types/design_management/design_fields.rb +++ b/app/graphql/types/design_management/design_fields.rb @@ -7,12 +7,12 @@ module Types field_class Types::BaseField - field :id, GraphQL::ID_TYPE, description: 'The ID of this design', null: false - field :project, Types::ProjectType, null: false, description: 'The project the design belongs to' - field :issue, Types::IssueType, null: false, description: 'The issue the design belongs to' - field :filename, GraphQL::STRING_TYPE, null: false, description: 'The filename of the design' - field :full_path, GraphQL::STRING_TYPE, null: false, description: 'The full path to the design file' - field :image, GraphQL::STRING_TYPE, null: false, extras: [:parent], description: 'The URL of the full-sized image' + field :id, GraphQL::ID_TYPE, description: 'The ID of this design.', null: false + field :project, Types::ProjectType, null: false, description: 'The project the design belongs to.' + field :issue, Types::IssueType, null: false, description: 'The issue the design belongs to.' + field :filename, GraphQL::STRING_TYPE, null: false, description: 'The filename of the design.' + field :full_path, GraphQL::STRING_TYPE, null: false, description: 'The full path to the design file.' + field :image, GraphQL::STRING_TYPE, null: false, extras: [:parent], description: 'The URL of the full-sized image.' field :image_v432x230, GraphQL::STRING_TYPE, null: true, extras: [:parent], description: 'The URL of the design resized to fit within the bounds of 432x230. ' \ 'This will be `null` if the image has not been generated' @@ -20,16 +20,16 @@ module Types null: false, calls_gitaly: true, extras: [:parent], - description: 'The diff refs for this design' + description: 'The diff refs for this design.' field :event, Types::DesignManagement::DesignVersionEventEnum, null: false, extras: [:parent], - description: 'How this design was changed in the current version' + description: 'How this design was changed in the current version.' field :notes_count, GraphQL::INT_TYPE, null: false, method: :user_notes_count, - description: 'The total count of user-created notes for this design' + description: 'The total count of user-created notes for this design.' def diff_refs(parent:) version = cached_stateful_version(parent) diff --git a/app/graphql/types/design_management/design_type.rb b/app/graphql/types/design_management/design_type.rb index bab22015dc4..44e87905f92 100644 --- a/app/graphql/types/design_management/design_type.rb +++ b/app/graphql/types/design_management/design_type.rb @@ -17,7 +17,7 @@ module Types field :versions, Types::DesignManagement::VersionType.connection_type, resolver: Resolvers::DesignManagement::VersionsResolver, - description: "All versions related to this design ordered newest first", + description: "All versions related to this design ordered newest first.", extras: [:parent] # Returns a `DesignManagement::Version` for this query based on the diff --git a/app/graphql/types/design_management/version_type.rb b/app/graphql/types/design_management/version_type.rb index c774f5d1bdf..4bc71aef0f4 100644 --- a/app/graphql/types/design_management/version_type.rb +++ b/app/graphql/types/design_management/version_type.rb @@ -12,25 +12,25 @@ module Types authorize :read_design field :id, GraphQL::ID_TYPE, null: false, - description: 'ID of the design version' + description: 'ID of the design version.' field :sha, GraphQL::ID_TYPE, null: false, - description: 'SHA of the design version' + description: 'SHA of the design version.' field :designs, ::Types::DesignManagement::DesignType.connection_type, null: false, - description: 'All designs that were changed in the version' + description: 'All designs that were changed in the version.' field :designs_at_version, ::Types::DesignManagement::DesignAtVersionType.connection_type, null: false, - description: 'All designs that are visible at this version, as of this version', + description: 'All designs that are visible at this version, as of this version.', resolver: ::Resolvers::DesignManagement::Version::DesignsAtVersionResolver field :design_at_version, ::Types::DesignManagement::DesignAtVersionType, null: false, - description: 'A particular design as of this version, provided it is visible at this version', + description: 'A particular design as of this version, provided it is visible at this version.', resolver: ::Resolvers::DesignManagement::Version::DesignsAtVersionResolver.single end end diff --git a/app/graphql/types/design_management_type.rb b/app/graphql/types/design_management_type.rb index ec85b8a0c1f..be0fb8253ca 100644 --- a/app/graphql/types/design_management_type.rb +++ b/app/graphql/types/design_management_type.rb @@ -8,11 +8,11 @@ module Types field :version, ::Types::DesignManagement::VersionType, null: true, resolver: ::Resolvers::DesignManagement::VersionResolver, - description: 'Find a version' + description: 'Find a version.' field :design_at_version, ::Types::DesignManagement::DesignAtVersionType, null: true, resolver: ::Resolvers::DesignManagement::DesignAtVersionResolver, - description: 'Find a design as of a version' + description: 'Find a design as of a version.' end end diff --git a/app/graphql/types/diff_paths_input_type.rb b/app/graphql/types/diff_paths_input_type.rb index 43feddd9827..864cec1ab07 100644 --- a/app/graphql/types/diff_paths_input_type.rb +++ b/app/graphql/types/diff_paths_input_type.rb @@ -4,9 +4,9 @@ module Types # rubocop: disable Graphql/AuthorizeTypes class DiffPathsInputType < BaseInputObject argument :old_path, GraphQL::STRING_TYPE, required: false, - description: 'The path of the file on the start sha' + description: 'The path of the file on the start sha.' argument :new_path, GraphQL::STRING_TYPE, required: false, - description: 'The path of the file on the head sha' + description: 'The path of the file on the head sha.' end # rubocop: enable Graphql/AuthorizeTypes end diff --git a/app/graphql/types/diff_refs_type.rb b/app/graphql/types/diff_refs_type.rb index 4049a204f66..3c8f934f1eb 100644 --- a/app/graphql/types/diff_refs_type.rb +++ b/app/graphql/types/diff_refs_type.rb @@ -7,11 +7,11 @@ module Types graphql_name 'DiffRefs' field :head_sha, GraphQL::STRING_TYPE, null: false, - description: 'SHA of the HEAD at the time the comment was made' + description: 'SHA of the HEAD at the time the comment was made.' field :base_sha, GraphQL::STRING_TYPE, null: true, - description: 'Merge base of the branch the comment was made on' + description: 'Merge base of the branch the comment was made on.' field :start_sha, GraphQL::STRING_TYPE, null: false, - description: 'SHA of the branch being compared against' + description: 'SHA of the branch being compared against.' end # rubocop: enable Graphql/AuthorizeTypes end diff --git a/app/graphql/types/diff_stats_summary_type.rb b/app/graphql/types/diff_stats_summary_type.rb index 956400fd21b..78c0e2f2b4c 100644 --- a/app/graphql/types/diff_stats_summary_type.rb +++ b/app/graphql/types/diff_stats_summary_type.rb @@ -9,13 +9,13 @@ module Types description 'Aggregated summary of changes' field :additions, GraphQL::INT_TYPE, null: false, - description: 'Number of lines added' + description: 'Number of lines added.' field :deletions, GraphQL::INT_TYPE, null: false, - description: 'Number of lines deleted' + description: 'Number of lines deleted.' field :changes, GraphQL::INT_TYPE, null: false, - description: 'Number of lines changed' + description: 'Number of lines changed.' field :file_count, GraphQL::INT_TYPE, null: false, - description: 'Number of files changed' + description: 'Number of files changed.' def changes object[:additions] + object[:deletions] diff --git a/app/graphql/types/diff_stats_type.rb b/app/graphql/types/diff_stats_type.rb index 6c79a4c389d..8a6840e5a94 100644 --- a/app/graphql/types/diff_stats_type.rb +++ b/app/graphql/types/diff_stats_type.rb @@ -9,11 +9,11 @@ module Types description 'Changes to a single file' field :path, GraphQL::STRING_TYPE, null: false, - description: 'File path, relative to repository root' + description: 'File path, relative to repository root.' field :additions, GraphQL::INT_TYPE, null: false, - description: 'Number of lines added to this file' + description: 'Number of lines added to this file.' field :deletions, GraphQL::INT_TYPE, null: false, - description: 'Number of lines deleted from this file' + description: 'Number of lines deleted from this file.' end # rubocop: enable Graphql/AuthorizeTypes end diff --git a/app/graphql/types/environment_type.rb b/app/graphql/types/environment_type.rb index e3885668643..2e6417f08ea 100644 --- a/app/graphql/types/environment_type.rb +++ b/app/graphql/types/environment_type.rb @@ -10,24 +10,24 @@ module Types authorize :read_environment field :name, GraphQL::STRING_TYPE, null: false, - description: 'Human-readable name of the environment' + description: 'Human-readable name of the environment.' field :id, GraphQL::ID_TYPE, null: false, - description: 'ID of the environment' + description: 'ID of the environment.' field :state, GraphQL::STRING_TYPE, null: false, - description: 'State of the environment, for example: available/stopped' + description: 'State of the environment, for example: available/stopped.' field :path, GraphQL::STRING_TYPE, null: false, description: 'The path to the environment.' field :metrics_dashboard, Types::Metrics::DashboardType, null: true, - description: 'Metrics dashboard schema for the environment', + description: 'Metrics dashboard schema for the environment.', resolver: Resolvers::Metrics::DashboardResolver field :latest_opened_most_severe_alert, Types::AlertManagement::AlertType, null: true, - description: 'The most severe open alert for the environment. If multiple alerts have equal severity, the most recent is returned' + description: 'The most severe open alert for the environment. If multiple alerts have equal severity, the most recent is returned.' end end diff --git a/app/graphql/types/error_tracking/sentry_detailed_error_type.rb b/app/graphql/types/error_tracking/sentry_detailed_error_type.rb index cfde9fa0d6a..59bd97e3448 100644 --- a/app/graphql/types/error_tracking/sentry_detailed_error_type.rb +++ b/app/graphql/types/error_tracking/sentry_detailed_error_type.rb @@ -12,93 +12,93 @@ module Types field :id, GraphQL::ID_TYPE, null: false, - description: 'ID (global ID) of the error' + description: 'ID (global ID) of the error.' field :sentry_id, GraphQL::STRING_TYPE, method: :id, null: false, - description: 'ID (Sentry ID) of the error' + description: 'ID (Sentry ID) of the error.' field :title, GraphQL::STRING_TYPE, null: false, - description: 'Title of the error' + description: 'Title of the error.' field :type, GraphQL::STRING_TYPE, null: false, - description: 'Type of the error' + description: 'Type of the error.' field :user_count, GraphQL::INT_TYPE, null: false, - description: 'Count of users affected by the error' + description: 'Count of users affected by the error.' field :count, GraphQL::INT_TYPE, null: false, - description: 'Count of occurrences' + description: 'Count of occurrences.' field :first_seen, Types::TimeType, null: false, - description: 'Timestamp when the error was first seen' + description: 'Timestamp when the error was first seen.' field :last_seen, Types::TimeType, null: false, - description: 'Timestamp when the error was last seen' + description: 'Timestamp when the error was last seen.' field :message, GraphQL::STRING_TYPE, null: true, - description: 'Sentry metadata message of the error' + description: 'Sentry metadata message of the error.' field :culprit, GraphQL::STRING_TYPE, null: false, - description: 'Culprit of the error' + description: 'Culprit of the error.' field :external_base_url, GraphQL::STRING_TYPE, null: false, - description: 'External Base URL of the Sentry Instance' + description: 'External Base URL of the Sentry Instance.' field :external_url, GraphQL::STRING_TYPE, null: false, - description: 'External URL of the error' + description: 'External URL of the error.' field :sentry_project_id, GraphQL::ID_TYPE, method: :project_id, null: false, - description: 'ID of the project (Sentry project)' + description: 'ID of the project (Sentry project).' field :sentry_project_name, GraphQL::STRING_TYPE, method: :project_name, null: false, - description: 'Name of the project affected by the error' + description: 'Name of the project affected by the error.' field :sentry_project_slug, GraphQL::STRING_TYPE, method: :project_slug, null: false, - description: 'Slug of the project affected by the error' + description: 'Slug of the project affected by the error.' field :short_id, GraphQL::STRING_TYPE, null: false, - description: 'Short ID (Sentry ID) of the error' + description: 'Short ID (Sentry ID) of the error.' field :status, Types::ErrorTracking::SentryErrorStatusEnum, null: false, - description: 'Status of the error' + description: 'Status of the error.' field :frequency, [Types::ErrorTracking::SentryErrorFrequencyType], null: false, - description: 'Last 24hr stats of the error' + description: 'Last 24hr stats of the error.' field :first_release_last_commit, GraphQL::STRING_TYPE, null: true, - description: 'Commit the error was first seen' + description: 'Commit the error was first seen.' field :last_release_last_commit, GraphQL::STRING_TYPE, null: true, - description: 'Commit the error was last seen' + description: 'Commit the error was last seen.' field :first_release_short_version, GraphQL::STRING_TYPE, null: true, - description: 'Release short version the error was first seen' + description: 'Release short version the error was first seen.' field :last_release_short_version, GraphQL::STRING_TYPE, null: true, - description: 'Release short version the error was last seen' + description: 'Release short version the error was last seen.' field :first_release_version, GraphQL::STRING_TYPE, null: true, - description: 'Release version the error was first seen' + description: 'Release version the error was first seen.' field :last_release_version, GraphQL::STRING_TYPE, null: true, - description: 'Release version the error was last seen' + description: 'Release version the error was last seen.' field :gitlab_commit, GraphQL::STRING_TYPE, null: true, - description: 'GitLab commit SHA attributed to the Error based on the release version' + description: 'GitLab commit SHA attributed to the Error based on the release version.' field :gitlab_commit_path, GraphQL::STRING_TYPE, null: true, - description: 'Path to the GitLab page for the GitLab commit attributed to the error' + description: 'Path to the GitLab page for the GitLab commit attributed to the error.' field :gitlab_issue_path, GraphQL::STRING_TYPE, method: :gitlab_issue, null: true, - description: 'URL of GitLab Issue' + description: 'URL of GitLab Issue.' field :tags, Types::ErrorTracking::SentryErrorTagsType, null: false, - description: 'Tags associated with the Sentry Error' + description: 'Tags associated with the Sentry Error.' end end end diff --git a/app/graphql/types/error_tracking/sentry_error_collection_type.rb b/app/graphql/types/error_tracking/sentry_error_collection_type.rb index 49d5d62c860..d3941b7c410 100644 --- a/app/graphql/types/error_tracking/sentry_error_collection_type.rb +++ b/app/graphql/types/error_tracking/sentry_error_collection_type.rb @@ -9,18 +9,18 @@ module Types authorize :read_sentry_issue field :errors, - description: "Collection of Sentry Errors", + description: "Collection of Sentry Errors.", resolver: Resolvers::ErrorTracking::SentryErrorsResolver field :detailed_error, - description: 'Detailed version of a Sentry error on the project', + description: 'Detailed version of a Sentry error on the project.', resolver: Resolvers::ErrorTracking::SentryDetailedErrorResolver field :error_stack_trace, - description: 'Stack Trace of Sentry Error', + description: 'Stack Trace of Sentry Error.', resolver: Resolvers::ErrorTracking::SentryErrorStackTraceResolver field :external_url, GraphQL::STRING_TYPE, null: true, - description: "External URL for Sentry" + description: "External URL for Sentry." end end end diff --git a/app/graphql/types/error_tracking/sentry_error_frequency_type.rb b/app/graphql/types/error_tracking/sentry_error_frequency_type.rb index a44ca0684b6..05af1391af3 100644 --- a/app/graphql/types/error_tracking/sentry_error_frequency_type.rb +++ b/app/graphql/types/error_tracking/sentry_error_frequency_type.rb @@ -8,10 +8,10 @@ module Types field :time, Types::TimeType, null: false, - description: "Time the error frequency stats were recorded" + description: "Time the error frequency stats were recorded." field :count, GraphQL::INT_TYPE, null: false, - description: "Count of errors received since the previously recorded time" + description: "Count of errors received since the previously recorded time." end # rubocop: enable Graphql/AuthorizeTypes end diff --git a/app/graphql/types/error_tracking/sentry_error_stack_trace_context_type.rb b/app/graphql/types/error_tracking/sentry_error_stack_trace_context_type.rb index e6d02c948d5..0b3c4cf55b9 100644 --- a/app/graphql/types/error_tracking/sentry_error_stack_trace_context_type.rb +++ b/app/graphql/types/error_tracking/sentry_error_stack_trace_context_type.rb @@ -10,11 +10,11 @@ module Types field :line, GraphQL::INT_TYPE, null: false, - description: 'Line number of the context' + description: 'Line number of the context.' field :code, GraphQL::STRING_TYPE, null: false, - description: 'Code number of the context' + description: 'Code number of the context.' def line object[0] diff --git a/app/graphql/types/error_tracking/sentry_error_stack_trace_entry_type.rb b/app/graphql/types/error_tracking/sentry_error_stack_trace_entry_type.rb index 2e6c40b233b..c9915d052f9 100644 --- a/app/graphql/types/error_tracking/sentry_error_stack_trace_entry_type.rb +++ b/app/graphql/types/error_tracking/sentry_error_stack_trace_entry_type.rb @@ -9,19 +9,19 @@ module Types field :function, GraphQL::STRING_TYPE, null: true, - description: 'Function in which the Sentry error occurred' + description: 'Function in which the Sentry error occurred.' field :col, GraphQL::STRING_TYPE, null: true, - description: 'Function in which the Sentry error occurred' + description: 'Function in which the Sentry error occurred.' field :line, GraphQL::STRING_TYPE, null: true, - description: 'Function in which the Sentry error occurred' + description: 'Function in which the Sentry error occurred.' field :file_name, GraphQL::STRING_TYPE, null: true, - description: 'File in which the Sentry error occurred' + description: 'File in which the Sentry error occurred.' field :trace_context, [Types::ErrorTracking::SentryErrorStackTraceContextType], null: true, - description: 'Context of the Sentry error' + description: 'Context of the Sentry error.' def function object['function'] diff --git a/app/graphql/types/error_tracking/sentry_error_stack_trace_type.rb b/app/graphql/types/error_tracking/sentry_error_stack_trace_type.rb index 1bbe7e0c77b..52959a9329b 100644 --- a/app/graphql/types/error_tracking/sentry_error_stack_trace_type.rb +++ b/app/graphql/types/error_tracking/sentry_error_stack_trace_type.rb @@ -10,13 +10,13 @@ module Types field :issue_id, GraphQL::STRING_TYPE, null: false, - description: 'ID of the Sentry error' + description: 'ID of the Sentry error.' field :date_received, GraphQL::STRING_TYPE, null: false, - description: 'Time the stack trace was received by Sentry' + description: 'Time the stack trace was received by Sentry.' field :stack_trace_entries, [Types::ErrorTracking::SentryErrorStackTraceEntryType], null: false, - description: 'Stack trace entries for the Sentry error' + description: 'Stack trace entries for the Sentry error.' end end end diff --git a/app/graphql/types/error_tracking/sentry_error_tags_type.rb b/app/graphql/types/error_tracking/sentry_error_tags_type.rb index e6d96571561..e2b051998c5 100644 --- a/app/graphql/types/error_tracking/sentry_error_tags_type.rb +++ b/app/graphql/types/error_tracking/sentry_error_tags_type.rb @@ -9,10 +9,10 @@ module Types field :level, GraphQL::STRING_TYPE, null: true, - description: "Severity level of the Sentry Error" + description: "Severity level of the Sentry Error." field :logger, GraphQL::STRING_TYPE, null: true, - description: "Logger of the Sentry Error" + description: "Logger of the Sentry Error." end # rubocop: enable Graphql/AuthorizeTypes end diff --git a/app/graphql/types/error_tracking/sentry_error_type.rb b/app/graphql/types/error_tracking/sentry_error_type.rb index 693ab0c4f8f..c0e09fb8c65 100644 --- a/app/graphql/types/error_tracking/sentry_error_type.rb +++ b/app/graphql/types/error_tracking/sentry_error_type.rb @@ -11,59 +11,59 @@ module Types field :id, GraphQL::ID_TYPE, null: false, - description: 'ID (global ID) of the error' + description: 'ID (global ID) of the error.' field :sentry_id, GraphQL::STRING_TYPE, method: :id, null: false, - description: 'ID (Sentry ID) of the error' + description: 'ID (Sentry ID) of the error.' field :first_seen, Types::TimeType, null: false, - description: 'Timestamp when the error was first seen' + description: 'Timestamp when the error was first seen.' field :last_seen, Types::TimeType, null: false, - description: 'Timestamp when the error was last seen' + description: 'Timestamp when the error was last seen.' field :title, GraphQL::STRING_TYPE, null: false, - description: 'Title of the error' + description: 'Title of the error.' field :type, GraphQL::STRING_TYPE, null: false, - description: 'Type of the error' + description: 'Type of the error.' field :user_count, GraphQL::INT_TYPE, null: false, - description: 'Count of users affected by the error' + description: 'Count of users affected by the error.' field :count, GraphQL::INT_TYPE, null: false, - description: 'Count of occurrences' + description: 'Count of occurrences.' field :message, GraphQL::STRING_TYPE, null: true, - description: 'Sentry metadata message of the error' + description: 'Sentry metadata message of the error.' field :culprit, GraphQL::STRING_TYPE, null: false, - description: 'Culprit of the error' + description: 'Culprit of the error.' field :external_url, GraphQL::STRING_TYPE, null: false, - description: 'External URL of the error' + description: 'External URL of the error.' field :short_id, GraphQL::STRING_TYPE, null: false, - description: 'Short ID (Sentry ID) of the error' + description: 'Short ID (Sentry ID) of the error.' field :status, Types::ErrorTracking::SentryErrorStatusEnum, null: false, - description: 'Status of the error' + description: 'Status of the error.' field :frequency, [Types::ErrorTracking::SentryErrorFrequencyType], null: false, - description: 'Last 24hr stats of the error' + description: 'Last 24hr stats of the error.' field :sentry_project_id, GraphQL::ID_TYPE, method: :project_id, null: false, - description: 'ID of the project (Sentry project)' + description: 'ID of the project (Sentry project).' field :sentry_project_name, GraphQL::STRING_TYPE, method: :project_name, null: false, - description: 'Name of the project affected by the error' + description: 'Name of the project affected by the error.' field :sentry_project_slug, GraphQL::STRING_TYPE, method: :project_slug, null: false, - description: 'Slug of the project affected by the error' + description: 'Slug of the project affected by the error.' end # rubocop: enable Graphql/AuthorizeTypes end diff --git a/app/graphql/types/evidence_type.rb b/app/graphql/types/evidence_type.rb index a2fc9953c67..6e56ad7d407 100644 --- a/app/graphql/types/evidence_type.rb +++ b/app/graphql/types/evidence_type.rb @@ -10,12 +10,12 @@ module Types present_using Releases::EvidencePresenter field :id, GraphQL::ID_TYPE, null: false, - description: 'ID of the evidence' + description: 'ID of the evidence.' field :sha, GraphQL::STRING_TYPE, null: true, - description: 'SHA1 ID of the evidence hash' + description: 'SHA1 ID of the evidence hash.' field :filepath, GraphQL::STRING_TYPE, null: true, - description: 'URL from where the evidence can be downloaded' + description: 'URL from where the evidence can be downloaded.' field :collected_at, Types::TimeType, null: true, - description: 'Timestamp when the evidence was collected' + description: 'Timestamp when the evidence was collected.' end end diff --git a/app/graphql/types/global_id_type.rb b/app/graphql/types/global_id_type.rb index 4c51d4248dd..ed28c3ffd7e 100644 --- a/app/graphql/types/global_id_type.rb +++ b/app/graphql/types/global_id_type.rb @@ -46,7 +46,7 @@ module Types @id_types[model_class] ||= Class.new(self) do graphql_name "#{model_class.name.gsub(/::/, '')}ID" - description "Identifier of #{model_class.name}" + description "Identifier of #{model_class.name}." self.define_singleton_method(:to_s) do graphql_name diff --git a/app/graphql/types/grafana_integration_type.rb b/app/graphql/types/grafana_integration_type.rb index 6625af36f82..630d3a10e36 100644 --- a/app/graphql/types/grafana_integration_type.rb +++ b/app/graphql/types/grafana_integration_type.rb @@ -7,14 +7,14 @@ module Types authorize :admin_operations field :id, GraphQL::ID_TYPE, null: false, - description: 'Internal ID of the Grafana integration' + description: 'Internal ID of the Grafana integration.' field :grafana_url, GraphQL::STRING_TYPE, null: false, - description: 'URL for the Grafana host for the Grafana integration' + description: 'URL for the Grafana host for the Grafana integration.' field :enabled, GraphQL::BOOLEAN_TYPE, null: false, - description: 'Indicates whether Grafana integration is enabled' + description: 'Indicates whether Grafana integration is enabled.' field :created_at, Types::TimeType, null: false, - description: 'Timestamp of the issue\'s creation' + description: 'Timestamp of the issue\'s creation.' field :updated_at, Types::TimeType, null: false, - description: 'Timestamp of the issue\'s last activity' + description: 'Timestamp of the issue\'s last activity.' end end diff --git a/app/graphql/types/group_invitation_type.rb b/app/graphql/types/group_invitation_type.rb index efb0c8a41c8..06a997bbc14 100644 --- a/app/graphql/types/group_invitation_type.rb +++ b/app/graphql/types/group_invitation_type.rb @@ -11,7 +11,7 @@ module Types description 'Represents a Group Invitation' field :group, Types::GroupType, null: true, - description: 'Group that a User is invited to' + description: 'Group that a User is invited to.' def group Gitlab::Graphql::Loaders::BatchModelLoader.new(Group, object.source_id).find diff --git a/app/graphql/types/group_member_type.rb b/app/graphql/types/group_member_type.rb index 204da5a302a..8b8e69d795d 100644 --- a/app/graphql/types/group_member_type.rb +++ b/app/graphql/types/group_member_type.rb @@ -11,7 +11,7 @@ module Types description 'Represents a Group Membership' field :group, Types::GroupType, null: true, - description: 'Group that a User is a member of' + description: 'Group that a User is a member of.' def group Gitlab::Graphql::Loaders::BatchModelLoader.new(Group, object.source_id).find diff --git a/app/graphql/types/group_type.rb b/app/graphql/types/group_type.rb index 0ee8a19c1a3..42391ec1d98 100644 --- a/app/graphql/types/group_type.rb +++ b/app/graphql/types/group_type.rb @@ -9,91 +9,91 @@ module Types expose_permissions Types::PermissionTypes::Group field :web_url, GraphQL::STRING_TYPE, null: false, - description: 'Web URL of the group' + description: 'Web URL of the group.' field :avatar_url, GraphQL::STRING_TYPE, null: true, - description: 'Avatar URL of the group' + description: 'Avatar URL of the group.' field :custom_emoji, Types::CustomEmojiType.connection_type, null: true, - description: 'Custom emoji within this namespace', + description: 'Custom emoji within this namespace.', feature_flag: :custom_emoji field :share_with_group_lock, GraphQL::BOOLEAN_TYPE, null: true, - description: 'Indicates if sharing a project with another group within this group is prevented' + description: 'Indicates if sharing a project with another group within this group is prevented.' field :project_creation_level, GraphQL::STRING_TYPE, null: true, method: :project_creation_level_str, - description: 'The permission level required to create projects in the group' + description: 'The permission level required to create projects in the group.' field :subgroup_creation_level, GraphQL::STRING_TYPE, null: true, method: :subgroup_creation_level_str, - description: 'The permission level required to create subgroups within the group' + description: 'The permission level required to create subgroups within the group.' field :require_two_factor_authentication, GraphQL::BOOLEAN_TYPE, null: true, - description: 'Indicates if all users in this group are required to set up two-factor authentication' + description: 'Indicates if all users in this group are required to set up two-factor authentication.' field :two_factor_grace_period, GraphQL::INT_TYPE, null: true, - description: 'Time before two-factor authentication is enforced' + description: 'Time before two-factor authentication is enforced.' field :auto_devops_enabled, GraphQL::BOOLEAN_TYPE, null: true, - description: 'Indicates whether Auto DevOps is enabled for all projects within this group' + description: 'Indicates whether Auto DevOps is enabled for all projects within this group.' field :emails_disabled, GraphQL::BOOLEAN_TYPE, null: true, - description: 'Indicates if a group has email notifications disabled' + description: 'Indicates if a group has email notifications disabled.' field :mentions_disabled, GraphQL::BOOLEAN_TYPE, null: true, - description: 'Indicates if a group is disabled from getting mentioned' + description: 'Indicates if a group is disabled from getting mentioned.' field :parent, GroupType, null: true, - description: 'Parent group' + description: 'Parent group.' field :issues, Types::IssueType.connection_type, null: true, - description: 'Issues for projects in this group', + description: 'Issues for projects in this group.', resolver: Resolvers::GroupIssuesResolver field :merge_requests, Types::MergeRequestType.connection_type, null: true, - description: 'Merge requests for projects in this group', + description: 'Merge requests for projects in this group.', resolver: Resolvers::GroupMergeRequestsResolver field :milestones, Types::MilestoneType.connection_type, null: true, - description: 'Milestones of the group', + description: 'Milestones of the group.', resolver: Resolvers::GroupMilestonesResolver field :boards, Types::BoardType.connection_type, null: true, - description: 'Boards of the group', + description: 'Boards of the group.', max_page_size: 2000, resolver: Resolvers::BoardsResolver field :board, Types::BoardType, null: true, - description: 'A single board of the group', + description: 'A single board of the group.', resolver: Resolvers::BoardResolver field :label, Types::LabelType, null: true, - description: 'A label available on this group' do + description: 'A label available on this group.' do argument :title, GraphQL::STRING_TYPE, required: true, - description: 'Title of the label' + description: 'Title of the label.' end field :group_members, - description: 'A membership of a user within this group', + description: 'A membership of a user within this group.', resolver: Resolvers::GroupMembersResolver field :container_repositories, Types::ContainerRepositoryType.connection_type, null: true, - description: 'Container repositories of the group', + description: 'Container repositories of the group.', resolver: Resolvers::ContainerRepositoriesResolver, authorize: :read_container_image field :container_repositories_count, GraphQL::INT_TYPE, null: false, - description: 'Number of container repositories in the group' + description: 'Number of container repositories in the group.' def label(title:) BatchLoader::GraphQL.for(title).batch(key: group) do |titles, loader, args| @@ -107,10 +107,10 @@ module Types field :labels, Types::LabelType.connection_type, null: true, - description: 'Labels available on this group' do + description: 'Labels available on this group.' do argument :search_term, GraphQL::STRING_TYPE, required: false, - description: 'A search term to find labels with' + description: 'A search term to find labels with.' end def labels(search_term: nil) diff --git a/app/graphql/types/merge_request_state_enum.rb b/app/graphql/types/merge_request_state_enum.rb index 92f52726ab3..c14b9f80a53 100644 --- a/app/graphql/types/merge_request_state_enum.rb +++ b/app/graphql/types/merge_request_state_enum.rb @@ -5,6 +5,6 @@ module Types graphql_name 'MergeRequestState' description 'State of a GitLab merge request' - value 'merged' + value 'merged', description: "Merge Request has been merged" end end diff --git a/app/graphql/types/merge_request_type.rb b/app/graphql/types/merge_request_type.rb index ee7d5780f7a..62b3e174a9f 100644 --- a/app/graphql/types/merge_request_type.rb +++ b/app/graphql/types/merge_request_type.rb @@ -152,7 +152,7 @@ module Types end field :task_completion_status, Types::TaskCompletionStatus, null: false, description: Types::TaskCompletionStatus.description - field :commit_count, GraphQL::INT_TYPE, null: true, + field :commit_count, GraphQL::INT_TYPE, null: true, method: :commits_count, description: 'Number of commits in the merge request' field :conflicts, GraphQL::BOOLEAN_TYPE, null: false, method: :cannot_be_merged?, description: 'Indicates if the merge request has conflicts' @@ -218,10 +218,6 @@ module Types BatchLoaders::MergeRequestDiffSummaryBatchLoader.load_for(object) end - def commit_count - object&.metrics&.commits_count - end - def source_branch_protected object.source_project.present? && ProtectedBranch.protected?(object.source_project, object.source_branch) end diff --git a/app/graphql/types/milestone_state_enum.rb b/app/graphql/types/milestone_state_enum.rb index 032571ac88f..e3b60395c9b 100644 --- a/app/graphql/types/milestone_state_enum.rb +++ b/app/graphql/types/milestone_state_enum.rb @@ -2,7 +2,10 @@ module Types class MilestoneStateEnum < BaseEnum - value 'active' - value 'closed' + graphql_name 'MilestoneStateEnum' + description 'Current state of milestone' + + value 'active', description: 'Milestone is currently active' + value 'closed', description: 'Milestone is closed' end end diff --git a/app/graphql/types/mutation_type.rb b/app/graphql/types/mutation_type.rb index f9dd11cbe37..166f5617da2 100644 --- a/app/graphql/types/mutation_type.rb +++ b/app/graphql/types/mutation_type.rb @@ -15,6 +15,7 @@ module Types mount_mutation Mutations::AlertManagement::HttpIntegration::Update mount_mutation Mutations::AlertManagement::HttpIntegration::ResetToken mount_mutation Mutations::AlertManagement::HttpIntegration::Destroy + mount_mutation Mutations::Security::CiConfiguration::ConfigureSast mount_mutation Mutations::AlertManagement::PrometheusIntegration::Create mount_mutation Mutations::AlertManagement::PrometheusIntegration::Update mount_mutation Mutations::AlertManagement::PrometheusIntegration::ResetToken @@ -50,6 +51,7 @@ module Types mount_mutation Mutations::MergeRequests::SetSubscription mount_mutation Mutations::MergeRequests::SetWip, calls_gitaly: true mount_mutation Mutations::MergeRequests::SetAssignees + mount_mutation Mutations::MergeRequests::ReviewerRereview mount_mutation Mutations::Metrics::Dashboard::Annotations::Create mount_mutation Mutations::Metrics::Dashboard::Annotations::Delete mount_mutation Mutations::Notes::Create::Note, calls_gitaly: true @@ -97,5 +99,4 @@ module Types end ::Types::MutationType.prepend(::Types::DeprecatedMutations) -::Types::MutationType.prepend_if_ee('EE::Types::DeprecatedMutations') ::Types::MutationType.prepend_if_ee('::EE::Types::MutationType') diff --git a/app/graphql/types/notes/discussion_type.rb b/app/graphql/types/notes/discussion_type.rb index a51d253097d..9b863990849 100644 --- a/app/graphql/types/notes/discussion_type.rb +++ b/app/graphql/types/notes/discussion_type.rb @@ -3,24 +3,26 @@ module Types module Notes class DiscussionType < BaseObject + DiscussionID = ::Types::GlobalIDType[::Discussion] + graphql_name 'Discussion' authorize :read_note implements(Types::ResolvableInterface) - field :id, GraphQL::ID_TYPE, null: false, + field :id, DiscussionID, null: false, description: "ID of this discussion" - field :reply_id, GraphQL::ID_TYPE, null: false, + field :reply_id, DiscussionID, null: false, description: 'ID used to reply to this discussion' field :created_at, Types::TimeType, null: false, description: "Timestamp of the discussion's creation" field :notes, Types::Notes::NoteType.connection_type, null: false, description: 'All notes in the discussion' - # The gem we use to generate Global IDs is hard-coded to work with - # `id` properties. To generate a GID for the `reply_id` property, - # we must use the ::Gitlab::GlobalId module. + # DiscussionID.coerce_result is suitable here, but will always mark this + # as being a 'Discussion'. Using `GlobalId.build` guarantees that we get + # the correct class, and that it matches `id`. def reply_id ::Gitlab::GlobalId.build(object, id: object.reply_id) end diff --git a/app/graphql/types/notes/note_type.rb b/app/graphql/types/notes/note_type.rb index 84b61340e93..dea55fe7f9e 100644 --- a/app/graphql/types/notes/note_type.rb +++ b/app/graphql/types/notes/note_type.rb @@ -11,7 +11,7 @@ module Types implements(Types::ResolvableInterface) - field :id, GraphQL::ID_TYPE, null: false, + field :id, ::Types::GlobalIDType[::Note], null: false, description: 'ID of the note' field :project, Types::ProjectType, diff --git a/app/graphql/types/packages/composer/details_type.rb b/app/graphql/types/packages/composer/details_type.rb deleted file mode 100644 index 8c6845a6fb3..00000000000 --- a/app/graphql/types/packages/composer/details_type.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -module Types - module Packages - module Composer - class DetailsType < Types::Packages::PackageType - graphql_name 'PackageComposerDetails' - description 'Details of a Composer package' - - authorize :read_package - - field :composer_metadatum, Types::Packages::Composer::MetadatumType, null: false, description: 'The Composer metadatum.' - end - end - end -end diff --git a/app/graphql/types/packages/composer/metadatum_type.rb b/app/graphql/types/packages/composer/metadatum_type.rb index a97818b1fb8..9d4ce3cebd4 100644 --- a/app/graphql/types/packages/composer/metadatum_type.rb +++ b/app/graphql/types/packages/composer/metadatum_type.rb @@ -4,8 +4,8 @@ module Types module Packages module Composer class MetadatumType < BaseObject - graphql_name 'PackageComposerMetadatumType' - description 'Composer metadatum' + graphql_name 'ComposerMetadata' + description 'Composer metadata' authorize :read_package diff --git a/app/graphql/types/packages/metadata_type.rb b/app/graphql/types/packages/metadata_type.rb new file mode 100644 index 00000000000..26c43b51a69 --- /dev/null +++ b/app/graphql/types/packages/metadata_type.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module Types + module Packages + class MetadataType < BaseUnion + graphql_name 'PackageMetadata' + description 'Represents metadata associated with a Package' + + possible_types ::Types::Packages::Composer::MetadatumType + + def self.resolve_type(object, context) + case object + when ::Packages::Composer::Metadatum + ::Types::Packages::Composer::MetadatumType + else + # NOTE: This method must be kept in sync with `PackageWithoutVersionsType#metadata`, + # which must never produce data that this discriminator cannot handle. + raise 'Unsupported metadata type' + end + end + end + end +end diff --git a/app/graphql/types/packages/package_type.rb b/app/graphql/types/packages/package_type.rb index b13d16e91c6..331898a1e84 100644 --- a/app/graphql/types/packages/package_type.rb +++ b/app/graphql/types/packages/package_type.rb @@ -2,26 +2,13 @@ module Types module Packages - class PackageType < BaseObject + class PackageType < PackageWithoutVersionsType graphql_name 'Package' description 'Represents a package in the Package Registry' - authorize :read_package - field :id, GraphQL::ID_TYPE, null: false, description: 'The ID of the package.' - field :name, GraphQL::STRING_TYPE, null: false, description: 'The name of the package.' - field :created_at, Types::TimeType, null: false, description: 'The created date.' - field :updated_at, Types::TimeType, null: false, description: 'The updated date.' - field :version, GraphQL::STRING_TYPE, null: true, description: 'The version of the package.' - field :package_type, Types::Packages::PackageTypeEnum, null: false, description: 'The type of the package.' - field :tags, Types::Packages::PackageTagType.connection_type, null: true, description: 'The package tags.' - field :project, Types::ProjectType, null: false, description: 'Project where the package is stored.' - field :pipelines, Types::Ci::PipelineType.connection_type, null: true, description: 'Pipelines that built the package.' - field :versions, Types::Packages::PackageType.connection_type, null: true, description: 'The other versions of the package.' - - def project - Gitlab::Graphql::Loaders::BatchModelLoader.new(Project, object.project_id).find - end + field :versions, ::Types::Packages::PackageWithoutVersionsType.connection_type, null: true, + description: 'The other versions of the package.' end end end diff --git a/app/graphql/types/packages/package_without_versions_type.rb b/app/graphql/types/packages/package_without_versions_type.rb new file mode 100644 index 00000000000..9c6bb37e6cc --- /dev/null +++ b/app/graphql/types/packages/package_without_versions_type.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true + +module Types + module Packages + class PackageWithoutVersionsType < ::Types::BaseObject + graphql_name 'PackageWithoutVersions' + description 'Represents a version of a package in the Package Registry' + + authorize :read_package + + field :id, ::Types::GlobalIDType[::Packages::Package], null: false, + description: 'ID of the package.' + + field :name, GraphQL::STRING_TYPE, null: false, description: 'Name of the package.' + field :created_at, Types::TimeType, null: false, description: 'Date of creation.' + field :updated_at, Types::TimeType, null: false, description: 'Date of most recent update.' + field :version, GraphQL::STRING_TYPE, null: true, description: 'Version string.' + field :package_type, Types::Packages::PackageTypeEnum, null: false, description: 'Package type.' + field :tags, Types::Packages::PackageTagType.connection_type, null: true, description: 'Package tags.' + field :project, Types::ProjectType, null: false, description: 'Project where the package is stored.' + field :pipelines, Types::Ci::PipelineType.connection_type, null: true, + description: 'Pipelines that built the package.' + field :metadata, Types::Packages::MetadataType, null: true, + description: 'Package metadata.' + + def project + Gitlab::Graphql::Loaders::BatchModelLoader.new(Project, object.project_id).find + end + + # NOTE: This method must be kept in sync with the union + # type: `Types::Packages::MetadataType`. + # + # `Types::Packages::MetadataType.resolve_type(metadata, ctx)` must never raise. + def metadata + case object.package_type + when 'composer' + object.composer_metadatum + else + nil + end + end + end + end +end diff --git a/app/graphql/types/project_type.rb b/app/graphql/types/project_type.rb index f66d8926a9f..20dbbe0987b 100644 --- a/app/graphql/types/project_type.rb +++ b/app/graphql/types/project_type.rb @@ -16,6 +16,10 @@ module Types field :path, GraphQL::STRING_TYPE, null: false, description: 'Path of the project' + field :sast_ci_configuration, Types::CiConfiguration::Sast::Type, null: true, + calls_gitaly: true, + description: 'SAST CI configuration for the project' + field :name_with_namespace, GraphQL::STRING_TYPE, null: false, description: 'Full name of the project with its namespace' field :name, GraphQL::STRING_TYPE, null: false, @@ -108,7 +112,7 @@ module Types field :suggestion_commit_message, GraphQL::STRING_TYPE, null: true, description: 'The commit message used to apply merge request suggestions' field :squash_read_only, GraphQL::BOOLEAN_TYPE, null: false, method: :squash_readonly?, - description: 'Indicates if squash readonly is enabled' + description: 'Indicates if `squashReadOnly` is enabled' field :namespace, Types::NamespaceType, null: true, description: 'Namespace of the project' @@ -175,7 +179,7 @@ module Types description: 'A single issue of the project', resolver: Resolvers::IssuesResolver.single - field :packages, Types::Packages::PackageType.connection_type, null: true, + field :packages, description: 'Packages of the project', resolver: Resolvers::PackagesResolver @@ -305,10 +309,16 @@ module Types description: 'Title of the label' end + field :terraform_state, + Types::Terraform::StateType, + null: true, + description: 'Find a single Terraform state by name.', + resolver: Resolvers::Terraform::StatesResolver.single + field :terraform_states, Types::Terraform::StateType.connection_type, null: true, - description: 'Terraform states associated with the project', + description: 'Terraform states associated with the project.', resolver: Resolvers::Terraform::StatesResolver field :pipeline_analytics, Types::Ci::AnalyticsType, null: true, @@ -359,6 +369,12 @@ module Types project.container_repositories.size end + def sast_ci_configuration + return unless Ability.allowed?(current_user, :download_code, object) + + ::Security::CiConfiguration::SastParserService.new(object).configuration + end + private def project diff --git a/app/graphql/types/query_type.rb b/app/graphql/types/query_type.rb index 0e0c060f374..69991b6413a 100644 --- a/app/graphql/types/query_type.rb +++ b/app/graphql/types/query_type.rb @@ -58,9 +58,8 @@ module Types argument :id, ::Types::GlobalIDType[::ContainerRepository], required: true, description: 'The global ID of the container repository' end - field :package_composer_details, Types::Packages::Composer::DetailsType, - null: true, - description: 'Find a composer package', + field :package, + description: 'Find a package', resolver: Resolvers::PackageDetailsResolver field :user, Types::UserType, diff --git a/app/graphql/types/snippets/blob_viewer_type.rb b/app/graphql/types/snippets/blob_viewer_type.rb index a2ffa144066..5827e3eeae9 100644 --- a/app/graphql/types/snippets/blob_viewer_type.rb +++ b/app/graphql/types/snippets/blob_viewer_type.rb @@ -11,7 +11,7 @@ module Types null: false field :load_async, GraphQL::BOOLEAN_TYPE, - description: 'Shows whether the blob content is loaded async', + description: 'Shows whether the blob content is loaded asynchronously', null: false field :collapsed, GraphQL::BOOLEAN_TYPE, diff --git a/app/graphql/types/todo_type.rb b/app/graphql/types/todo_type.rb index 3694980ef93..4cf2dbcab9e 100644 --- a/app/graphql/types/todo_type.rb +++ b/app/graphql/types/todo_type.rb @@ -3,49 +3,49 @@ module Types class TodoType < BaseObject graphql_name 'Todo' - description 'Representing a todo entry' + description 'Representing a to-do entry' present_using TodoPresenter authorize :read_todo field :id, GraphQL::ID_TYPE, - description: 'ID of the todo', + description: 'ID of the to-do item', null: false field :project, Types::ProjectType, - description: 'The project this todo is associated with', + description: 'The project this to-do item is associated with', null: true, authorize: :read_project field :group, Types::GroupType, - description: 'Group this todo is associated with', + description: 'Group this to-do item is associated with', null: true, authorize: :read_group field :author, Types::UserType, - description: 'The author of this todo', + description: 'The author of this to-do item', null: false field :action, Types::TodoActionEnum, - description: 'Action of the todo', + description: 'Action of the to-do item', null: false field :target_type, Types::TodoTargetEnum, - description: 'Target type of the todo', + description: 'Target type of the to-do item', null: false field :body, GraphQL::STRING_TYPE, - description: 'Body of the todo', + description: 'Body of the to-do item', null: false, calls_gitaly: true # TODO This is only true when `target_type` is `Commit`. See https://gitlab.com/gitlab-org/gitlab/issues/34757#note_234752665 field :state, Types::TodoStateEnum, - description: 'State of the todo', + description: 'State of the to-do item', null: false field :created_at, Types::TimeType, - description: 'Timestamp this todo was created', + description: 'Timestamp this to-do item was created', null: false def project diff --git a/app/graphql/types/tree/entry_type.rb b/app/graphql/types/tree/entry_type.rb index b40e38ec9d1..5e4cace2e98 100644 --- a/app/graphql/types/tree/entry_type.rb +++ b/app/graphql/types/tree/entry_type.rb @@ -7,7 +7,7 @@ module Types field :id, GraphQL::ID_TYPE, null: false, description: 'ID of the entry' field :sha, GraphQL::STRING_TYPE, null: false, - description: 'Last commit sha for the entry', method: :id + description: 'Last commit SHA for the entry', method: :id field :name, GraphQL::STRING_TYPE, null: false, description: 'Name of the entry' field :type, Tree::TypeEnum, null: false, diff --git a/app/graphql/types/user_type.rb b/app/graphql/types/user_type.rb index 93503268319..c179c84ba84 100644 --- a/app/graphql/types/user_type.rb +++ b/app/graphql/types/user_type.rb @@ -31,7 +31,7 @@ module Types description: 'Web path of the user' field :todos, Types::TodoType.connection_type, null: false, resolver: Resolvers::TodoResolver, - description: 'Todos of the user' + description: 'To-do items of the user' field :group_memberships, Types::GroupMemberType.connection_type, null: true, description: 'Group memberships of the user' field :group_count, GraphQL::INT_TYPE, null: true, |