Skip to content

fix: process is undefined when used in browser#1257

Closed
milosdanilov wants to merge 1 commit intographql:masterfrom
milosdanilov:master
Closed

fix: process is undefined when used in browser#1257
milosdanilov wants to merge 1 commit intographql:masterfrom
milosdanilov:master

Conversation

@milosdanilov
Copy link
Copy Markdown

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

@leebyron
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

taion commented May 24, 2018

@leebyron Could we get a release with this change?

@seanparmelee
Copy link
Copy Markdown

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
Copy Markdown
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