mutations
mutations copied to clipboard
Compose your business logic into commands that sanitize and validate input.
I suggest to extend the explanations of the validation error handling section to avoid common mistakes and supposed unexpected behaviour.
How would you normally handle a parameter that has multiple types? I have a hash, containing a key `channel_id` that can be either `string` or `integer`. Thanks a lot for...
Hi, firstly thanks for the work on Mutations. It is really helpful library for us in both small and medium sized projects for business logic. I just noticed that FloatFilter...
I've recently spent several hours debugging a problem that was caused by an empty hash definition ```ruby required do hash :hash_name end ``` Such definition discards any hash content being...
Don't see much recent interaction from the authors. Quite a few PRs are open and waiting for review.
Eg. '123foo' gets converted to 123, due to the use of `to_i`. I think that it would be preferable for the integer filter to do something like: ``` ruby begin...
This PR adds a filter for URI objects as inputs to commands. Ensures the URI is not empty and that it parses. Usage example, taken from a command I wrote...
It would be nice if there were rails generators, that automatically generate mutations given inputs along with types, and whether they are optional/required. I believe such a feature will make...
is there a method to get all the errors in an array ? (even if they are nested) when validating a hash for instance : ``` required do hash :params...
Modifies InputFilter to return a dup of the given default value rather than the value itself. This prevents leaks across multiple calls of a command. Previously, if the validation or...