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

Determine fetch and FormData implementations at runtime #184

Merged
merged 2 commits into from Mar 30, 2020

Conversation

yaacovCR
Copy link
Contributor

With this change, polyfills for fetch/FormData are only necessary when actually using the required functionality.

For example, in a SSR app, a fetch polyfill such as cross-fetch must be installed only if the server sends queries. Similarly, a  FormData polyfill is only necessary if the server actually sends a multipart request.
@yaacovCR
Copy link
Contributor Author

Another approach would be to select fetch/FormData implementations on first use and cache. From my perspective, main thing is to demonstrate that example works with this change, whatever approach makes you happiest seems the thing to do.

Would just make me happy to get this in :)

@yaacovCR
Copy link
Contributor Author

Assuming possible given current climate, would love to expedite. Probably a blocker for ardatan/graphql-tools#1308

Copy link
Owner

@jaydenseric jaydenseric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great :)

@jaydenseric jaydenseric changed the title check for polyfill at runtime Determine fetch and FormData implementations at runtime Mar 30, 2020
@jaydenseric jaydenseric merged commit a0d3b91 into jaydenseric:master Mar 30, 2020
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

Successfully merging this pull request may close these issues.

None yet

2 participants