Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-07-23 21:10:06 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-23 21:10:06 +0300
commit4a6e6c740b131b6291d553fcdab5a0612f8c099b (patch)
treec9b31140b4161e25f5395447272187e344ea9ca1 /rubocop
parent228eb2ee910e2fb7f9bedf713c43a30c55cf3314 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'rubocop')
-rw-r--r--rubocop/cop/graphql/descriptions.rb10
-rw-r--r--rubocop/cop/graphql/id_type.rb4
-rw-r--r--rubocop/cop/graphql/json_type.rb2
-rw-r--r--rubocop/cop/graphql/resolver_type.rb4
4 files changed, 10 insertions, 10 deletions
diff --git a/rubocop/cop/graphql/descriptions.rb b/rubocop/cop/graphql/descriptions.rb
index 520e34dcd16..a93ebf20e1b 100644
--- a/rubocop/cop/graphql/descriptions.rb
+++ b/rubocop/cop/graphql/descriptions.rb
@@ -7,16 +7,16 @@
#
# # bad
# class AwfulType
-# field :some_field, GraphQL::STRING_TYPE
+# field :some_field, GraphQL::Types::String
# end
#
# class TerribleType
-# argument :some_argument, GraphQL::STRING_TYPE
+# argument :some_argument, GraphQL::Types::String
# end
#
# class UngoodType
# field :some_argument,
-# GraphQL::STRING_TYPE,
+# GraphQL::Types::String,
# description: "A description that does not end in a period"
# end
#
@@ -27,11 +27,11 @@
# # good
# class GreatType
# argument :some_field,
-# GraphQL::STRING_TYPE,
+# GraphQL::Types::String,
# description: "Well described - a superb description."
#
# field :some_field,
-# GraphQL::STRING_TYPE,
+# GraphQL::Types::String,
# description: "A thorough and compelling description."
# end
#
diff --git a/rubocop/cop/graphql/id_type.rb b/rubocop/cop/graphql/id_type.rb
index 0d2fb6ad852..ba973242efa 100644
--- a/rubocop/cop/graphql/id_type.rb
+++ b/rubocop/cop/graphql/id_type.rb
@@ -4,12 +4,12 @@ module RuboCop
module Cop
module Graphql
class IDType < RuboCop::Cop::Cop
- MSG = 'Do not use GraphQL::ID_TYPE, use a specific GlobalIDType instead'
+ MSG = 'Do not use GraphQL::Types::ID, use a specific GlobalIDType instead'
WHITELISTED_ARGUMENTS = %i[iid full_path project_path group_path target_project_path namespace_path].freeze
def_node_search :graphql_id_type?, <<~PATTERN
- (send nil? :argument (_ #does_not_match?) (const (const nil? :GraphQL) :ID_TYPE) ...)
+ (send nil? :argument (_ #does_not_match?) (const (const (const nil? :GraphQL) :Types) :ID) ...)
PATTERN
def on_send(node)
diff --git a/rubocop/cop/graphql/json_type.rb b/rubocop/cop/graphql/json_type.rb
index a8c38358535..8518a771cbd 100644
--- a/rubocop/cop/graphql/json_type.rb
+++ b/rubocop/cop/graphql/json_type.rb
@@ -12,7 +12,7 @@
#
# # good
# class GreatClass
-# field :some_field, GraphQL::STRING_TYPE
+# field :some_field, GraphQL::Types::String
# end
module RuboCop
diff --git a/rubocop/cop/graphql/resolver_type.rb b/rubocop/cop/graphql/resolver_type.rb
index 1209c5dbc6b..e9fa768fd3e 100644
--- a/rubocop/cop/graphql/resolver_type.rb
+++ b/rubocop/cop/graphql/resolver_type.rb
@@ -7,7 +7,7 @@
# # bad
# module Resolvers
# class NoTypeResolver < BaseResolver
-# field :some_field, GraphQL::STRING_TYPE
+# field :some_field, GraphQL::Types::String
# end
# end
#
@@ -16,7 +16,7 @@
# class WithTypeResolver < BaseResolver
# type MyType, null: true
#
-# field :some_field, GraphQL::STRING_TYPE
+# field :some_field, GraphQL::Types::String
# end
# end