Meteor.callAsync vs Meteor.apply?

How does it work please explain and how to use?

I think the right questions are

  • Meteor.call vs Meteor.apply
  • Meteor.callAsync vs Meteor.applyAsync

These docs may help:

@minhna I have Method on server below

export const reportSummary = new ValidatedMethod({
  name: 'pos.reportSummary',
  mixins: [CallPromiseMixin],
  applyOptions: {
    noRetry: true, 
  },
  validate:null,
  async run(selector) {
   // some code here
  }
})

and then I call Method on client

Meteor.applyAsync('pos.reportSummary', this.form, (err, result)=>{
    console.log(result)
})

But it does not working.

I don’t know what it does not working mean. Be careful when you use Meteor.apply and Meteor.applyAsync function, the param you use will be different to Meteor.call and Meteor.callAsync

@minhna Now it work fine Meteor.apply(β€œ β€œ, [ ])

1 Like