Meteor 2.12:
Meteor.callAsync('nameMethod', {})
.then(res => console.log(res)) // gets the expected res.
Meteor 3.0-alpha.15:
Meteor.callAsync('nameMethod', {})
.then(res => console.log(res)) // doesn't get the expected res.
// Need to use a new syntax...
.then(r => {
const res = await r.stubValuePromise
console.log(res) // get the expected res.
})
Ok, I believe this was supposed to be temporary but as more people rewrite more code, the syntax might not make sense.
This is also discussed here: callAsync alternatives · meteor/meteor · Discussion #12254 · GitHub
Is there any plan to reshape this and keep the old behavior/syntax or can we safely rewrite to this new await result.stubValuePromise
?
My progress now on a project of medium complexity: got it working on my station and not yet deployed or built for production. I am able to login with token and managed to patch Grapher (cultofcoders) to return my queries properly. Most of the app is not working due to failed Methods results and I am awaiting a decision on the matter above.