diff options
Diffstat (limited to 'rubocop/cop/graphql/authorize_types.rb')
-rw-r--r-- | rubocop/cop/graphql/authorize_types.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rubocop/cop/graphql/authorize_types.rb b/rubocop/cop/graphql/authorize_types.rb index c69ce10f1c5..7aaa9299362 100644 --- a/rubocop/cop/graphql/authorize_types.rb +++ b/rubocop/cop/graphql/authorize_types.rb @@ -34,7 +34,10 @@ module RuboCop end def whitelisted?(class_node) - return false unless class_node&.const_name + class_const = class_node&.const_name + + return false unless class_const + return true if class_const.end_with?('Enum') WHITELISTED_TYPES.any? { |whitelisted| class_node.const_name.include?(whitelisted) } end |