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

Use fetch polyfill that does not pollute global context [DO NOT MERGE] #661

Closed
wants to merge 1 commit into from

Conversation

gajus
Copy link

@gajus gajus commented Sep 17, 2016

TODO:

  • If this PR is a new feature, reference an issue where a consensus about the design was reached (not necessary for small changes)

#645

  • Make sure all of the significant new logic is covered by tests
  • Rebase your changes on master so that they can be merged easily
  • Make sure all tests and linter rules pass
  • Update CHANGELOG.md with your change
  • Add your name and email to the AUTHORS file (optional)

@apollo-cla
Copy link

@gajus: 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/

@gajus
Copy link
Author

gajus commented Sep 17, 2016

I am not familiar with TypeScript, beyond the basic concept of its purpose.

The test is giving the following errors:

src/batchedNetworkInterface.ts(13,25): error TS2307: Cannot find module 'fetch-ponyfill'.
src/networkInterface.ts(5,25): error TS2307: Cannot find module 'fetch-ponyfill'.
test/batchedNetworkInterface.ts(22,25): error TS2307: Cannot find module 'fetch-ponyfill'.
test/batchedNetworkInterface.ts(60,5): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
test/mocks/mockFetch.ts(1,25): error TS2307: Cannot find module 'fetch-ponyfill'.

I am assuming this is because I haven't imported type definitions for fetch-ponyfill?

@stubailo
Copy link
Contributor

Yeah we might be able to somehow reuse the typings for fetch by adding some stuff to this file: https://github.com/apollostack/apollo-client/blob/master/typings.d.ts

@helfer helfer closed this Sep 29, 2016
@helfer
Copy link
Contributor

helfer commented Sep 29, 2016

Closing this, since I think it's better to track it as an issue for now. Trying to merge/close as many PRs as possible before we do a major refactor.

ctavan added a commit to ctavan/apollo-client that referenced this pull request Aug 7, 2017
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.
ctavan added a commit to ctavan/apollo-client that referenced this pull request Aug 7, 2017
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.
ctavan added a commit to ctavan/apollo-client that referenced this pull request Aug 7, 2017
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.
ctavan added a commit to ctavan/apollo-client that referenced this pull request Aug 7, 2017
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.
ctavan added a commit to ctavan/apollo-client that referenced this pull request Aug 7, 2017
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.
ctavan added a commit to ctavan/apollo-client that referenced this pull request Aug 7, 2017
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.
ctavan added a commit to ctavan/apollo-client that referenced this pull request Aug 7, 2017
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.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants