You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 9, 2021. It is now read-only.
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:
importReactfrom'react'import{Text}from'react-native'importApolloClient,{gql}from'apollo-boost'import{ApolloProvider,Query}from'react-apollo'constclient=newApolloClient({uri: 'http://192.168.4.111:4000'})constREAD_TODOS=gql` query {a readTodos { id, title, completed } }`exportdefaultDemoScreen=()=>{return(<ApolloProviderclient={client}><Queryquery={READ_TODOS}>{({ loading, error, data })=>{if(loading)return<Text>Loading...</Text>if(error)return<Text>Error :(</Text>returndata.readTodos.map(({ id, title })=>(<Textkey={id}>{title}</Text>))}}</Query></ApolloProvider>);}
Make sure that graphQL server is turned off and run project on Android
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
:ignite doctor
results:The text was updated successfully, but these errors were encountered: