title: GraphQL Automatic refetch on empty responses
body: <p>I want to randomize movies from theMovieDB API. First I send a request to access the ID of the latest entry:</p>
  
  <pre><code>const { loading: loadingLatest, error: errorLatest, data: latestData, refetch: refetchLatest } = useQuery(
          LATEST_MOVIE_QUERY
      );
  </code></pre>
  
  <p>Then I want to fetch data from a randomly selected ID between 1 and the number of the latest id. Using a variable dependant on the first query seems to break the app, so for now I'm just using the same movie every time upon mounting the component:</p>
  
  <pre><code>const [
          movieState,
          setMovieState
      ] = useState(120);
  
      const { loading, error, data, refetch } = useQuery(ONE_MOVIE_BY_ID_QUERY, {
          variables : { movieId: movieState },
          skip      : !latestData
      });
  </code></pre>
  
  <p>I want to press a button to fetch a new random movie, but the problem is that many of the IDs in the API lead to deleted entries and then I get an error back. I want to keep refetching until I get a good response back but I have no idea to implement it. Right now my randomize function just looks like this:</p>
  
  <pre><code>const randomizeClick = () =&gt; {
          let mostRecentID = latestData.latestMovie.id;
          setMovieState(Math.floor(Math.random() * mostRecentID));
      };
  </code></pre>
  
  <p>I'd be grateful if someone can help me how to implement this.</p>