Skip to content

fix: process is undefined when used in browser #1257

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

Closed
wants to merge 1 commit into from

Conversation

milosdanilov
Copy link

When this library is used in browser, global variable process is undefined. This issue is related to earlier #1058.

@leebyron
Copy link
Contributor

Does this still result in the correct behavior for packagers like Webpack?

Could you share a bit more information about how you're using graphql in the browser? Typically these production environment checks are replaced with true or false by build pipelines

@milosdanilov
Copy link
Author

I am using print function from this lib, to convert from query AST.
Yes this is replaced with true or false but when this code is executed from browser process does not exist.

I can add a plunkr to simulate this, if its needed.

@leebyron leebyron closed this in 60c03ab Apr 18, 2018
@taion
Copy link
Contributor

taion commented May 24, 2018

@leebyron Could we get a release with this change?

@seanparmelee
Copy link

Hi @leebyron @IvanGoncharov, I unfortunately cannot upgrade to v14 yet. Any chance we could back-port this to a 0.13.3 release? Happy to open a PR, but I didn't see a 0.13.x branch to open it against.

@IvanGoncharov
Copy link
Member

Hi @seanparmelee
Sorry for the late response.

Any chance we could back-port this to a 0.13.3 release?

Currently, we have a very limited resource, so I don't think supporting pre-stable releases make sense.
Since almost all packages use graphql 📦 as peerDependency you can create your fork (as 0.13.4) and host it on GitHub.

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

Successfully merging this pull request may close these issues.

6 participants