lib/rails/graphql/type_map.rb
def exist?(name_or_key, base_class: :Type, namespaces: :base, exclusive: false)
        namespaces = namespaces.is_a?(Set) ? namespaces.to_a : Array.wrap(namespaces)
        namespaces += [:base] unless exclusive
        namespaces.uniq.any? { |namespace| dig(namespace, base_class, name_or_key).present? }
      end
# Checks if a given key or name is already defined under the same base
# class and namespace. If +exclusive+ is set to +false+, then it won't
# check the +:base+ namespace when not found on the given namespace.
Checks if a given key or name is already defined under the same base
class and namespace.
Checks if a given key or name is already defined under the same base class and namespace .
def exist?(name_or_key, base_class: :Type, namespaces: :base, exclusive: false)
        namespaces = namespaces.is_a?(Set) ? namespaces.to_a : Array.wrap(namespaces)
        namespaces += [:base] unless exclusive
        namespaces.uniq.any? { |namespace| dig(namespace, base_class, name_or_key).present? }
      end
def exist? ( name_or_key , base_class : :Type , namespaces : :base , exclusive : false ) namespaces = namespaces . is_a? ( Set ) ? namespaces . to_a : Array . wrap ( namespaces ) namespaces += [ :base ] unless exclusive namespaces . uniq . any? { | namespace | dig ( namespace , base_class , name_or_key ) . present? } end
Checks if a given key or name is already defined under the same base
class and namespace.
Checks if a given key or name is already defined under the same base class and namespace .
name_or_key
base_class
namespaces
exclusive