You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The graphql module is extremely popular and used by many and many third party dependencies. While its possible to pin a version, it still exposes 2 versions of itself, a commonjs version and a module version. This can be an issue for the instanceof compares in the graphql-module code such as
function isScalarResolver(obj: any): obj is GraphQLScalarType {
return obj instanceof GraphQLScalarType;
}
...
export function isNotSchema<T>(obj: any): obj is T {
return obj instanceof GraphQLSchema === false;
}
Are the 2 most dangerous usages. When an instanceof these classes resolve to a different file, wether by module type or module version these will fail to work correctly.
Describe the solution you'd like
The graphql library supplies its own isSchema and isScalar utilty functions. Use these instead, under the covers its really doing string manipulation.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The
graphql
module is extremely popular and used by many and many third party dependencies. While its possible to pin a version, it still exposes 2 versions of itself, a commonjs version and a module version. This can be an issue for theinstanceof
compares in the graphql-module code such asAre the 2 most dangerous usages. When an instanceof these classes resolve to a different file, wether by module type or module version these will fail to work correctly.
Describe the solution you'd like
The graphql library supplies its own isSchema and isScalar utilty functions. Use these instead, under the covers its really doing string manipulation.
The text was updated successfully, but these errors were encountered: