title: How to switch polling on and off in Apollo?
body: <p>I use the <code>useQuery</code> Hook like this:</p>
  
  <pre class="lang-js prettyprint-override"><code>
  function Foo() {
    const { data, error, loading } = useQuery(MY_QUERY, { pollInterval: 1000 });
  
    return (
      &lt;&gt;
        &lt;Bar/&gt;
        &lt;Baz/&gt;
        {data}
      &lt;/&gt;
    );
  }
  </code></pre>
  
  <p>Now, both <code>Bar</code> and <code>Baz</code> use the same query. <code>Baz</code> is a sidebar and I'd like to disable the polling while it is active.</p>
  
  <p>I have a global reducer for handling the state of <code>Baz</code> and I modified it like this:</p>
  
  <pre><code>if (isSidebarOpen === false) {
    ...
    apolloClient.stop();
  } else {
    // TODO
  }
  </code></pre>
  
  <p>This stops the polling, but I don't know how to reactivate it when the sidebar gets closed (that is, in the <code>else</code> block above).</p>
  
  <p>Am I doing this correctly? Is there a different way to toggle the polling of a GraphQL query with Apollo?</p>