I'm having trouble using ignite with apollo graphql.
I'm also not sure if this error of ignite or apollo, but when I use react-native init to create the project, the apollo works as expected.
The problem only occurs on Android, when I turn off the graphQL server (create network error), the application will appear a red screen when cannot query to server.
Steps to reproduce
Create new ignite project
Install apollo-boost, react-apollo and graphql
This is the content of the file App.js:
import React from 'react'
import { Text } from 'react-native'
import ApolloClient, { gql } from 'apollo-boost'
import { ApolloProvider, Query } from 'react-apollo'
Hello all!
I'm having trouble using ignite with apollo graphql.
I'm also not sure if this error of ignite or apollo, but when I use
react-native init
to create the project, the apollo works as expected.The problem only occurs on Android, when I turn off the graphQL server (create network error), the application will appear a red screen when cannot query to server.
Steps to reproduce
App.js
:const client = new ApolloClient({ uri: 'http://192.168.4.111:4000' })
const READ_TODOS = gql
query {a readTodos { id, title, completed } }
export default DemoScreen = () => { return (
}
System platform darwin
arch x64
cpu 4 cores Intel(R) Core(TM) i5-5350U CPU @ 1.80GHz directory /Users/tienhnm/Workspaces/corporation4d
JavaScript node 10.16.0 /usr/local/bin/node npm 6.9.2 /usr/local/bin/npm
yarn 1.16.0 /usr/local/bin/yarn
React Native react-native-cli 2.0.1
app rn version 0.59.3
Ignite ignite-cli 3.1.3 /usr/local/bin/ignite createdWith 3.1.3
boilerplate ignite-andross
examples classic
navigation react-navigation
askToOverwrite true
generators {"component":"ignite-andross","container":"ignite-andross","listview":"ignite-andross","list":"ignite-andross","redux":"ignite-andross","saga":"ignite-andross","screen":"ignite-andross"}
boilerplateVersion 4.0.5
Android java 1.8.0_212 /usr/bin/java
android home - /Users/tienhnm/Library/Android/sdk
iOS xcode 10.1