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 global fetch if in browser environment, else use cross-fetch #23

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

njerig
Copy link
Contributor

@njerig njerig commented Apr 3, 2023

isomorphic-fetch uses the same browser polyfill as cross-fetch and therefore shouldn't be used if graphql-request already uses cross-fetch. Instead, we check to see whether the global fetch defined in browsers exists. If it does, we use it; if it doesn't, we use cross-fetch.

Resolves: #17
Related pull request that was never merged: lquixada/cross-fetch#138

njerig added 3 commits April 3, 2023 01:07
isomorphic-fetch uses the same browser polyfill as cross-fetch and
therefore returns the same error. isomorphic-fetch will be removed
as a dependency in the next commit.

Related pull request that was never merged: lquixada/cross-fetch#138
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.

Using this module in a Chrome extension
2 participants