Commit 3e2a4ca5 authored by Luke Duncalfe's avatar Luke Duncalfe

Merge branch '337596-fix-rubocop-offenses-2' into 'master'

Fix Rubocop Graphql/Description offenses [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!67912
parents d1422c4b 7d512091
...@@ -23,39 +23,6 @@ Graphql/Descriptions: ...@@ -23,39 +23,6 @@ Graphql/Descriptions:
- 'ee/app/graphql/types/vulnerability_severity_enum.rb' - 'ee/app/graphql/types/vulnerability_severity_enum.rb'
- 'ee/app/graphql/types/vulnerability_state_enum.rb' - 'ee/app/graphql/types/vulnerability_state_enum.rb'
- 'ee/app/graphql/types/vulnerability_confidence_enum.rb' - 'ee/app/graphql/types/vulnerability_confidence_enum.rb'
- 'app/graphql/mutations/commits/create.rb'
- 'app/graphql/mutations/concerns/mutations/assignable.rb'
- 'app/graphql/mutations/concerns/mutations/can_mutate_spammable.rb'
- 'app/graphql/mutations/concerns/mutations/resolves_subscription.rb'
- 'app/graphql/mutations/container_expiration_policies/update.rb'
- 'app/graphql/mutations/container_repositories/destroy.rb'
- 'app/graphql/mutations/custom_emoji/create.rb'
- 'app/graphql/mutations/design_management/base.rb'
- 'app/graphql/mutations/design_management/delete.rb'
- 'app/graphql/mutations/design_management/move.rb'
- 'app/graphql/mutations/design_management/upload.rb'
- 'app/graphql/mutations/discussions/toggle_resolve.rb'
- 'app/graphql/mutations/environments/canary_ingress/update.rb'
- 'app/graphql/mutations/groups/update.rb'
- 'app/graphql/mutations/issues/base.rb'
- 'app/graphql/mutations/issues/create.rb'
- 'app/graphql/mutations/issues/move.rb'
- 'app/graphql/mutations/issues/set_due_date.rb'
- 'app/graphql/mutations/issues/set_subscription.rb'
- 'app/graphql/mutations/issues/update.rb'
- 'app/graphql/mutations/jira_import/import_users.rb'
- 'app/graphql/mutations/jira_import/start.rb'
- 'app/graphql/mutations/labels/create.rb'
- 'app/graphql/mutations/merge_requests/accept.rb'
- 'app/graphql/mutations/merge_requests/base.rb'
- 'app/graphql/mutations/merge_requests/create.rb'
- 'app/graphql/mutations/merge_requests/reviewer_rereview.rb'
- 'app/graphql/mutations/merge_requests/set_labels.rb'
- 'app/graphql/mutations/merge_requests/set_milestone.rb'
- 'app/graphql/mutations/merge_requests/set_subscription.rb'
- 'app/graphql/mutations/merge_requests/update.rb'
- 'app/graphql/mutations/metrics/dashboard/annotations/create.rb'
- 'app/graphql/mutations/namespace/package_settings/update.rb'
- 'app/graphql/mutations/notes/base.rb' - 'app/graphql/mutations/notes/base.rb'
- 'app/graphql/mutations/notes/create/base.rb' - 'app/graphql/mutations/notes/create/base.rb'
- 'app/graphql/mutations/notes/create/note.rb' - 'app/graphql/mutations/notes/create/note.rb'
......
...@@ -42,7 +42,7 @@ module Mutations ...@@ -42,7 +42,7 @@ module Mutations
field :commit, field :commit,
Types::CommitType, Types::CommitType,
null: true, null: true,
description: 'The commit after mutation.' description: 'Commit after mutation.'
field :content, field :content,
[GraphQL::Types::String], [GraphQL::Types::String],
......
...@@ -8,13 +8,13 @@ module Mutations ...@@ -8,13 +8,13 @@ module Mutations
argument :assignee_usernames, argument :assignee_usernames,
[GraphQL::Types::String], [GraphQL::Types::String],
required: true, required: true,
description: 'The usernames to assign to the resource. Replaces existing assignees by default.' description: 'Usernames to assign to the resource. Replaces existing assignees by default.'
argument :operation_mode, argument :operation_mode,
Types::MutationOperationModeEnum, Types::MutationOperationModeEnum,
required: false, required: false,
default_value: Types::MutationOperationModeEnum.default_mode, default_value: Types::MutationOperationModeEnum.default_mode,
description: 'The operation to perform. Defaults to REPLACE.' description: 'Operation to perform. Defaults to REPLACE.'
end end
def resolve(project_path:, iid:, assignee_usernames:, operation_mode:) def resolve(project_path:, iid:, assignee_usernames:, operation_mode:)
......
...@@ -16,12 +16,12 @@ module Mutations ...@@ -16,12 +16,12 @@ module Mutations
argument :captcha_response, GraphQL::Types::String, argument :captcha_response, GraphQL::Types::String,
required: false, required: false,
deprecated: DEPRECATION_NOTICE, deprecated: DEPRECATION_NOTICE,
description: 'A valid CAPTCHA response value obtained by using the provided captchaSiteKey with a CAPTCHA API to present a challenge to be solved on the client. Required to resubmit if the previous operation returned "NeedsCaptchaResponse: true".' description: 'Valid CAPTCHA response value obtained by using the provided captchaSiteKey with a CAPTCHA API to present a challenge to be solved on the client. Required to resubmit if the previous operation returned "NeedsCaptchaResponse: true".'
argument :spam_log_id, GraphQL::Types::Int, argument :spam_log_id, GraphQL::Types::Int,
required: false, required: false,
deprecated: DEPRECATION_NOTICE, deprecated: DEPRECATION_NOTICE,
description: 'The spam log ID which must be passed along with a valid CAPTCHA response for the operation to be completed. Required to resubmit if the previous operation returned "NeedsCaptchaResponse: true".' description: 'Spam log ID which must be passed along with a valid CAPTCHA response for the operation to be completed. Required to resubmit if the previous operation returned "NeedsCaptchaResponse: true".'
field :spam, field :spam,
GraphQL::Types::Boolean, GraphQL::Types::Boolean,
...@@ -39,13 +39,13 @@ module Mutations ...@@ -39,13 +39,13 @@ module Mutations
GraphQL::Types::Int, GraphQL::Types::Int,
null: true, null: true,
deprecated: DEPRECATION_NOTICE, deprecated: DEPRECATION_NOTICE,
description: 'The spam log ID which must be passed along with a valid CAPTCHA response for an operation to be completed. Included only when an operation was not completed because "NeedsCaptchaResponse" is true.' description: 'Spam log ID which must be passed along with a valid CAPTCHA response for an operation to be completed. Included only when an operation was not completed because "NeedsCaptchaResponse" is true.'
field :captcha_site_key, field :captcha_site_key,
GraphQL::Types::String, GraphQL::Types::String,
null: true, null: true,
deprecated: DEPRECATION_NOTICE, deprecated: DEPRECATION_NOTICE,
description: 'The CAPTCHA site key which must be used to render a challenge for the user to solve to obtain a valid captchaResponse value. Included only when an operation was not completed because "NeedsCaptchaResponse" is true.' description: 'CAPTCHA site key which must be used to render a challenge for the user to solve to obtain a valid captchaResponse value. Included only when an operation was not completed because "NeedsCaptchaResponse" is true.'
end end
end end
end end
...@@ -8,7 +8,7 @@ module Mutations ...@@ -8,7 +8,7 @@ module Mutations
argument :subscribed_state, argument :subscribed_state,
GraphQL::Types::Boolean, GraphQL::Types::Boolean,
required: true, required: true,
description: 'The desired state of the subscription.' description: 'Desired state of the subscription.'
end end
def resolve(project_path:, iid:, subscribed_state:) def resolve(project_path:, iid:, subscribed_state:)
......
...@@ -12,7 +12,7 @@ module Mutations ...@@ -12,7 +12,7 @@ module Mutations
argument :project_path, argument :project_path,
GraphQL::Types::ID, GraphQL::Types::ID,
required: true, required: true,
description: 'The project path where the container expiration policy is located.' description: 'Project path where the container expiration policy is located.'
argument :enabled, argument :enabled,
GraphQL::Types::Boolean, GraphQL::Types::Boolean,
...@@ -47,7 +47,7 @@ module Mutations ...@@ -47,7 +47,7 @@ module Mutations
field :container_expiration_policy, field :container_expiration_policy,
Types::ContainerExpirationPolicyType, Types::ContainerExpirationPolicyType,
null: true, null: true,
description: 'The container expiration policy after mutation.' description: 'Container expiration policy after mutation.'
def resolve(project_path:, **args) def resolve(project_path:, **args)
project = authorized_find!(project_path) project = authorized_find!(project_path)
......
...@@ -15,7 +15,7 @@ module Mutations ...@@ -15,7 +15,7 @@ module Mutations
field :container_repository, field :container_repository,
Types::ContainerRepositoryType, Types::ContainerRepositoryType,
null: false, null: false,
description: 'The container repository policy after scheduling the deletion.' description: 'Container repository policy after scheduling the deletion.'
def resolve(id:) def resolve(id:)
container_repository = authorized_find!(id: id) container_repository = authorized_find!(id: id)
......
...@@ -12,7 +12,7 @@ module Mutations ...@@ -12,7 +12,7 @@ module Mutations
field :custom_emoji, field :custom_emoji,
Types::CustomEmojiType, Types::CustomEmojiType,
null: true, null: true,
description: 'The new custom emoji.' description: 'New custom emoji.'
argument :group_path, GraphQL::Types::ID, argument :group_path, GraphQL::Types::ID,
required: true, required: true,
......
...@@ -7,11 +7,11 @@ module Mutations ...@@ -7,11 +7,11 @@ module Mutations
argument :project_path, GraphQL::Types::ID, argument :project_path, GraphQL::Types::ID,
required: true, required: true,
description: "The project where the issue is to upload designs for." description: "Project where the issue is to upload designs for."
argument :iid, GraphQL::Types::ID, argument :iid, GraphQL::Types::ID,
required: true, required: true,
description: "The IID of the issue to modify designs for." description: "IID of the issue to modify designs for."
private private
......
...@@ -9,14 +9,14 @@ module Mutations ...@@ -9,14 +9,14 @@ module Mutations
argument :filenames, [GraphQL::Types::String], argument :filenames, [GraphQL::Types::String],
required: true, required: true,
description: "The filenames of the designs to delete.", description: "Filenames of the designs to delete.",
prepare: ->(names, _ctx) do prepare: ->(names, _ctx) do
names.presence || (raise Errors::ArgumentError, 'no filenames') names.presence || (raise Errors::ArgumentError, 'no filenames')
end end
field :version, Types::DesignManagement::VersionType, field :version, Types::DesignManagement::VersionType,
null: true, # null on error null: true, # null on error
description: 'The new version in which the designs are deleted.' description: 'New version in which the designs are deleted.'
authorize :destroy_design authorize :destroy_design
......
...@@ -18,7 +18,7 @@ module Mutations ...@@ -18,7 +18,7 @@ module Mutations
field :design_collection, Types::DesignManagement::DesignCollectionType, field :design_collection, Types::DesignManagement::DesignCollectionType,
null: true, null: true,
description: "The current state of the collection." description: "Current state of the collection."
def resolve(**args) def resolve(**args)
service = ::DesignManagement::MoveDesignsService.new(current_user, parameters(**args)) service = ::DesignManagement::MoveDesignsService.new(current_user, parameters(**args))
......
...@@ -7,13 +7,13 @@ module Mutations ...@@ -7,13 +7,13 @@ module Mutations
argument :files, [ApolloUploadServer::Upload], argument :files, [ApolloUploadServer::Upload],
required: true, required: true,
description: "The files to upload." description: "Files to upload."
authorize :create_design authorize :create_design
field :designs, [Types::DesignManagement::DesignType], field :designs, [Types::DesignManagement::DesignType],
null: false, null: false,
description: "The designs that were uploaded by the mutation." description: "Designs that were uploaded by the mutation."
field :skipped_designs, [Types::DesignManagement::DesignType], field :skipped_designs, [Types::DesignManagement::DesignType],
null: false, null: false,
......
...@@ -10,7 +10,7 @@ module Mutations ...@@ -10,7 +10,7 @@ module Mutations
argument :id, argument :id,
Types::GlobalIDType[Discussion], Types::GlobalIDType[Discussion],
required: true, required: true,
description: 'The global ID of the discussion.' description: 'Global ID of the discussion.'
argument :resolve, argument :resolve,
GraphQL::Types::Boolean, GraphQL::Types::Boolean,
...@@ -20,7 +20,7 @@ module Mutations ...@@ -20,7 +20,7 @@ module Mutations
field :discussion, field :discussion,
Types::Notes::DiscussionType, Types::Notes::DiscussionType,
null: true, null: true,
description: 'The discussion after mutation.' description: 'Discussion after mutation.'
def resolve(id:, resolve:) def resolve(id:, resolve:)
discussion = authorized_find_discussion!(id: id) discussion = authorized_find_discussion!(id: id)
......
...@@ -11,12 +11,12 @@ module Mutations ...@@ -11,12 +11,12 @@ module Mutations
argument :id, argument :id,
::Types::GlobalIDType[::Environment], ::Types::GlobalIDType[::Environment],
required: true, required: true,
description: 'The global ID of the environment to update.' description: 'Global ID of the environment to update.'
argument :weight, argument :weight,
GraphQL::Types::Int, GraphQL::Types::Int,
required: true, required: true,
description: 'The weight of the Canary Ingress.' description: 'Weight of the Canary Ingress.'
def resolve(id:, **kwargs) def resolve(id:, **kwargs)
environment = authorized_find!(id: id) environment = authorized_find!(id: id)
......
...@@ -11,7 +11,7 @@ module Mutations ...@@ -11,7 +11,7 @@ module Mutations
field :group, Types::GroupType, field :group, Types::GroupType,
null: true, null: true,
description: 'The group after update.' description: 'Group after update.'
argument :full_path, GraphQL::Types::ID, argument :full_path, GraphQL::Types::ID,
required: true, required: true,
......
...@@ -7,16 +7,16 @@ module Mutations ...@@ -7,16 +7,16 @@ module Mutations
argument :project_path, GraphQL::Types::ID, argument :project_path, GraphQL::Types::ID,
required: true, required: true,
description: "The project the issue to mutate is in." description: "Project the issue to mutate is in."
argument :iid, GraphQL::Types::String, argument :iid, GraphQL::Types::String,
required: true, required: true,
description: "The IID of the issue to mutate." description: "IID of the issue to mutate."
field :issue, field :issue,
Types::IssueType, Types::IssueType,
null: true, null: true,
description: "The issue after mutation." description: "Issue after mutation."
authorize :update_issue authorize :update_issue
......
...@@ -16,7 +16,7 @@ module Mutations ...@@ -16,7 +16,7 @@ module Mutations
argument :iid, GraphQL::Types::Int, argument :iid, GraphQL::Types::Int,
required: false, required: false,
description: 'The IID (internal ID) of a project issue. Only admins and project owners can modify.' description: 'IID (internal ID) of a project issue. Only admins and project owners can modify.'
argument :title, GraphQL::Types::String, argument :title, GraphQL::Types::String,
required: true, required: true,
...@@ -24,7 +24,7 @@ module Mutations ...@@ -24,7 +24,7 @@ module Mutations
argument :milestone_id, ::Types::GlobalIDType[::Milestone], argument :milestone_id, ::Types::GlobalIDType[::Milestone],
required: false, required: false,
description: 'The ID of the milestone to assign to the issue. On update milestone will be removed if set to null.' description: 'ID of the milestone to assign to the issue. On update milestone will be removed if set to null.'
argument :labels, [GraphQL::Types::String], argument :labels, [GraphQL::Types::String],
required: false, required: false,
...@@ -32,7 +32,7 @@ module Mutations ...@@ -32,7 +32,7 @@ module Mutations
argument :label_ids, [::Types::GlobalIDType[::Label]], argument :label_ids, [::Types::GlobalIDType[::Label]],
required: false, required: false,
description: 'The IDs of labels to be added to the issue.' description: 'IDs of labels to be added to the issue.'
argument :created_at, Types::TimeType, argument :created_at, Types::TimeType,
required: false, required: false,
...@@ -40,20 +40,20 @@ module Mutations ...@@ -40,20 +40,20 @@ module Mutations
argument :merge_request_to_resolve_discussions_of, ::Types::GlobalIDType[::MergeRequest], argument :merge_request_to_resolve_discussions_of, ::Types::GlobalIDType[::MergeRequest],
required: false, required: false,
description: 'The IID of a merge request for which to resolve discussions.' description: 'IID of a merge request for which to resolve discussions.'
argument :discussion_to_resolve, GraphQL::Types::String, argument :discussion_to_resolve, GraphQL::Types::String,
required: false, required: false,
description: 'The ID of a discussion to resolve. Also pass `merge_request_to_resolve_discussions_of`.' description: 'ID of a discussion to resolve. Also pass `merge_request_to_resolve_discussions_of`.'
argument :assignee_ids, [::Types::GlobalIDType[::User]], argument :assignee_ids, [::Types::GlobalIDType[::User]],
required: false, required: false,
description: 'The array of user IDs to assign to the issue.' description: 'Array of user IDs to assign to the issue.'
field :issue, field :issue,
Types::IssueType, Types::IssueType,
null: true, null: true,
description: 'The issue after mutation.' description: 'Issue after mutation.'
def ready?(**args) def ready?(**args)
if args.slice(*mutually_exclusive_label_args).size > 1 if args.slice(*mutually_exclusive_label_args).size > 1
......
...@@ -8,7 +8,7 @@ module Mutations ...@@ -8,7 +8,7 @@ module Mutations
argument :target_project_path, argument :target_project_path,
GraphQL::Types::ID, GraphQL::Types::ID,
required: true, required: true,
description: 'The project to move the issue to.' description: 'Project to move the issue to.'
def resolve(project_path:, iid:, target_project_path:) def resolve(project_path:, iid:, target_project_path:)
Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab/-/issues/20816') Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab/-/issues/20816')
......
...@@ -8,7 +8,7 @@ module Mutations ...@@ -8,7 +8,7 @@ module Mutations
argument :due_date, argument :due_date,
Types::TimeType, Types::TimeType,
required: :nullable, required: :nullable,
description: 'The desired due date for the issue. Due date is removed if null.' description: 'Desired due date for the issue. Due date is removed if null.'
def resolve(project_path:, iid:, due_date:) def resolve(project_path:, iid:, due_date:)
issue = authorized_find!(project_path: project_path, iid: iid) issue = authorized_find!(project_path: project_path, iid: iid)
......
...@@ -10,16 +10,16 @@ module Mutations ...@@ -10,16 +10,16 @@ module Mutations
argument :project_path, GraphQL::Types::ID, argument :project_path, GraphQL::Types::ID,
required: true, required: true,
description: "The project the issue to mutate is in." description: "Project the issue to mutate is in."
argument :iid, GraphQL::Types::String, argument :iid, GraphQL::Types::String,
required: true, required: true,
description: "The IID of the issue to mutate." description: "IID of the issue to mutate."
field :issue, field :issue,
Types::IssueType, Types::IssueType,
null: true, null: true,
description: "The issue after mutation." description: "Issue after mutation."
authorize :update_subscription authorize :update_subscription
......
...@@ -13,19 +13,19 @@ module Mutations ...@@ -13,19 +13,19 @@ module Mutations
argument :milestone_id, GraphQL::Types::ID, # rubocop: disable Graphql/IDType argument :milestone_id, GraphQL::Types::ID, # rubocop: disable Graphql/IDType
required: false, required: false,
description: 'The ID of the milestone to assign to the issue. On update milestone will be removed if set to null.' description: 'ID of the milestone to assign to the issue. On update milestone will be removed if set to null.'
argument :add_label_ids, [GraphQL::Types::ID], argument :add_label_ids, [GraphQL::Types::ID],
required: false, required: false,
description: 'The IDs of labels to be added to the issue.' description: 'IDs of labels to be added to the issue.'
argument :remove_label_ids, [GraphQL::Types::ID], argument :remove_label_ids, [GraphQL::Types::ID],
required: false, required: false,
description: 'The IDs of labels to be removed from the issue.' description: 'IDs of labels to be removed from the issue.'
argument :label_ids, [GraphQL::Types::ID], argument :label_ids, [GraphQL::Types::ID],
required: false, required: false,
description: 'The IDs of labels to be set. Replaces existing issue labels.' description: 'IDs of labels to be set. Replaces existing issue labels.'
argument :state_event, Types::IssueStateEventEnum, argument :state_event, Types::IssueStateEventEnum,
description: 'Close or reopen an issue.', description: 'Close or reopen an issue.',
......
...@@ -16,10 +16,10 @@ module Mutations ...@@ -16,10 +16,10 @@ module Mutations
argument :project_path, GraphQL::Types::ID, argument :project_path, GraphQL::Types::ID,
required: true, required: true,
description: 'The project to import the Jira users into.' description: 'Project to import the Jira users into.'
argument :start_at, GraphQL::Types::Int, argument :start_at, GraphQL::Types::Int,
required: false, required: false,
description: 'The index of the record the import should started at, default 0 (50 records returned).' description: 'Index of the record the import should started at, default 0 (50 records returned).'
def resolve(project_path:, start_at: 0) def resolve(project_path:, start_at: 0)
project = authorized_find!(project_path) project = authorized_find!(project_path)
......
...@@ -12,11 +12,11 @@ module Mutations ...@@ -12,11 +12,11 @@ module Mutations
field :jira_import, field :jira_import,
Types::JiraImportType, Types::JiraImportType,
null: true, null: true,
description: 'The Jira import data after mutation.' description: 'Jira import data after mutation.'
argument :project_path, GraphQL::Types::ID, argument :project_path, GraphQL::Types::ID,
required: true, required: true,
description: 'The project to import the Jira project into.' description: 'Project to import the Jira project into.'
argument :jira_project_key, GraphQL::Types::String, argument :jira_project_key, GraphQL::Types::String,
required: true, required: true,
description: 'Project key of the importer Jira project.' description: 'Project key of the importer Jira project.'
...@@ -26,7 +26,7 @@ module Mutations ...@@ -26,7 +26,7 @@ module Mutations
argument :users_mapping, argument :users_mapping,
[Types::JiraUsersMappingInputType], [Types::JiraUsersMappingInputType],
required: false, required: false,
description: 'The mapping of Jira to GitLab users.' description: 'Mapping of Jira to GitLab users.'
def resolve(project_path:, jira_project_key:, users_mapping:) def resolve(project_path:, jira_project_key:, users_mapping:)
project = authorized_find!(project_path) project = authorized_find!(project_path)
......
...@@ -10,7 +10,7 @@ module Mutations ...@@ -10,7 +10,7 @@ module Mutations
field :label, field :label,
Types::LabelType, Types::LabelType,
null: true, null: true,
description: 'The label after mutation.' description: 'Label after mutation.'
argument :title, GraphQL::Types::String, argument :title, GraphQL::Types::String,
required: true, required: true,
......
...@@ -31,7 +31,7 @@ module Mutations ...@@ -31,7 +31,7 @@ module Mutations
description: 'Custom squash commit message (if squash is true).' description: 'Custom squash commit message (if squash is true).'
argument :sha, ::GraphQL::Types::String, argument :sha, ::GraphQL::Types::String,
required: true, required: true,
description: 'The HEAD SHA at the time when this merge was requested.' description: 'HEAD SHA at the time when this merge was requested.'
argument :should_remove_source_branch, ::GraphQL::Types::Boolean, argument :should_remove_source_branch, ::GraphQL::Types::Boolean,
required: false, required: false,
......
...@@ -7,16 +7,16 @@ module Mutations ...@@ -7,16 +7,16 @@ module Mutations
argument :project_path, GraphQL::Types::ID, argument :project_path, GraphQL::Types::ID,
required: true, required: true,
description: "The project the merge request to mutate is in." description: "Project the merge request to mutate is in."
argument :iid, GraphQL::Types::String, argument :iid, GraphQL::Types::String,
required: true, required: true,
description: "The IID of the merge request to mutate." description: "IID of the merge request to mutate."
field :merge_request, field :merge_request,
Types::MergeRequestType, Types::MergeRequestType,
null: true, null: true,
description: "The merge request after mutation." description: "Merge request after mutation."
authorize :update_merge_request authorize :update_merge_request
......
...@@ -34,7 +34,7 @@ module Mutations ...@@ -34,7 +34,7 @@ module Mutations
field :merge_request, field :merge_request,
Types::MergeRequestType, Types::MergeRequestType,
null: true, null: true,
description: 'The merge request after mutation.' description: 'Merge request after mutation.'
authorize :create_merge_request_from authorize :create_merge_request_from
......
...@@ -9,7 +9,7 @@ module Mutations ...@@ -9,7 +9,7 @@ module Mutations
loads: Types::UserType, loads: Types::UserType,
required: true, required: true,
description: <<~DESC description: <<~DESC
The user ID for the user that has been requested for a new review. User ID for the user that has been requested for a new review.
DESC DESC
def resolve(project_path:, iid:, user:) def resolve(project_path:, iid:, user:)
......
...@@ -9,7 +9,7 @@ module Mutations ...@@ -9,7 +9,7 @@ module Mutations
[::Types::GlobalIDType[Label]], [::Types::GlobalIDType[Label]],
required: true, required: true,
description: <<~DESC description: <<~DESC
The Label IDs to set. Replaces existing labels by default. Label IDs to set. Replaces existing labels by default.
DESC DESC
argument :operation_mode, argument :operation_mode,
......
...@@ -10,7 +10,7 @@ module Mutations ...@@ -10,7 +10,7 @@ module Mutations
required: false, required: false,
loads: Types::MilestoneType, loads: Types::MilestoneType,
description: <<~DESC description: <<~DESC
The milestone to assign to the merge request. Milestone to assign to the merge request.
DESC DESC
def resolve(project_path:, iid:, milestone: nil) def resolve(project_path:, iid:, milestone: nil)
......
...@@ -10,16 +10,16 @@ module Mutations ...@@ -10,16 +10,16 @@ module Mutations
argument :project_path, GraphQL::Types::ID, argument :project_path, GraphQL::Types::ID,
required: true, required: true,
description: "The project the merge request to mutate is in." description: "Project the merge request to mutate is in."
argument :iid, GraphQL::Types::String, argument :iid, GraphQL::Types::String,
required: true, required: true,
description: "The IID of the merge request to mutate." description: "IID of the merge request to mutate."
field :merge_request, field :merge_request,
Types::MergeRequestType, Types::MergeRequestType,
null: true, null: true,
description: "The merge request after mutation." description: "Merge request after mutation."
authorize :update_subscription authorize :update_subscription
......
...@@ -22,7 +22,7 @@ module Mutations ...@@ -22,7 +22,7 @@ module Mutations
argument :state, ::Types::MergeRequestStateEventEnum, argument :state, ::Types::MergeRequestStateEventEnum,
required: false, required: false,
as: :state_event, as: :state_event,
description: 'The action to perform to change the state.' description: 'Action to perform to change the state.'
def resolve(project_path:, iid:, **args) def resolve(project_path:, iid:, **args)
merge_request = authorized_find!(project_path: project_path, iid: iid) merge_request = authorized_find!(project_path: project_path, iid: iid)
......
...@@ -15,17 +15,17 @@ module Mutations ...@@ -15,17 +15,17 @@ module Mutations
field :annotation, field :annotation,
Types::Metrics::Dashboards::AnnotationType, Types::Metrics::Dashboards::AnnotationType,
null: true, null: true,
description: 'The created annotation.' description: 'Created annotation.'
argument :environment_id, argument :environment_id,
::Types::GlobalIDType[::Environment], ::Types::GlobalIDType[::Environment],
required: false, required: false,
description: 'The global ID of the environment to add an annotation to.' description: 'Global ID of the environment to add an annotation to.'
argument :cluster_id, argument :cluster_id,
::Types::GlobalIDType[::Clusters::Cluster], ::Types::GlobalIDType[::Clusters::Cluster],
required: false, required: false,
description: 'The global ID of the cluster to add an annotation to.' description: 'Global ID of the cluster to add an annotation to.'
argument :starting_at, Types::TimeType, argument :starting_at, Types::TimeType,
required: true, required: true,
...@@ -38,12 +38,12 @@ module Mutations ...@@ -38,12 +38,12 @@ module Mutations
argument :dashboard_path, argument :dashboard_path,
GraphQL::Types::String, GraphQL::Types::String,
required: true, required: true,
description: 'The path to a file defining the dashboard on which the annotation should be added.' description: 'Path to a file defining the dashboard on which the annotation should be added.'
argument :description, argument :description,
GraphQL::Types::String, GraphQL::Types::String,
required: true, required: true,
description: 'The description of the annotation.' description: 'Description of the annotation.'
AnnotationSource = Struct.new(:object, keyword_init: true) do AnnotationSource = Struct.new(:object, keyword_init: true) do
def type_keys def type_keys
......
...@@ -13,7 +13,7 @@ module Mutations ...@@ -13,7 +13,7 @@ module Mutations
argument :namespace_path, argument :namespace_path,
GraphQL::Types::ID, GraphQL::Types::ID,
required: true, required: true,
description: 'The namespace path where the namespace package setting is located.' description: 'Namespace path where the namespace package setting is located.'
argument :maven_duplicates_allowed, argument :maven_duplicates_allowed,
GraphQL::Types::Boolean, GraphQL::Types::Boolean,
...@@ -38,7 +38,7 @@ module Mutations ...@@ -38,7 +38,7 @@ module Mutations
field :package_settings, field :package_settings,
Types::Namespace::PackageSettingsType, Types::Namespace::PackageSettingsType,
null: true, null: true,
description: 'The namespace package setting after mutation.' description: 'Namespace package setting after mutation.'
def resolve(namespace_path:, **args) def resolve(namespace_path:, **args)
namespace = authorized_find!(namespace_path: namespace_path) namespace = authorized_find!(namespace_path: namespace_path)
......
This diff is collapsed.
...@@ -13,7 +13,7 @@ module EE ...@@ -13,7 +13,7 @@ module EE
prepended do prepended do
argument :epic_id, EpicID, argument :epic_id, EpicID,
required: false, required: false,
description: 'The ID of the parent epic. NULL when removing the association.' description: 'ID of the parent epic. NULL when removing the association.'
end end
override :move_issue override :move_issue
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment