lib/rails/graphql/helpers/with_schema_fields.rb
# Validate all the fields to make sure the definition is valid
Validate all the fields to make sure the definition is valid
Validate all the fields to make sure the definition is valid
def validate!(*)
          super if defined? super
          SCHEMA_FIELD_TYPES.each_key do |kind|
            next unless instance_variable_defined?("@#{kind}_fields")
            instance_variable_get("@#{kind}_fields")&.each_value(&:validate!)
          end
        end
def validate! ( * ) super if defined? super SCHEMA_FIELD_TYPES . each_key do | kind | next unless instance_variable_defined? ( "@#{kind}_fields" ) instance_variable_get ( "@#{kind}_fields" ) &. each_value ( & :validate! ) end end
Validate all the fields to make sure the definition is valid
Validate all the fields to make sure the definition is valid
# TODO: Maybe find a way to freeze the fields, since after validation # the best thing to do is block changes