React native with Apollo Graphql works on iOS but not on Android

I am developing a React Native application that uses Graphql to communicate to a Ruby on Rails server. I'm using the amazing Apollo library for this purpose.

The app was working without problems on iOS but when I started expo to run the app on my android phone I had this weird error:

Unhandled (in react-apollo:Apollo(Translate(LandmarksList))), ApolloError@

After spending some time debugging and googling about the problem it turns out to be the link to the graphql server (a Ruby on Rails app in my case).  

iOS simulator uses the same IP as the host whereas android doesn't so the solution was as simple as updating the IP of the graphql server:

const httpLink = new HttpLink({
  uri: ''

You probably have localhost or your local IP on the uri field.  If you change it to the IP that is being used by react native then it will work. Tip: You can see your own IP address checking the errors in the log: ApolloError@