lib/rails/graphql/helpers/with_fields.rb
# 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 proxy_field(field, *args, **xargs, &block)
          raise ArgumentError, <<~MSG.squish unless field.is_a?(GraphQL::Field)
            The #{field.class.name} is not a valid field.
          MSG
          xargs[:owner] = self
          object = field.to_proxy(*args, **xargs, &block)
          raise DuplicatedError, <<~MSG.squish if field?(object.name)
            The #{field.name.inspect} field is already defined and can't be replaced.
          MSG
          fields[object.name] = object
        end
def proxy_field ( field , * args , ** xargs , & block ) raise ArgumentError , <<~MSG . squish unless field . is_a? ( GraphQL :: Field ) 
            The  #{ field . class . name }  is not a valid field.
           MSG xargs [ :owner ] = self object = field . to_proxy ( * args , ** xargs , & block ) raise DuplicatedError , <<~MSG . squish if field? ( object . name ) 
            The  #{ field . name . inspect }  field is already defined and can't be replaced.
           MSG fields [ 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 +
field
args
xargs
block