Replies: 2 comments
-
No, input types have no resolvers, thus no middlewares. |
Beta Was this translation helpful? Give feedback.
0 replies
-
For those seeking the same feature, the best way now is to create a function that does this feature in the resolver functions. For example, I am using this kind of function for now which selects fields name in the array, then it will convert to Like.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Can I confirm either field in @inputType can have its own middleware?
My use case is to change the value of @inputType if it has its own middleware. For example, I called it as
ChangeToLike
middleware. This middleware will automatically change the value to TypeORM "Like" statement before passing the value to Resolver.My current way of doing things is to change the value in Resolver which is very troublesome for each of the fields that need to be changed to "Like" statement. Or, do you have any other suggestions for this use case?
Beta Was this translation helpful? Give feedback.
All reactions