lib/ariadne/static/generate_constants.rb



# frozen_string_literal: true

# :nocov:
module Ariadne
  module Static
    # :nodoc:
    module GenerateConstants
      class << self
        def call
          Ariadne::BaseComponent.descendants.sort_by(&:name).each_with_object({}) do |component, mem|
            mem[component.to_s] = component.constants(false).sort.index_with do |constant|
              component.const_get(constant)
            end
          end
        end
      end
    end
  end
end