nestjsplus / cookies

Decorators for Managing Cookies with NestJS
MIT License
35 stars 11 forks source link

Why required @nest/graphql for cookie setting ? #11

Open mindonline opened 4 years ago

mindonline commented 4 years ago

In branch Nest7 GraphQL package is required by default even project don't use GraphQL.

bkostrowiecki commented 4 years ago

Yeah, I would like to ask the same question

johnbiundo commented 4 years ago

It's because it now uses the context.getType() function to determine the execution context, which could be Graphql. I'd like to remove this dependency, but don't have time right at this moment to do so. PR's welcome if someone else would like to tackle this.

bkostrowiecki commented 4 years ago

Hmmm, maybe I'll try, but I can't promise anything. Thanks for response.

EDIT: BTW. This version was published from the different branch than master, right? It's from nest7?

jmcdo29 commented 4 years ago

I actually ran into something similar building up nestjs-throttler. I found a way around it though, using context.getArgsByIndex(2) to mimic GqlExecutionContext.create(context).getContext(). It does mean that Fastify is incompatible, but I don't think that affects this package.