-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optionally raise on empty hash filter definitions
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 passed in, which is very confusing and I reckon rarely useful, but very unintuitive interface (found other 3 bugs in the codebase caused by the exact same problem). This change makes such definitions raise, but only if Mutations.raise_on_empty_hash_filter is set to true (defualt false). Such optional raising avoids breaking change. Overall, I recommend changing the interface to raise on bogus definition as a default, instead of the opt-in.
- Loading branch information
1 parent
fd1859b
commit d245226
Showing
3 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters