DEV Community

Discussion on: Signup and Login CQRS Pattern with Nest JS, Passport and GraphQL

Collapse
 
sk8guerra profile image
Jorge Guerra

Hi 3logy, thanks for this amazing article.

I'm trying to implement it but, I'm getting this error: TypeError: context.getType is not a function

error

What could be happening? Or what might have I forgotten?

Collapse
 
3logy profile image
3logy

Hi Jorge, sorry for the late, I was in vacation. Did you fix the issue?

Best regards

Collapse
 
sk8guerra profile image
Jorge Guerra

No problem 3logy. And no, haven't solved It yet, decided to take a rest after try for two days hahaha. Maybe I'll try it tomorrow. I'll write another comment here letting you know how it went.

Collapse
 
sk8guerra profile image
Jorge Guerra

Brooo I've alrady solved it. jajaja it was actually tough.

Thread Thread
 
eliotis profile image
Takis Koumoutsakos

Please share how you solved it

Thread Thread
 
sk8guerra profile image
Jorge Guerra

Here it is:

export const Context = createParamDecorator(
    (data, [root, args, ctx, info]) => ctx
);
Enter fullscreen mode Exit fullscreen mode

In @nestjs/core 6.0.0 you can access the context like that.

Does it solve your problem?

Thread Thread
 
eliotis profile image
Takis Koumoutsakos

Thanks for your reply Jorge, will try later.