Define common required arguments in single location
When writing services that expose service functionality but also declare required parameters (e.g. GraphQL) I observe that there is duplication:
- We declare that GraphQL arguments are
required
(e.g. here) - We also check for these arguments in Service objects
Is it possible to generalise this into concern to define a SSOT so we can avoid duplication and optimise execution by aborting requests early that don't have required arguments?