lib/rails/graphql/type/input.rb
def valid_input?(value)
            value = value.to_h if value.respond_to?(:to_h)
            return false unless value.is_a?(Hash)

            fields = enabled_fields
            value = value.transform_keys { |key| key.to_s.camelize(:lower) }
            value = build_defaults.merge(value)

            return false unless value.size.eql?(fields.size)

            fields.all? { |item| item.valid_input?(value[item.gql_name]) }
          end
# Check if a given value is a valid non-deserialized input
Check if a given value is a valid non-deserialized input
Check if a given value is a valid non - deserialized input
def valid_input?(value)
            value = value.to_h if value.respond_to?(:to_h)
            return false unless value.is_a?(Hash)
            fields = enabled_fields
            value = value.transform_keys { |key| key.to_s.camelize(:lower) }
            value = build_defaults.merge(value)
            return false unless value.size.eql?(fields.size)
            fields.all? { |item| item.valid_input?(value[item.gql_name]) }
          end
def valid_input? ( value ) value = value . to_h if value . respond_to? ( :to_h ) return false unless value . is_a? ( Hash ) fields = enabled_fields value = value . transform_keys { | key | key . to_s . camelize ( :lower ) } value = build_defaults . merge ( value ) return false unless value . size . eql? ( fields . size ) fields . all? { | item | item . valid_input? ( value [ item . gql_name ] ) } end
Check if a given value is a valid non-deserialized input
Check if a given value is a valid non - deserialized input
value