Commit 4845812f authored by Doug Stull's avatar Doug Stull

Merge branch '336292-convert-old-graphql-types-to-newer-type-names-2' into 'master'

Convert old GraphQL types to newer type names (Part 2) [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!66462
parents 23e07ba1 82944129
......@@ -55,41 +55,6 @@ Graphql/OldTypes:
- 'app/graphql/mutations/design_management/base.rb'
- 'app/graphql/mutations/discussions/toggle_resolve.rb'
- 'app/graphql/mutations/environments/canary_ingress/update.rb'
- 'app/graphql/mutations/issues/base.rb'
- 'app/graphql/mutations/issues/common_mutation_arguments.rb'
- 'app/graphql/mutations/issues/create.rb'
- 'app/graphql/mutations/issues/move.rb'
- 'app/graphql/mutations/issues/set_confidential.rb'
- 'app/graphql/mutations/issues/set_locked.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/base.rb'
- 'app/graphql/mutations/merge_requests/create.rb'
- 'app/graphql/mutations/merge_requests/set_draft.rb'
- 'app/graphql/mutations/merge_requests/set_locked.rb'
- 'app/graphql/mutations/merge_requests/set_subscription.rb'
- 'app/graphql/mutations/merge_requests/set_wip.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/create/base.rb'
- 'app/graphql/mutations/notes/update/image_diff_note.rb'
- 'app/graphql/mutations/notes/update/note.rb'
- 'app/graphql/mutations/release_asset_links/create.rb'
- 'app/graphql/mutations/release_asset_links/update.rb'
- 'app/graphql/mutations/releases/base.rb'
- 'app/graphql/mutations/releases/create.rb'
- 'app/graphql/mutations/releases/delete.rb'
- 'app/graphql/mutations/releases/update.rb'
- 'app/graphql/mutations/security/ci_configuration/base_security_analyzer.rb'
- 'app/graphql/mutations/security/ci_configuration/configure_sast.rb'
- 'app/graphql/mutations/security/ci_configuration/configure_secret_detection.rb'
- 'app/graphql/mutations/snippets/create.rb'
- 'app/graphql/mutations/snippets/update.rb'
- 'app/graphql/mutations/user_callouts/create.rb'
- 'app/graphql/types/access_level_type.rb'
- 'app/graphql/types/admin/analytics/usage_trends/measurement_type.rb'
- 'app/graphql/types/admin/sidekiq_queues/delete_jobs_response_type.rb'
......
......@@ -5,11 +5,11 @@ module Mutations
class Base < BaseMutation
include Mutations::ResolvesIssuable
argument :project_path, GraphQL::ID_TYPE,
argument :project_path, GraphQL::Types::ID,
required: true,
description: "The project the issue to mutate is in."
argument :iid, GraphQL::STRING_TYPE,
argument :iid, GraphQL::Types::String,
required: true,
description: "The IID of the issue to mutate."
......
......@@ -6,7 +6,7 @@ module Mutations
extend ActiveSupport::Concern
included do
argument :description, GraphQL::STRING_TYPE,
argument :description, GraphQL::Types::String,
required: false,
description: copy_field_description(Types::IssueType, :description)
......@@ -14,11 +14,11 @@ module Mutations
required: false,
description: copy_field_description(Types::IssueType, :due_date)
argument :confidential, GraphQL::BOOLEAN_TYPE,
argument :confidential, GraphQL::Types::Boolean,
required: false,
description: copy_field_description(Types::IssueType, :confidential)
argument :locked, GraphQL::BOOLEAN_TYPE,
argument :locked, GraphQL::Types::Boolean,
as: :discussion_locked,
required: false,
description: copy_field_description(Types::IssueType, :discussion_locked)
......
......@@ -10,15 +10,15 @@ module Mutations
include CommonMutationArguments
argument :project_path, GraphQL::ID_TYPE,
argument :project_path, GraphQL::Types::ID,
required: true,
description: 'Project full path the issue is associated with.'
argument :iid, GraphQL::INT_TYPE,
argument :iid, GraphQL::Types::Int,
required: false,
description: 'The IID (internal ID) of a project issue. Only admins and project owners can modify.'
argument :title, GraphQL::STRING_TYPE,
argument :title, GraphQL::Types::String,
required: true,
description: copy_field_description(Types::IssueType, :title)
......@@ -26,7 +26,7 @@ module Mutations
required: false,
description: 'The ID of the milestone to assign to the issue. On update milestone will be removed if set to null.'
argument :labels, [GraphQL::STRING_TYPE],
argument :labels, [GraphQL::Types::String],
required: false,
description: copy_field_description(Types::IssueType, :labels)
......@@ -42,7 +42,7 @@ module Mutations
required: false,
description: 'The IID of a merge request for which to resolve discussions.'
argument :discussion_to_resolve, GraphQL::STRING_TYPE,
argument :discussion_to_resolve, GraphQL::Types::String,
required: false,
description: 'The ID of a discussion to resolve. Also pass `merge_request_to_resolve_discussions_of`.'
......
......@@ -6,7 +6,7 @@ module Mutations
graphql_name 'IssueMove'
argument :target_project_path,
GraphQL::ID_TYPE,
GraphQL::Types::ID,
required: true,
description: 'The project to move the issue to.'
......
......@@ -8,7 +8,7 @@ module Mutations
graphql_name 'IssueSetConfidential'
argument :confidential,
GraphQL::BOOLEAN_TYPE,
GraphQL::Types::Boolean,
required: true,
description: 'Whether or not to set the issue as a confidential.'
......
......@@ -6,7 +6,7 @@ module Mutations
graphql_name 'IssueSetLocked'
argument :locked,
GraphQL::BOOLEAN_TYPE,
GraphQL::Types::Boolean,
required: true,
description: 'Whether or not to lock discussion on the issue.'
......
......@@ -8,11 +8,11 @@ module Mutations
include ResolvesSubscription
include Mutations::ResolvesIssuable
argument :project_path, GraphQL::ID_TYPE,
argument :project_path, GraphQL::Types::ID,
required: true,
description: "The project the issue to mutate is in."
argument :iid, GraphQL::STRING_TYPE,
argument :iid, GraphQL::Types::String,
required: true,
description: "The IID of the issue to mutate."
......
......@@ -7,19 +7,19 @@ module Mutations
include CommonMutationArguments
argument :title, GraphQL::STRING_TYPE,
argument :title, GraphQL::Types::String,
required: false,
description: copy_field_description(Types::IssueType, :title)
argument :milestone_id, GraphQL::ID_TYPE, # rubocop: disable Graphql/IDType
argument :milestone_id, GraphQL::Types::ID, # rubocop: disable Graphql/IDType
required: false,
description: 'The ID of the milestone to assign to the issue. On update milestone will be removed if set to null.'
argument :add_label_ids, [GraphQL::ID_TYPE],
argument :add_label_ids, [GraphQL::Types::ID],
required: false,
description: 'The IDs of labels to be added to the issue.'
argument :remove_label_ids, [GraphQL::ID_TYPE],
argument :remove_label_ids, [GraphQL::Types::ID],
required: false,
description: 'The IDs of labels to be removed from the issue.'
......
......@@ -14,10 +14,10 @@ module Mutations
null: true,
description: 'Users returned from Jira, matched by email and name if possible.'
argument :project_path, GraphQL::ID_TYPE,
argument :project_path, GraphQL::Types::ID,
required: true,
description: 'The project to import the Jira users into.'
argument :start_at, GraphQL::INT_TYPE,
argument :start_at, GraphQL::Types::Int,
required: false,
description: 'The index of the record the import should started at, default 0 (50 records returned).'
......
......@@ -14,13 +14,13 @@ module Mutations
null: true,
description: 'The Jira import data after mutation.'
argument :project_path, GraphQL::ID_TYPE,
argument :project_path, GraphQL::Types::ID,
required: true,
description: 'The project to import the Jira project into.'
argument :jira_project_key, GraphQL::STRING_TYPE,
argument :jira_project_key, GraphQL::Types::String,
required: true,
description: 'Project key of the importer Jira project.'
argument :jira_project_name, GraphQL::STRING_TYPE,
argument :jira_project_name, GraphQL::Types::String,
required: false,
description: 'Project name of the importer Jira project.'
argument :users_mapping,
......
......@@ -12,15 +12,15 @@ module Mutations
null: true,
description: 'The label after mutation.'
argument :title, GraphQL::STRING_TYPE,
argument :title, GraphQL::Types::String,
required: true,
description: 'Title of the label.'
argument :description, GraphQL::STRING_TYPE,
argument :description, GraphQL::Types::String,
required: false,
description: 'Description of the label.'
argument :color, GraphQL::STRING_TYPE,
argument :color, GraphQL::Types::String,
required: false,
default_value: Label::DEFAULT_COLOR,
see: {
......
......@@ -23,20 +23,20 @@ module Mutations
as: :auto_merge_strategy,
description: 'How to merge this merge request.'
argument :commit_message, ::GraphQL::STRING_TYPE,
argument :commit_message, ::GraphQL::Types::String,
required: false,
description: 'Custom merge commit message.'
argument :squash_commit_message, ::GraphQL::STRING_TYPE,
argument :squash_commit_message, ::GraphQL::Types::String,
required: false,
description: 'Custom squash commit message (if squash is true).'
argument :sha, ::GraphQL::STRING_TYPE,
argument :sha, ::GraphQL::Types::String,
required: true,
description: 'The HEAD SHA at the time when this merge was requested.'
argument :should_remove_source_branch, ::GraphQL::BOOLEAN_TYPE,
argument :should_remove_source_branch, ::GraphQL::Types::Boolean,
required: false,
description: 'Should the source branch be removed.'
argument :squash, ::GraphQL::BOOLEAN_TYPE,
argument :squash, ::GraphQL::Types::Boolean,
required: false,
default_value: false,
description: 'Squash commits on the source branch before merge.'
......
......@@ -5,11 +5,11 @@ module Mutations
class Base < BaseMutation
include Mutations::ResolvesIssuable
argument :project_path, GraphQL::ID_TYPE,
argument :project_path, GraphQL::Types::ID,
required: true,
description: "The project the merge request to mutate is in."
argument :iid, GraphQL::STRING_TYPE,
argument :iid, GraphQL::Types::String,
required: true,
description: "The IID of the merge request to mutate."
......
......@@ -7,27 +7,27 @@ module Mutations
graphql_name 'MergeRequestCreate'
argument :project_path, GraphQL::ID_TYPE,
argument :project_path, GraphQL::Types::ID,
required: true,
description: 'Project full path the merge request is associated with.'
argument :title, GraphQL::STRING_TYPE,
argument :title, GraphQL::Types::String,
required: true,
description: copy_field_description(Types::MergeRequestType, :title)
argument :source_branch, GraphQL::STRING_TYPE,
argument :source_branch, GraphQL::Types::String,
required: true,
description: copy_field_description(Types::MergeRequestType, :source_branch)
argument :target_branch, GraphQL::STRING_TYPE,
argument :target_branch, GraphQL::Types::String,
required: true,
description: copy_field_description(Types::MergeRequestType, :target_branch)
argument :description, GraphQL::STRING_TYPE,
argument :description, GraphQL::Types::String,
required: false,
description: copy_field_description(Types::MergeRequestType, :description)
argument :labels, [GraphQL::STRING_TYPE],
argument :labels, [GraphQL::Types::String],
required: false,
description: copy_field_description(Types::MergeRequestType, :labels)
......
......@@ -6,7 +6,7 @@ module Mutations
graphql_name 'MergeRequestSetDraft'
argument :draft,
GraphQL::BOOLEAN_TYPE,
GraphQL::Types::Boolean,
required: true,
description: <<~DESC
Whether or not to set the merge request as a draft.
......
......@@ -6,7 +6,7 @@ module Mutations
graphql_name 'MergeRequestSetLocked'
argument :locked,
GraphQL::BOOLEAN_TYPE,
GraphQL::Types::Boolean,
required: true,
description: <<~DESC
Whether or not to lock the merge request.
......
......@@ -8,11 +8,11 @@ module Mutations
include ResolvesSubscription
include Mutations::ResolvesIssuable
argument :project_path, GraphQL::ID_TYPE,
argument :project_path, GraphQL::Types::ID,
required: true,
description: "The project the merge request to mutate is in."
argument :iid, GraphQL::STRING_TYPE,
argument :iid, GraphQL::Types::String,
required: true,
description: "The IID of the merge request to mutate."
......
......@@ -6,7 +6,7 @@ module Mutations
graphql_name 'MergeRequestSetWip'
argument :wip,
GraphQL::BOOLEAN_TYPE,
GraphQL::Types::Boolean,
required: true,
description: <<~DESC
Whether or not to set the merge request as a draft.
......
......@@ -7,15 +7,15 @@ module Mutations
description 'Update attributes of a merge request'
argument :title, GraphQL::STRING_TYPE,
argument :title, GraphQL::Types::String,
required: false,
description: copy_field_description(Types::MergeRequestType, :title)
argument :target_branch, GraphQL::STRING_TYPE,
argument :target_branch, GraphQL::Types::String,
required: false,
description: copy_field_description(Types::MergeRequestType, :target_branch)
argument :description, GraphQL::STRING_TYPE,
argument :description, GraphQL::Types::String,
required: false,
description: copy_field_description(Types::MergeRequestType, :description)
......
......@@ -36,12 +36,12 @@ module Mutations
description: 'Timestamp indicating ending moment to which the annotation relates.'
argument :dashboard_path,
GraphQL::STRING_TYPE,
GraphQL::Types::String,
required: true,
description: 'The path to a file defining the dashboard on which the annotation should be added.'
argument :description,
GraphQL::STRING_TYPE,
GraphQL::Types::String,
required: true,
description: 'The description of the annotation.'
......
......@@ -11,12 +11,12 @@ module Mutations
authorize :create_package_settings
argument :namespace_path,
GraphQL::ID_TYPE,
GraphQL::Types::ID,
required: true,
description: 'The namespace path where the namespace package setting is located.'
argument :maven_duplicates_allowed,
GraphQL::BOOLEAN_TYPE,
GraphQL::Types::Boolean,
required: false,
description: copy_field_description(Types::Namespace::PackageSettingsType, :maven_duplicates_allowed)
......@@ -26,7 +26,7 @@ module Mutations
description: copy_field_description(Types::Namespace::PackageSettingsType, :maven_duplicate_exception_regex)
argument :generic_duplicates_allowed,
GraphQL::BOOLEAN_TYPE,
GraphQL::Types::Boolean,
required: false,
description: copy_field_description(Types::Namespace::PackageSettingsType, :generic_duplicates_allowed)
......
......@@ -14,12 +14,12 @@ module Mutations
description: 'The global ID of the resource to add a note to.'
argument :body,
GraphQL::STRING_TYPE,
GraphQL::Types::String,
required: true,
description: copy_field_description(Types::Notes::NoteType, :body)
argument :confidential,
GraphQL::BOOLEAN_TYPE,
GraphQL::Types::Boolean,
required: false,
description: 'The confidentiality flag of a note. Default is false.'
......
......@@ -11,7 +11,7 @@ module Mutations
DESC
argument :body,
GraphQL::STRING_TYPE,
GraphQL::Types::String,
required: false,
description: copy_field_description(Types::Notes::NoteType, :body)
......
......@@ -8,12 +8,12 @@ module Mutations
description "Updates a Note.\n#{QUICK_ACTION_ONLY_WARNING}"
argument :body,
GraphQL::STRING_TYPE,
GraphQL::Types::String,
required: false,
description: copy_field_description(Types::Notes::NoteType, :body)
argument :confidential,
GraphQL::BOOLEAN_TYPE,
GraphQL::Types::Boolean,
required: false,
description: 'The confidentiality flag of a note. Default is false.'
......
......@@ -11,11 +11,11 @@ module Mutations
include Types::ReleaseAssetLinkSharedInputArguments
argument :project_path, GraphQL::ID_TYPE,
argument :project_path, GraphQL::Types::ID,
required: true,
description: 'Full path of the project the asset link is associated with.'
argument :tag_name, GraphQL::STRING_TYPE,
argument :tag_name, GraphQL::Types::String,
required: true, as: :tag,
description: "Name of the associated release's tag."
......
......@@ -13,15 +13,15 @@ module Mutations
required: true,
description: 'ID of the release asset link to update.'
argument :name, GraphQL::STRING_TYPE,
argument :name, GraphQL::Types::String,
required: false,
description: 'Name of the asset link.'
argument :url, GraphQL::STRING_TYPE,
argument :url, GraphQL::Types::String,
required: false,
description: 'URL of the asset link.'
argument :direct_asset_path, GraphQL::STRING_TYPE,
argument :direct_asset_path, GraphQL::Types::String,
required: false, as: :filepath,
description: 'Relative path for a direct asset link.'
......
......@@ -5,7 +5,7 @@ module Mutations
class Base < BaseMutation
include FindsProject
argument :project_path, GraphQL::ID_TYPE,
argument :project_path, GraphQL::Types::ID,
required: true,
description: 'Full path of the project the release is associated with.'
end
......
......@@ -10,19 +10,19 @@ module Mutations
null: true,
description: 'The release after mutation.'
argument :tag_name, GraphQL::STRING_TYPE,
argument :tag_name, GraphQL::Types::String,
required: true, as: :tag,
description: 'Name of the tag to associate with the release.'
argument :ref, GraphQL::STRING_TYPE,
argument :ref, GraphQL::Types::String,
required: false,
description: 'The commit SHA or branch name to use if creating a new tag.'
argument :name, GraphQL::STRING_TYPE,
argument :name, GraphQL::Types::String,
required: false,
description: 'Name of the release.'
argument :description, GraphQL::STRING_TYPE,
argument :description, GraphQL::Types::String,
required: false,
description: 'Description (also known as "release notes") of the release.'
......@@ -30,7 +30,7 @@ module Mutations
required: false,
description: 'The date when the release will be/was ready. Defaults to the current time.'
argument :milestones, [GraphQL::STRING_TYPE],
argument :milestones, [GraphQL::Types::String],
required: false,
description: 'The title of each milestone the release is associated with. GitLab Premium customers can specify group milestones.'
......
......@@ -10,7 +10,7 @@ module Mutations
null: true,
description: 'The deleted release.'
argument :tag_name, GraphQL::STRING_TYPE,
argument :tag_name, GraphQL::Types::String,
required: true, as: :tag,
description: 'Name of the tag associated with the release to delete.'
......
......@@ -10,15 +10,15 @@ module Mutations
null: true,
description: 'The release after mutation.'
argument :tag_name, GraphQL::STRING_TYPE,
argument :tag_name, GraphQL::Types::String,
required: true, as: :tag,
description: 'Name of the tag associated with the release.'
argument :name, GraphQL::STRING_TYPE,
argument :name, GraphQL::Types::String,
required: false,
description: 'Name of the release.'
argument :description, GraphQL::STRING_TYPE,
argument :description, GraphQL::Types::String,
required: false,
description: 'Description (release notes) of the release.'
......@@ -26,7 +26,7 @@ module Mutations
required: false,
description: 'The release date.'
argument :milestones, [GraphQL::STRING_TYPE],
argument :milestones, [GraphQL::Types::String],
required: false,
description: 'The title of each milestone the release is associated with. GitLab Premium customers can specify group milestones.'
......
......@@ -6,14 +6,14 @@ module Mutations
class BaseSecurityAnalyzer < BaseMutation
include FindsProject
argument :project_path, GraphQL::ID_TYPE,
argument :project_path, GraphQL::Types::ID,
required: true,
description: 'Full path of the project.'
field :success_path, GraphQL::STRING_TYPE, null: true,
field :success_path, GraphQL::Types::String, null: true,
description: 'Redirect path to use when the response is successful.'
field :branch, GraphQL::STRING_TYPE, null: true,
field :branch, GraphQL::Types::String, null: true,
description: 'Branch that has the new/modified `.gitlab-ci.yml` file.'
authorize :push_code
......
......@@ -16,11 +16,11 @@ module Mutations
null: true,
description: 'The snippet after mutation.'
argument :title, GraphQL::STRING_TYPE,
argument :title, GraphQL::Types::String,
required: true,
description: 'Title of the snippet.'
argument :description, GraphQL::STRING_TYPE,
argument :description, GraphQL::Types::String,
required: false,
description: 'Description of the snippet.'
......@@ -28,11 +28,11 @@ module Mutations
description: 'The visibility level of the snippet.',
required: true
argument :project_path, GraphQL::ID_TYPE,
argument :project_path, GraphQL::Types::ID,
required: false,
description: 'The project full path the snippet is associated with.'
argument :uploaded_files, [GraphQL::STRING_TYPE],
argument :uploaded_files, [GraphQL::Types::String],
required: false,
description: 'The paths to files uploaded in the snippet description.'
......
......@@ -13,11 +13,11 @@ module Mutations
required: true,
description: 'The global ID of the snippet to update.'
argument :title, GraphQL::STRING_TYPE,
argument :title, GraphQL::Types::String,
required: false,
description: 'Title of the snippet.'
argument :description, GraphQL::STRING_TYPE,
argument :description, GraphQL::Types::String,
required: false,
description: 'Description of the snippet.'
......
......@@ -6,7 +6,7 @@ module Mutations
graphql_name 'UserCalloutCreate'
argument :feature_name,
GraphQL::STRING_TYPE,
GraphQL::Types::String,
required: true,
description: "The feature name you want to dismiss the callout for."
......
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