-
Notifications
You must be signed in to change notification settings - Fork 55
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
ctx undefined on subscription #84
Comments
@palpinter How you solved that issue? Did you publish a custom package? If yes, Let me know. |
I am facing also same issue, If I don't use my own custom ws hook to authenticate socket, then I don't need to write this.broker.call. My code to authenticate
@icebob is there any way to pass |
@mabc224 I have not found a good solution yet. My dirty hack is, that I resolve the necessary entities in the action handler body, and removed resolvers from service graphql property. I know it is a wrong solution, but the moleculer-apollo-server service.js code is complicated enough to write a brand new context factory. It is faster and easier, because I have a strict deadline. |
Sorry, but the |
@mabc224 @palpinter Can either of you provide any more information on your scenario where this is undefined? I'm running the local subscription example and its defined and working properly. |
Hi,
In the code below ctx is undefined when subscription called:
However when I change
ctx.call
tothis.broker.call
it works.Thx
palpinter
The text was updated successfully, but these errors were encountered: