title: Apollo MockedProvider not returning expected data
body: <p>I wrote a hook that calls apollo <code>useQuery</code>. It's pretty simple:</p>
  <p>useDecider:</p>
  <pre><code>import { useState } from 'react';
  import { useQuery, gql } from '@apollo/client';
  
  export const GET_DECIDER = gql`
    query GetDecider($name: [String]!) {
      deciders(names: $name) {
        decision
        name
        value
      }
    }
  `;
  
  export const useDecider = name =&gt; {
    const [enabled, setEnabled] = useState(false);
  
    useQuery(GET_DECIDER, {
      variables: {
        name
      },
      onCompleted: data =&gt; {
        const decision = data?.deciders[0]?.decision;
        setEnabled(decision);
      },
  
      onError: error =&gt; {
        return error;
      }
    });
  
    return {
      enabled
    };
  };
  </code></pre>
  <p>I'm trying to test it now and the <code>MockedProvider</code> is not returning the expected data:</p>
  <pre><code>import React from 'react';
  import { render, screen } from '@testing-library/react';
  import '@testing-library/jest-dom';
  import { MockedProvider } from '@apollo/client/testing';
  import { useDecider, GET_DECIDER } from './useDecider';
  
  const getMock = (value = false, decider = '') =&gt; [
    {
      request: {
        query: GET_DECIDER,
        variables: {
          name: decider
        }
      },
      result: () =&gt; {
        console.log('APOLLO RESULT');
  
        return {
          data: {
            deciders: [
              {
                decision: value,
                name: decider,
                value: 10
              }
            ]
          }
        };
      }
    }
  ];
  
  const FakeComponent = ({ decider }) =&gt; {
    const { enabled } = useDecider(decider);
    return &lt;div&gt;{enabled ? 'isEnabled' : 'isDisabled'}&lt;/div&gt;;
  };
  
  const WrappedComponent = ({ decider, value }) =&gt; (
    &lt;MockedProvider mocks={getMock(value, decider)} addTypename={false}&gt;
      &lt;FakeComponent decider={decider} /&gt;
    &lt;/MockedProvider&gt;
  );
  
  describe('useDecider', () =&gt; {
    it('when decider returns true', () =&gt; {
      // should return true
      render(&lt;WrappedComponent decider=&quot;fake_decider&quot; value={true} /&gt;);
      screen.debug();
      const result = screen.getByText('isEnabled');
      expect(result).toBeInTheDocument();
    });
  });
  </code></pre>