Is there a way to configure a default value in the relation schema for an attribute?
attribute :type, Types::Strict::String.enum('hard', 'soft'), default: 'soft'
So when I execute the following where ‘type’ key is missing from hash:
relation.command(:create).call({...})
I don’t get this error
RuntimeError: Neutered Exception Dry::Types::SchemaError: nil (NilClass) has invalid type for :type violates constraints (type?(String, nil) AND included_in?(["hard", "soft"], nil) failed)
OR do I have to always insert the default value {}[:type] = ‘soft’?