lib/rails/graphql/type_map.rb
# Get the list of all registred objects
Get the list of all registred objects
Get the list of all registred objects
def objects(base_classes: nil, namespaces: nil)
        (Array.wrap(namespaces).presence || @index.keys).map do |namespace|
          (Array.wrap(base_classes).presence || @index[namespace].keys).map do |base_class|
            @index[namespace][base_class].values.map(&:call) \
              if @index[namespace].key?(base_class)
          end if @index.key?(namespace)
        end.flatten.compact.uniq.select do |obj|
          obj.respond_to?(:register!)
        end
      end
def objects ( base_classes : nil , namespaces : nil ) ( Array . wrap ( namespaces ) . presence || @index . keys ) . map do | namespace | ( Array . wrap ( base_classes ) . presence || @index [ namespace ] . keys ) . map do | base_class | @index [ namespace ] [ base_class ] . values . map ( & :call ) if @index [ namespace ] . key? ( base_class ) end if @index . key? ( namespace ) end . flatten . compact . uniq . select do | obj | obj . respond_to? ( :register! ) end end
Get the list of all registred objects
Get the list of all registred objects
base_classes
namespaces