Skip to content
代码片段 群组 项目
提交 633c935e 编辑于 作者: Brett Walker's avatar Brett Walker 提交者: Sean Arnold
浏览文件

Move graphql_name call to beginning of class

A change in graphql-ruby gem 1.13 changes how imput
names are calculate.  Having `graphql_name` called after
any arguments are defined can cause naming issues.
So just standardize on putting it at the top.
上级 0b624241
No related branches found
No related tags found
无相关合并请求
显示
39 个添加41 个删除
......@@ -4,10 +4,10 @@ module Mutations
module AlertManagement
module HttpIntegration
class Create < HttpIntegrationBase
include FindsProject
graphql_name 'HttpIntegrationCreate'
include FindsProject
argument :project_path, GraphQL::Types::ID,
required: true,
description: 'Project to create the integration in.'
......
......@@ -4,10 +4,10 @@ module Mutations
module AlertManagement
module PrometheusIntegration
class Create < PrometheusIntegrationBase
include FindsProject
graphql_name 'PrometheusIntegrationCreate'
include FindsProject
argument :project_path, GraphQL::Types::ID,
required: true,
description: 'Project to create the integration in.'
......
......@@ -3,10 +3,9 @@
module Mutations
module Boards
class Create < ::Mutations::BaseMutation
include Mutations::ResolvesResourceParent
graphql_name 'CreateBoard'
include Mutations::ResolvesResourceParent
include Mutations::Boards::CommonMutationArguments
field :board,
......
......@@ -3,10 +3,10 @@
module Mutations
module Branches
class Create < BaseMutation
include FindsProject
graphql_name 'CreateBranch'
include FindsProject
argument :project_path, GraphQL::Types::ID,
required: true,
description: 'Project full path the branch is associated with.'
......
......@@ -3,10 +3,10 @@
module Mutations
module Ci
class CiCdSettingsUpdate < BaseMutation
include FindsProject
graphql_name 'CiCdSettingsUpdate'
include FindsProject
authorize :admin_project
argument :full_path, GraphQL::Types::ID,
......
......@@ -4,10 +4,10 @@ module Mutations
module Ci
module JobTokenScope
class AddProject < BaseMutation
include FindsProject
graphql_name 'CiJobTokenScopeAddProject'
include FindsProject
authorize :admin_project
argument :project_path, GraphQL::Types::ID,
......
......@@ -4,10 +4,10 @@ module Mutations
module Ci
module JobTokenScope
class RemoveProject < BaseMutation
include FindsProject
graphql_name 'CiJobTokenScopeRemoveProject'
include FindsProject
authorize :admin_project
argument :project_path, GraphQL::Types::ID,
......
......@@ -4,12 +4,12 @@ module Mutations
module Clusters
module Agents
class Create < BaseMutation
graphql_name 'CreateClusterAgent'
include FindsProject
authorize :create_cluster
graphql_name 'CreateClusterAgent'
argument :project_path, GraphQL::Types::ID,
required: true,
description: 'Full path of the associated project for this cluster agent.'
......
......@@ -3,6 +3,8 @@
module Mutations
module Commits
class Create < BaseMutation
graphql_name 'CommitCreate'
include FindsProject
class UrlHelpers
......@@ -10,8 +12,6 @@ class UrlHelpers
include Gitlab::Routing
end
graphql_name 'CommitCreate'
argument :project_path, GraphQL::Types::ID,
required: true,
description: 'Project full path the branch is associated with.'
......
......@@ -3,10 +3,10 @@
module Mutations
module ContainerExpirationPolicies
class Update < Mutations::BaseMutation
include FindsProject
graphql_name 'UpdateContainerExpirationPolicy'
include FindsProject
authorize :destroy_container_image
argument :project_path,
......
......@@ -3,12 +3,11 @@
module Mutations
module ContainerRepositories
class DestroyTags < ::Mutations::ContainerRepositories::DestroyBase
LIMIT = 20
graphql_name 'DestroyContainerRepositoryTags'
LIMIT = 20
TOO_MANY_TAGS_ERROR_MESSAGE = "Number of tags is greater than #{LIMIT}"
graphql_name 'DestroyContainerRepositoryTags'
authorize :destroy_container_image
argument :id,
......
......@@ -3,10 +3,10 @@
module Mutations
module CustomEmoji
class Create < BaseMutation
include Mutations::ResolvesGroup
graphql_name 'CreateCustomEmoji'
include Mutations::ResolvesGroup
authorize :create_custom_emoji
field :custom_emoji,
......
......@@ -4,11 +4,11 @@ module Mutations
module CustomerRelations
module Contacts
class Create < BaseMutation
graphql_name 'CustomerRelationsContactCreate'
include ResolvesIds
include Gitlab::Graphql::Authorize::AuthorizeResource
graphql_name 'CustomerRelationsContactCreate'
field :contact,
Types::CustomerRelations::ContactType,
null: true,
......
......@@ -4,10 +4,10 @@ module Mutations
module CustomerRelations
module Contacts
class Update < Mutations::BaseMutation
include ResolvesIds
graphql_name 'CustomerRelationsContactUpdate'
include ResolvesIds
authorize :admin_crm_contact
field :contact,
......
......@@ -4,11 +4,11 @@ module Mutations
module CustomerRelations
module Organizations
class Create < BaseMutation
graphql_name 'CustomerRelationsOrganizationCreate'
include ResolvesIds
include Gitlab::Graphql::Authorize::AuthorizeResource
graphql_name 'CustomerRelationsOrganizationCreate'
field :organization,
Types::CustomerRelations::OrganizationType,
null: true,
......
......@@ -4,10 +4,10 @@ module Mutations
module CustomerRelations
module Organizations
class Update < Mutations::BaseMutation
include ResolvesIds
graphql_name 'CustomerRelationsOrganizationUpdate'
include ResolvesIds
authorize :admin_crm_organization
field :organization,
......
......@@ -4,10 +4,10 @@ module Mutations
module DependencyProxy
module GroupSettings
class Update < Mutations::BaseMutation
include Mutations::ResolvesGroup
graphql_name 'UpdateDependencyProxySettings'
include Mutations::ResolvesGroup
authorize :admin_dependency_proxy
argument :group_path,
......
......@@ -4,10 +4,10 @@ module Mutations
module DependencyProxy
module ImageTtlGroupPolicy
class Update < Mutations::BaseMutation
include Mutations::ResolvesGroup
graphql_name 'UpdateDependencyProxyImageTtlGroupPolicy'
include Mutations::ResolvesGroup
authorize :admin_dependency_proxy
argument :group_path,
......
......@@ -3,10 +3,10 @@
module Mutations
module DesignManagement
class Delete < Base
Errors = ::Gitlab::Graphql::Errors
graphql_name "DesignManagementDelete"
Errors = ::Gitlab::Graphql::Errors
argument :filenames, [GraphQL::Types::String],
required: true,
description: "Filenames of the designs to delete.",
......
......@@ -3,10 +3,10 @@
module Mutations
module Groups
class Update < Mutations::BaseMutation
include Mutations::ResolvesGroup
graphql_name 'GroupUpdate'
include Mutations::ResolvesGroup
authorize :admin_group
field :group, Types::GroupType,
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册