lib/rails/graphql/source/active_record/builders.rb
# Build all enums associated to the class, collecting them from the
# model setting
Build all enums associated to the class, collecting them from the
model setting
Build all enums associated to the class collecting them from the model setting
def build_enum_types
          return remove_instance_variable(:@enums) if enums.blank?
          @enums = enums.map do |attribute, setting|
            class_name = base_name + attribute.to_s.classify
            [attribute.to_s, create_enum(class_name, setting, once: true)]
          rescue DuplicatedError
            next
          end.compact.to_h.freeze
        end
def build_enum_types return remove_instance_variable ( :@enums ) if enums . blank? @enums = enums . map do | attribute , setting | class_name = base_name + attribute . to_s . classify [ attribute . to_s , create_enum ( class_name , setting , once : true ) ] rescue DuplicatedError next end . compact . to_h . freeze end
Build all enums associated to the class, collecting them from the
model setting
Build all enums associated to the class collecting them from the model setting