Meteor Methods callbacks with ES6 Promises?

So I’ve just come up against the whole 'can’t callback client code from a Meteor.method’ thing again. For example:

//on server

  'queryRemoteServer': function (connectionOpts, query) {
    connection.connect(connectionOpts, function (err, conn) {
      conn.query(query, function (err, data) {
        return data //`data` is what I care about here.

// and now, on client

var data ={host: ''}, "SELECT *;");
//I want `data` here to be `data` up there!!

I think this comes up all the time, really. The sheer number of people with questions like this is proof enough.

The standard solutions include using Session variables, abusing returnStubValue, or using a promises package.

How come we don’t use ES6 Promises for Meteor.methods? And what exactly is the absolutely, 100% definitive solution for a case like this?


we use reactive variable or reactive dir in given template.
working as a charm, but hard to comment when you dont say where exactly u want to call that and what should be next thing to do with result data.

Maybe RactiveMethod will be helpful?