https://stackoverflow.com/questions/45455877/react-native-apollo-error-network-error-network-request-failed
Все мимо. Сервак не локально. Вот код:
```export const client = new ApolloClient({
uri: `http://89.../graphql`,
// link: createHttpLink({
// uri: `http://89.../graphql`,
// }),
onError: ({ networkError, graphQLErrors }) => {
console.log('Apollo Client Error:');
if (graphQLErrors) {
graphQLErrors.forEach(({ message, locations, path }) =>
console.log(
`[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`
)
);
}
if (networkError) {
console.log(`[Network error]: ${networkError}`);
}
},
cache: new InMemoryCache(),
fetchOptions: {
mode: "no-cors",
},
// headers:{
// 'Accept': 'application/json',
// 'Content-Type': 'application/json'
// },
})```