title: Apollo GraphQL Client does not work on release build in react native
body: <p>it's been around two weeks that I'm dealing with this problem.
  at first, it did not work at all. After spending several days searching for a solution I could fix it by adding these lines of code to my index.js file.</p>
  <pre><code>XMLHttpRequest = GLOBAL.originalXMLHttpRequest ?
      GLOBAL.originalXMLHttpRequest :
      GLOBAL.XMLHttpRequest;
      global.Blob = null
  </code></pre>
  <p>After that, it worked fine in the development mode and everything was fine.
  But as soon as I released my app I realized it does not work in the release build!</p>
  <p>I'm kind of sure it's a problem with fetch API that apollo uses behind the scenes. But I don't know what to do to fix it.</p>
  <p>I also tried to run a new project and paste my code on it, but no luck.</p>
  <p>this is my apollo client code:</p>
  <pre><code>import ApolloClient from 'apollo-client'
  import Statics from './statics'
  import {HttpLink} from 'apollo-link-http'
  import { InMemoryCache } from '@apollo/client';
  
  const customFetch = (uri, options) =&gt; {
    return fetch(uri, options)
    .then(response =&gt; {
      if (response.status &gt;= 500) {  // or handle 400 errors
        return Promise.reject(response.status);
      }
      return response;
    });
  };
  export const client = new ApolloClient({
    link: new HttpLink({uri:`${Statics.baseUrl}/graphql`, fetch:customFetch}) ,
    cache: new InMemoryCache(),
      }); 
  </code></pre>