Repository navigation
Conversation
|
@ctavan: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/ |
|
@ctavan, thanks for your PR! By analyzing the history of the files in this pull request, we identified @jbaxleyiii, @helfer and @Poincare to be potential reviewers. |
db0c796 to
d99287a
Compare
Generated by 🚫 dangerJS |
ce82e3b to
99b83c0
Compare
Currently apollo-client relies on the globally available `fetch` api which causes a number of problems. In the browser apollo-client uses a polyfill which "pollutes" the global scope. This is something a library should probably rather not do. This change is based on previous discussion and work done in apollographql#661 and apollographql#645.
99b83c0 to
5fe89c5
Compare
|
Oh nose, I just discovered #1993 and https://github.com/apollographql/apollo-fetch which will make this one irrelevant… I guess I'll take a closer look at |
Currently apollo-client relies on the globally available
fetchapiwhich causes a number of problems. In the browser apollo-client uses a
polyfill which "pollutes" the global scope. This is something a library
should probably rather not do.
This change is based on previous discussion and work done in
#661 and #645.
Checklist:
Comments:
I believe that the current state where apollo-client inserts a fetch-polyfill and thus modifies the global scope is a behavior that a library should not have. I would like to use
apollo-clientwithin another library myself and I do not want to pollute the globale scope of they sites who will use my library.The most straightforward change I can think of is allowing to optionally pass a
fetchimplementation as configuration option when creating the network interface.This PR still has some rough edges. My main concerns are:
fetcha good variable name for the config option?anywhich should of course be changed.I'm curious about your feedback and I'll be happy fix the open points in case there's a chance to get this merged.
More references: #1134, #1155