lib/rails/graphql/source/active_record/builders.rb
def build_reflection_inputs(holder)
          model.nested_attributes_options.each_key do |reflection_name|
            next if (reflection = model._reflect_on_association(reflection_name)).nil?

            expected_name = reflection.klass.name.tr(':', '')
            expected_name += 'Input' unless expected_name.ends_with?('Input')

            type_map_after_register(expected_name) do |input|
              options = reflection_to_options(reflection).merge(null: true)
              field_name = "#{reflection.name}_attributes"
              holder.safe_field(field_name, input, **options)
            end
          end
        end
# Build all +accepts_nested_attributes_for+ inside the input object
Build all +accepts_nested_attributes_for+ inside the input object
Build all + accepts_nested_attributes_for + inside the input object
def build_reflection_inputs(holder)
          model.nested_attributes_options.each_key do |reflection_name|
            next if (reflection = model._reflect_on_association(reflection_name)).nil?
            expected_name = reflection.klass.name.tr(':', '')
            expected_name += 'Input' unless expected_name.ends_with?('Input')
            type_map_after_register(expected_name) do |input|
              options = reflection_to_options(reflection).merge(null: true)
              field_name = "#{reflection.name}_attributes"
              holder.safe_field(field_name, input, **options)
            end
          end
        end
def build_reflection_inputs ( holder ) model . nested_attributes_options . each_key do | reflection_name | next if ( reflection = model . _reflect_on_association ( reflection_name ) ) . nil? expected_name = reflection . klass . name . tr ( ':' , '' ) expected_name += 'Input' unless expected_name . ends_with? ( 'Input' ) type_map_after_register ( expected_name ) do | input | options = reflection_to_options ( reflection ) . merge ( null : true ) field_name = "#{reflection.name}_attributes" holder . safe_field ( field_name , input , ** options ) end end end
Build all +accepts_nested_attributes_for+ inside the input object
Build all + accepts_nested_attributes_for + inside the input object
holder