How can I test a GraphQL server using Mongoose with Jest
<p>I want to test queries against my graphql implementation that is connected to a mongoose database using jest snapshot feature</p>

<p>I would like to follow this approach: <a href="https://github.com/nodkz/graphql-compose-examples/blob/master/examples/user/__tests__/queriesFromIndex.js" rel="nofollow">https://github.com/nodkz/graphql-compose-examples/blob/master/examples/user/<strong>tests</strong>/queriesFromIndex.js</a></p>

<p>To use Jest snapshot to test the result of my queries.</p>

<p>One drawback of this approach is that I need to pre populate my mongo database with the same dummy data to always get the same results</p>

<p>what are the approaches to test a graphql server? including mutations and subscriptions</p>