How do you dynamically control react apollo-client query initiation? : <p>A react component wrapped with an <a href="http://dev.apollodata.com/react/queries.html#basics" rel="noreferrer">apollo-client</a> query will automatically initiate a call to the server for data.</p>

<p>I would like to fire off a request for data only on a specific user input.</p>

<p><a href="http://dev.apollodata.com/react/queries.html#graphql-skip" rel="noreferrer">You can pass the skip option in the query options</a> - but this means the refetch() function is not provided as a prop to the component; and it appears that the value of skip is not assessed dynamically on prop update.</p>

<p>My use is case is a map component. I only want data for markers to be loaded when the user presses a button, but not on initial component mount or location change.</p>

<p>A code sample below:</p>

<pre><code>// GraphQL wrapping
Explore = graphql(RoutesWithinQuery, {
  options: ({ displayedMapRegion }) =&gt; ({
    variables: {
      scope: 'WITHIN',
      targetRegion: mapRegionToGeoRegionInputType(displayedMapRegion)
    },
    skip: ({ targetResource, searchIsAllowedForMapArea }) =&gt; {
      const skip = Boolean(!searchIsAllowedForMapArea || targetResource != 'ROUTE');
      return skip;
    },
  }),
  props: ({ ownProps, data: { loading, viewer, refetch }}) =&gt; ({
    routes: viewer &amp;&amp; viewer.routes ? viewer.routes : [],
    refetch,
    loading
  })
})(Explore);
</code></pre>
