Skip to content
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

Nest.js middleware does not execute when using nestjs-mercurius. #178

Closed
j opened this issue Jul 15, 2021 · 3 comments
Closed

Nest.js middleware does not execute when using nestjs-mercurius. #178

j opened this issue Jul 15, 2021 · 3 comments

Comments

@j
Copy link
Contributor

j commented Jul 15, 2021

I created an upstream issue because I thought it might be a Nest.js issue. I'm not completely sure if it is or isn't.

nestjs/nest#7569

and the reproduction... https://github.com/j/nestjs-middleware-bug

I'm uncertain and haven't dug too much into it, but it breaks my authentication when switching over to this library. I'm assuming it might be due to the duplicate "fastify" modules you get when installing @nestjs/platform-fastify and (nestjs-)mercurius.

It's a pretty blocking issue though since a lot of people use modules that rely on nest application middleware.

@Davide-Gheri
Copy link
Owner

Checked, yup you're right, as a note, with Yarn works.
I'll remove entirely the fastify peerDep so the only one required is defined in @nestjs/platform-fastify

@j
Copy link
Contributor Author

j commented Jul 15, 2021

Yeah I've been using latest NPM for some reason and switched away from yarn and hit a bit of issues, haha.

Though strict isn't a bad thing and yarn not duping fastify could break things.

@j
Copy link
Contributor Author

j commented Jul 15, 2021

@Davide-Gheri Side note: I tried cloning this repository and can't install dependencies. I can submit a PR with fixes and test if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants