title: How to use a mocked data with react-apollo for tests
body: <p>I'm using react-apollo to build a client that consumes a GraphQL API, however, I'm very stuck on testing. What I want is to mock the server so I can easily test the application without needing to make network calls.</p>
  
  <p>I've found some pointers on how to mock the server:</p>
  
  <ul>
  <li><a href="https://dev-blog.apollodata.com/mocking-your-server-with-just-one-line-of-code-692feda6e9cd" rel="noreferrer">https://dev-blog.apollodata.com/mocking-your-server-with-just-one-line-of-code-692feda6e9cd</a></li>
  <li><a href="http://dev.apollodata.com/tools/graphql-tools/mocking.html#addMockFunctionsToSchema" rel="noreferrer">http://dev.apollodata.com/tools/graphql-tools/mocking.html#addMockFunctionsToSchema</a></li>
  </ul>
  
  <p>But there isn't really an example on how to use this mocked server in my app tests to avoid hitting the server.</p>
  
  <p>My goal is to setup integration tests to assert that the app is actually working:</p>
  
  <pre><code>describe('Profile feature', () =&gt; {
    beforeAll(() =&gt; {
      store = setupStore();
      app = mount(
        &lt;ApolloProvider store={store} client={apolloClient}&gt;
          &lt;ConnectedRouter history={history}&gt;
            &lt;App /&gt;
          &lt;/ConnectedRouter&gt;
        &lt;/ApolloProvider&gt;
      );
    });
  });
  </code></pre>
  
  <p>The store is using Redux and the client is being created like this:</p>
  
  <pre><code>const networkInterface = createNetworkInterface({
    uri: process.env.REACT_APP_API_URL
  });
  
  export const apolloClient = new ApolloClient({
    networkInterface
  });
  </code></pre>
  
  <p>How can I use a mocked server with graphql-tools here instead of the actual API?</p>