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

Methods resolve on result instead of updated event #109

Open
PhilippSpo opened this issue Oct 30, 2016 · 0 comments
Open

Methods resolve on result instead of updated event #109

PhilippSpo opened this issue Oct 30, 2016 · 0 comments

Comments

@PhilippSpo
Copy link

When you call a method that has some side-effects (manipulates some collections), the returned promise resolves when the result event for that method is emitted.

Looking at the meteor guide about the method lifecycle, the promise should resolve when the updated event for the method is emitted.
In the Meteor client, the result event "doesnt call the Method callback yet". It only saves the return value for later when calling the callback after the updated event.

@pscanf @davidebianchi I am happy to provide a PR to fix this behaviour if you agree.
Here is a screenshot of the DDP events exchanged when invoking a method, that shows clearly that there is a lot of stuff still happening after the result event is emitted:
image

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

1 participant