Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using isomporhic-fetch causes error in ReactNative #14

Closed
aqwert opened this issue Aug 4, 2017 · 3 comments
Closed

Using isomporhic-fetch causes error in ReactNative #14

aqwert opened this issue Aug 4, 2017 · 3 comments

Comments

@aqwert
Copy link

aqwert commented Aug 4, 2017

Just had this issue when I got the latest graphql-request and it was hard to track down. After finding similar issues it seems to be that graphql-request is now using isomophic-fetch which in a react native build fails:

Can't find variable: self

http://imgur.com/PzHkGC6

Issues reported:

It also looks like that the libarary is not well supported. It was last published 2 years ago and a number of PRs are outstanding... even one that resolves this issue.

Not sure if it would be a solution to move away from this libarary but in its current for I cannot use this within my app.

@schickling
Copy link
Contributor

Thanks a lot for raising this issue @aqwert. Given that most browsers seem to natively support fetch by now and node-fetch seems to be actively maintained, we could switch over to node-fetch instead. Would that work in your case?

@aqwert
Copy link
Author

aqwert commented Aug 6, 2017

I would say it would since I swicthed to use node-fetch in my app and it works fine

@schickling
Copy link
Contributor

Closing in favour of #16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants