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

fastJoin applied but not sent to client when called from server #446

Closed
Creiger opened this issue Sep 21, 2018 · 2 comments
Closed

fastJoin applied but not sent to client when called from server #446

Creiger opened this issue Sep 21, 2018 · 2 comments

Comments

@Creiger
Copy link
Contributor

Creiger commented Sep 21, 2018

Hi. I am not suer if it is a bug or not, but i have the folowing problem.
I have a service Users which uses fastJoin in after hooks. It works perfectly when i call the service from socketio client. But when the call comes from the server it does not send fastjoined data to client. I am checking context.result in very last after hook and at that place it is still ok, but when socket client receives updated event data, fastjoined data is missing.

@eddyystop
Copy link
Collaborator

eddyystop commented Sep 22, 2018

I would think this has something to do with when context.dispatch https://docs.feathersjs.com/api/hooks.html#contextdispatch is set. You may have to set that yourself if you want the client to get a populated record from a server-side method call.

@Creiger
Copy link
Contributor Author

Creiger commented Sep 22, 2018

Thanks! I knew it must be my mistake. So now i just delete context.dispatch in all methods after hook if i call them from server.

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