lib/rails/graphql/helpers/with_schema_fields.rb
def add_proxy_field(type, field, *args, **xargs, &block)
          klass = Field.const_get(TYPE_FIELD_CLASS[type])
          raise ArgumentError, <<~MSG.squish unless field.is_a?(klass)
            The #{field.class.name} is not a valid field for #{type} fields.
          MSG

          xargs[:owner] = self
          object = field.to_proxy(*args, **xargs, &block)
          raise DuplicatedError, <<~MSG.squish if has_field?(type, object.name)
            The #{field.name.inspect} field is already defined on #{type} fields
            and cannot be replaced.
          MSG

          fields_for(type)[object.name] = object
        end
# Add a new field to the list but use a proxy instead of a hard copy of
# a given +field+
Add a new field to the list but use a proxy instead of a hard copy of
a given +field+
Add a new field to the list but use a proxy instead of a hard copy of a given + field +
def add_proxy_field(type, field, *args, **xargs, &block)
          klass = Field.const_get(TYPE_FIELD_CLASS[type])
          raise ArgumentError, <<~MSG.squish unless field.is_a?(klass)
            The #{field.class.name} is not a valid field for #{type} fields.
          MSG
          xargs[:owner] = self
          object = field.to_proxy(*args, **xargs, &block)
          raise DuplicatedError, <<~MSG.squish if has_field?(type, object.name)
            The #{field.name.inspect} field is already defined on #{type} fields
            and cannot be replaced.
          MSG
          fields_for(type)[object.name] = object
        end
def add_proxy_field ( type , field , * args , ** xargs , & block ) klass = Field . const_get ( TYPE_FIELD_CLASS [ type ] ) raise ArgumentError , <<~MSG . squish unless field . is_a? ( klass ) 
            The  #{ field . class . name }  is not a valid field for  #{ type }  fields.
           MSG xargs [ :owner ] = self object = field . to_proxy ( * args , ** xargs , & block ) raise DuplicatedError , <<~MSG . squish if has_field? ( type , object . name ) 
            The  #{ field . name . inspect }  field is already defined on  #{ type }  fields
            and cannot be replaced.
           MSG fields_for ( type ) [ object . name ] = object end
Add a new field to the list but use a proxy instead of a hard copy of
a given +field+
Add a new field to the list but use a proxy instead of a hard copy of a given + field +
type
field
args
xargs
block