title: Resolve asynchronous function of Graphql not able to return data queried over Stardog server having rdf data
body: <p>I am trying to query a stardog server using graphql below is my code.</p>
  
  <pre><code>import {
    GraphQLSchema,
    GraphQLObjectType,
    GraphQLInt,
    GraphQLString,
    GraphQLList,
    GraphQLNonNull,
    GraphQLID,
    GraphQLFloat
  } from 'graphql';
  
  import axios from 'axios';
  
  var stardog = require("stardog");
  
  let Noun = new GraphQLObjectType({
        name: "Noun",
        description: "Basic information on a GitHub user",
        fields: () =&gt; ({
            "c": {
         type: GraphQLString,
         resolve: (obj) =&gt; {
          console.log(obj);
            }
          }
       })
  });
  
  const query = new GraphQLObjectType({
        name: "Query",
        description: "First GraphQL for Sparql Endpoint Adaptive!",
        fields: () =&gt; ({
          noun: {
            type: Noun,
            description: "Noun data from fibosearch",
            args: {
              noun_value: {
                type: new GraphQLNonNull(GraphQLString),
                description: "The GitHub user login you want information on",
              },
            },
            resolve: (_,{noun_value}) =&gt; {
                var conn = new stardog.Connection();
  
                conn.setEndpoint("http://stardog.edmcouncil.org");
                conn.setCredentials("xxxx", "xxxx");
                  conn.query({
                      database: "jenkins-stardog-load-fibo-30",
                      query: `select ?c  where {?s rdfs:label '${noun_value}'. ?c rdfs:subClassOf ?s}`,  
                      limit: 10,
                      offset: 0
                  },
                  function (data) {
                         console.log(data.results.bindings);
                         return data.results.bindings;
                  });  
                }
              },
            })
        });
  
  const schema = new GraphQLSchema({
    query
  });
  
  export default schema;
  </code></pre>
  
  <p>Query is executed successfully and I am able to see the result on console but <code>return data.results.bindings;</code> inside <code>function(data)</code> is not returning this result to the <code>Noun</code> type system under the  <code>resolve: (obj) =&gt; {  console.log(obj); }</code>
  and the <code>obj</code> returned is showing null instead of the result <code>bindings</code> returned from the query of GraphQL. It would be great if someone could help me to figure out what I am missing here.</p>
  
  <p>Thanks in advance,
  Yashpal                </p>