Code Monkey home page Code Monkey logo

Comments (9)

affablebloke avatar affablebloke commented on June 30, 2024 9

@CaryLandholt

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.

dozoisch avatar dozoisch commented on June 30, 2024 2

@jbaxleyiii would be really nice to have batch use the global fetch too!

from apollo-link.

jbaxleyiii avatar jbaxleyiii commented on June 30, 2024 1

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.

affablebloke avatar affablebloke commented on June 30, 2024

This library depends on apollo-fetch and apollo-fetch depends on isomorphic-fetch.

isomorphic-fetch has issues with React Native...

from apollo-link.

Nickersoft avatar Nickersoft commented on June 30, 2024

Oh hm... Guess I'll just have to wait out a fix then. Thanks for the insight!

from apollo-link.

affablebloke avatar affablebloke commented on June 30, 2024

@Nickersoft if you don't feel like waiting, or rolling your own ApolloLink, do this...
matthew-andrews/isomorphic-fetch#125 (comment)

from apollo-link.

CaryLandholt avatar CaryLandholt commented on June 30, 2024

@affablebloke are you suggesting forking isomorphic-fetch?

if not, where do you place the following fix?

image

Cheers!

from apollo-link.

CaryLandholt avatar CaryLandholt commented on June 30, 2024

@affablebloke worked perfectly - thanks!

from apollo-link.

michaelknoch avatar michaelknoch commented on June 30, 2024

is batch-http now using global fetch? still facing this error with [email protected]
@jbaxleyiii

from apollo-link.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.