cookies icon indicating copy to clipboard operation
cookies copied to clipboard

Why required @nest/graphql for cookie setting ?

Open mindonline opened this issue 5 years ago • 4 comments

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

mindonline avatar May 14 '20 10:05 mindonline

Yeah, I would like to ask the same question

bkostrowiecki avatar May 27 '20 21:05 bkostrowiecki

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.

johnbiundo avatar Jun 08 '20 21:06 johnbiundo

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?

bkostrowiecki avatar Jun 08 '20 23:06 bkostrowiecki

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.

jmcdo29 avatar Jun 15 '20 17:06 jmcdo29