Graphql schema returning null
<p>I am trying to return a authentication token in response to a graphql query with username and password as arguments, but somehow graphql is always returning <code>null</code>. I am able to print the token just before returning it.</p>

<pre><code>var {
  GraphQLObjectType,
  GraphQLInt,
  GraphQLList,
  GraphQLString,
  GraphQLSchema
} = require('graphql');
let MyUser = require('./modules/user/user');


const Query = new GraphQLObjectType({
  name: 'Query',
  description : 'UserQuery',
  fields: function(){
    return {
      Token :{
        type: GraphQLString,
        description : "Authentication token",
        args: {
          user_name: { type: GraphQLString },
          password: { type: GraphQLString },
        },
        resolve(root, args){
          let user = new MyUser();
          user.authenticateUser(args.user_name, args.password, function(result){
            console.log("token :"+result);
            return result;
          })
        }
      }
    }
  }
});


const Schema = new GraphQLSchema({
  query: Query
});

module.exports = Schema;
</code></pre>

<p>Query look like</p>

<pre><code>query{
  Token(user_name: "Thurman.Cassin@hotmail.com" 
    password: "abc123")
}
</code></pre>

<p>Result </p>

<pre><code>{
  "data": {
    "Token": null
  }
}
</code></pre>

<p>what I am doing wrong here ?</p>