Skip to content

Can the ErrorsPlugin be applied to validation of scalars used as input args? #495

Answered by hayes
mdavieselsevier asked this question in Q&A
Discussion options

You must be logged in to vote

Unfortunately I don't know of a good way to do this. Scalar validation is handle by graphql, and this happens at a completely different phase of execution, which means we can't catch the errors in the resolver. Pothos doesn't have a way to hook in or intercept this. One possible option might be to allow a custom validation option on scalar definitions that the does run during the resolver like other validation functions, and have the default parseValue function be more permissive.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@mdavieselsevier
Comment options

@mdavieselsevier
Comment options

@hayes
Comment options

hayes Aug 3, 2022
Maintainer

Answer selected by mdavieselsevier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants