lib/rails/graphql/type/input.rb
def deserialize(value)
            value = value.to_h if value.respond_to?(:to_h)
            value = {} unless value.is_a?(Hash)
            value = enabled_fields.map do |field|
              next unless value.key?(field.gql_name) || value.key?(field.name)
              [field.name, field.deserialize(value[field.gql_name] || value[field.name])]
            end.compact.to_h

            new(OpenStruct.new(value))
          end
# Turn the given value into an isntance of the input object
Turn the given value into an isntance of the input object
Turn the given value into an isntance of the input object
def deserialize(value)
            value = value.to_h if value.respond_to?(:to_h)
            value = {} unless value.is_a?(Hash)
            value = enabled_fields.map do |field|
              next unless value.key?(field.gql_name) || value.key?(field.name)
              [field.name, field.deserialize(value[field.gql_name] || value[field.name])]
            end.compact.to_h
            new(OpenStruct.new(value))
          end
def deserialize ( value ) value = value . to_h if value . respond_to? ( :to_h ) value = { } unless value . is_a? ( Hash ) value = enabled_fields . map do | field | next unless value . key? ( field . gql_name ) || value . key? ( field . name ) [ field . name , field . deserialize ( value [ field . gql_name ] || value [ field . name ] ) ] end . compact . to_h new ( OpenStruct . new ( value ) ) end
Turn the given value into an isntance of the input object
Turn the given value into an isntance of the input object
value