Offer validation with a simple function
The @validated class decorator doesn't work with mutation classes inherited from Graphene's relay.ClientIDMutation, as issue #10 explains.
The @validated class decorator also always performs validation before the mutation class's actual mutate function is entered. That might not always be what is needed. There are use cases (e.g authorisation) where some work should be done by the mutate function before input validation is done.
The validation function proposed in this PR solves (or can be used to circumvent) both of these problems.
TODO:
This PR is a draft for getting comments about the proposed idea. The follwing items need to be completed before this should be merged in.
- [ ] write documentation
@chpmrc Would you like to check out this PR and give some comments?
Yep I'll take a look, thanks! Can we break things down into smaller PRs next time though? I can quickly review smaller PRs whenever I have some time ;)