-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
I use graphql-js in a webapp using SvelteKit. After updating from version 16.6.0 to version 16.7.0 my app does not work anymore.
As far as I analyzed this correctly, the problem seems to be the change in src/jsutils/instanceOf.ts
from
process.env.NODE_ENV === 'production'
to
globalThis.process?.env.NODE_ENV === 'production'
SvelteKit seems to replace env.NODE_ENV by the string "development" or "production" on compiling the sources and that ends up in the following invalid code
var instanceOf = (
/* c8 ignore next 6 */
// FIXME: https://github.com/graphql/graphql-js/issues/2317
((_globalThis$process = globalThis.process) === null || _globalThis$process === void 0 ? void 0 : _globalThis$"development") === "production" ? function instanceOf2(value, constructor) {
...
the old version of instanceOf lead to this code
var instanceOf = (
/* c8 ignore next 6 */
// FIXME: https://github.com/graphql/graphql-js/issues/2317
// eslint-disable-next-line no-undef
false ? function instanceOf2(value, constructor) {
...
I don't know why this change was made so unfortunatly I don't really know how to fix this the best way. In my opionen it would by nice, if this part could be reversed to this old implementation.
racc-oo-n, ryota-murakami, oidualc and goodwin64
Metadata
Metadata
Assignees
Labels
No labels