-
-
Notifications
You must be signed in to change notification settings - Fork 257
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
Pipe not working with @RabbitPayload decorator #645
Comments
you can construct the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
The pipe I'm adding to my payload is not being executed:
Pipes only execute if added with
@UsePipes()
at the handler, but then it applies the pipe to all deocrated arguments. I also use@RabbitHeader()
to get a header value, and the pipe attempts to run on it as well (which I guess is expected):So now I just add the pipe to the handler, and check in
transform
if theargument.metatype
matchesPayload
then I execute the pipe logic, otherwise, I just send the data through as-is. It's very hacky, but the only way I can get this working as desired.Not sure why the pipe(s) passed through that decorator don't work, as it's part of the NestJS contract with parameter decorators (first data, then pipe(s)).
The text was updated successfully, but these errors were encountered: