title: How to Unit Test Graphql Resolver functions created using apollo-resolvers
body: <p>I have created resolver<strong>s(userresolver.js)</strong> using '<strong>apollo-resolvers</strong>' npm module as below.</p>
  
  <pre><code>import { createResolver } from 'apollo-resolvers';
  import {  isInstance } from 'apollo-errors';
  
  const baseResolver = createResolver(
    null,
    (root, args, context, error) =&gt; isInstance(error) ? error : new UnknownError()
  );
  
  
  
  const users = baseResolver.createResolver(
    (parent, args, { models, me } ) =&gt; {
           return Object.values(models.users);
    }
  );
  
  export default {
    Query: {
      users
    }
  }
  </code></pre>
  
  <p>;</p>
  
  <p>These also work fine when I test the queries after starting the server.</p>
  
  <p>I now want to do unit testing of the resolver functions.</p>
  
  <p>I am not sure how to do that. Can someone help me on how to unit test the resolver functions. I am using <strong>mocha with cha</strong>i for testing my project.</p>