Comments (9)
It depends on your project's setup. I have placed this line at the top of App.js
. Or you could place it at the top of both index.android.js
and index.ios.js
.
// Fixes isomorphic-fetch
GLOBAL.self = GLOBAL;
Doing this before any imports of isomorphic-fetch
will monkey patch the GLOBAL
object for React Native.
from apollo-link.
@jbaxleyiii would be really nice to have batch use the global fetch too!
from apollo-link.
The apollo-link-http
no longer uses global fetch so this shouldn't be a problem! I'll be updating the batching fetch in the new few weeks to do the same!
from apollo-link.
This library depends on apollo-fetch and apollo-fetch depends on isomorphic-fetch.
isomorphic-fetch has issues with React Native...
from apollo-link.
Oh hm... Guess I'll just have to wait out a fix then. Thanks for the insight!
from apollo-link.
@Nickersoft if you don't feel like waiting, or rolling your own ApolloLink, do this...
matthew-andrews/isomorphic-fetch#125 (comment)
from apollo-link.
@affablebloke are you suggesting forking isomorphic-fetch?
if not, where do you place the following fix?
Cheers!
from apollo-link.
@affablebloke worked perfectly - thanks!
from apollo-link.
is batch-http now using global fetch? still facing this error with [email protected]
@jbaxleyiii
from apollo-link.
Related Issues (20)
- onError giving me terminating link and hence, `from` throws LinkError
- Type error after upgrading to graphql@15 HOT 7
- '__spreadArrays' was not found
- Axios instance as fetch implementation HOT 1
- How to use apollo-link-batch-http with Angular?
- Multiline package description on npm
- TypeScript error in Header authentication tutorial HOT 1
- apollo-link-ws loads backend modules when using it in the browser HOT 1
- Cannot override `useGETForQueries` to use POST on one specific query
- Request has invalid content type header when using XMLHttpRequest polyfill HOT 1
- How to use 2 terminating Links?
- OnError Apollo i will like to show/display the error HOT 3
- Client - Only absolute URLs are supported
- graphQLErrors returns an empty array for mutations onError
- Integrating websocket link results in constat logging in console HOT 2
- Apollo v3 Beta not working with RetryLink and onError HOT 2
- Pagination Apollo v3
- Update Dependencies (Renovate Bot)
- setContext in the errorLink is not updating the global header token
- operation context gets lost?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apollo-link.