lib/rails/graphql/helpers/with_assignment.rb
def validate_assignment(base_class, &block)
            @base_class = base_class
            @error_block = block unless block.nil?
            self.assigned_to = base_class
          end
# Allows validating the +assigned_class+ before resolving it, making
# sure that it is a subclass of +base_class+. Use the +block+ to
# customize the error message
Allows validating the +assigned_class+ before resolving it, making
sure that it is a subclass of +base_class+. Use the +block+ to
customize the error message
Allows validating the + assigned_class + before resolving it making sure that it is a subclass of + base_class + . Use the + block + to customize the error message
def validate_assignment(base_class, &block)
            @base_class = base_class
            @error_block = block unless block.nil?
            self.assigned_to = base_class
          end
def validate_assignment ( base_class , & block ) @base_class = base_class @error_block = block unless block . nil? self . assigned_to = base_class end
Allows validating the +assigned_class+ before resolving it, making
sure that it is a subclass of +base_class+.
Allows validating the + assigned_class + before resolving it making sure that it is a subclass of + base_class + .
base_class
block