-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better arguments and inputs validation #799
Comments
Thanks for the suggestion! Best of all would be to implement these via query analyzers, so you can run validation before starting to execute the query. |
@rmosolgo do you have an example of accessing parameters inside of a |
sorry - i should be more specific. i see how to get access to the single arguments object passed in but i don't want to parse that tree again since it's already been done once in static validation. would it be possible to get the |
No, it's not possible to get the irep_node during validation, because it hasn't been built yet! |
hah, i figured this out the hard way yesterday - accessing the parameters in a debugger totally worked but doing it in code caused it would be cool to have the equivalent of a |
It would be good to have something similar to how
grape
validates and coerce parameters: https://github.com/ruby-grape/grape#parameter-validation-and-coercionThings like:
mutually_exclusive
,exactly_one_of
, and custom validatorsThe text was updated successfully, but these errors were encountered: