Skip to content
This repository has been archived by the owner on Aug 20, 2020. It is now read-only.

Use fetch-ponyfill instead of isomorphic-fetch polyfill #22

Closed
ctavan opened this issue Aug 7, 2017 · 4 comments
Closed

Use fetch-ponyfill instead of isomorphic-fetch polyfill #22

ctavan opened this issue Aug 7, 2017 · 4 comments

Comments

@ctavan
Copy link
Contributor

ctavan commented Aug 7, 2017

Following my reasoning in apollographql/apollo-client#2008 I think it would be a good practice if a library like apollo-fetch did not modify the global namespace by polyfilling fetch.

Is there any particular reason not to use https://github.com/qubyte/fetch-ponyfill instead? If you would accept a ponyfill instead of a polyfill I'd be happy to contribute a PR.

Bundle-size wise there should be no signifcant difference.

ctavan added a commit to ctavan/apollo-fetch that referenced this issue Aug 7, 2017
Use a fetch ponyfill instead of modifying the global scope and
polyfilling the fetch API.

Closes apollographql#22.
ctavan added a commit to ctavan/apollo-fetch that referenced this issue Aug 7, 2017
Use a fetch ponyfill instead of modifying the global scope and
polyfilling the fetch API.

Closes apollographql#22.
ctavan added a commit to ctavan/apollo-fetch that referenced this issue Aug 7, 2017
Use a fetch ponyfill instead of modifying the global scope and
polyfilling the fetch API.

Closes apollographql#22.
ctavan added a commit to ctavan/apollo-fetch that referenced this issue Aug 11, 2017
Use a fetch ponyfill instead of modifying the global scope and
polyfilling the fetch API.

Closes apollographql#22.
ctavan added a commit to ctavan/apollo-fetch that referenced this issue Aug 14, 2017
Use a fetch ponyfill instead of modifying the global scope and
polyfilling the fetch API.

Closes apollographql#22.
@giautm
Copy link

giautm commented Sep 15, 2017

Link issues i facing on react-native :(

matthew-andrews/isomorphic-fetch#125

@joarwilk
Copy link

joarwilk commented Oct 4, 2017

This really needs to be resolved. @ctavan is your PR ready?

@ctavan
Copy link
Contributor Author

ctavan commented Oct 4, 2017

@joarwilk as outlined in #30 I believe apollo-fetch should not be bundled with a fetch ponyfill but leave that choice up to the user. I have prepared a PR (#30) for an apollo-fetch-polyfill package that comes with the cross-fetch polyfill. Still awaiting feedback from the maintainers though.

With that change it would be very simply to provide your own fetch-ponyfill when using the regular apollo-fetch which would then come without any polyfill.

@evans
Copy link
Contributor

evans commented Dec 5, 2017

#71 uses cross-fetch, so this should be resolved

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

No branches or pull requests

4 participants