Closed Oweeee closed 11 months ago
I see what happened. I will add a test case to confirm that. I guess it was an undocumented feature, but it should be supported.
Thank you for the speedy response to this, @MichalLytek! If you want, I could look into both returning support for this as well as adding the corresponding test case.
@Oweeee Closing as implemented in 3914b78 🔒
Describe the Bug An update to the typing of
ValidateOptions
(one of the arguments of the@Arg
and@Args
decorators) removed the options of passing a custom validation function to thevalidate
property.This change was merged with this commit, included in the 2.0.0-beta.2 release, but the list of breaking changes only lists this as a change to the
buildSchema
function, and instructs to use thevalidateFn
option instead. I can't find any corresponding change documentation in regards to the decorators.Was the effects this would have on said decorators intended?
To Reproduce Providing a custom function in the arguments of the
@Arg
and@Args
decorators now produce a type error.Example of a basic query
Expected Behavior As the change is not explicitly documented, I expect the decorators to still support taking a custom validation function
Environment (please complete the following information):
type-graphql
version:2.0.0-beta.3
class-validator
version:0.14.0