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
Describe the bug
Some build systems do not expose prototype on Module, so when a caller passes a direct module interface into the module it blows up. I believe this is the actual correct behaviour for the Module object. I ran into this issue with a vitest setup. Seems unlikely this is the only situation where this might be an issue.
TypeError: currentResolvers.hasOwnProperty is not a function
at mergeResolvers (file:///.node_modules/graphql-modules/index.mjs:1694:34)
at createResolvers (file://./node_modules/graphql-modules/index.mjs:1584:43)
at Object.factory (file:///./node_modules/graphql-modules/index.mjs:1971:40)
at file:///./node_modules/graphql-modules/index.mjs:1273:57
Fixes # (issue)
Describe the bug
Some build systems do not expose prototype on Module, so when a caller passes a direct module interface into the module it blows up. I believe this is the actual correct behaviour for the Module object. I ran into this issue with a vitest setup. Seems unlikely this is the only situation where this might be an issue.
Example
And then the caller sets up the module as following
Will fail with
TypeError: currentResolvers.hasOwnProperty is not a function
at mergeResolvers (file:///.node_modules/graphql-modules/index.mjs:1694:34)
at createResolvers (file://./node_modules/graphql-modules/index.mjs:1584:43)
at Object.factory (file:///./node_modules/graphql-modules/index.mjs:1971:40)
at file:///./node_modules/graphql-modules/index.mjs:1273:57
Fixes # (issue)
To Reproduce
Steps to reproduce the behavior:
//here is a repo that reproduces
https://github.com/jspears/graphql-modules-module-bug
Expected behavior
To not throw error
Environment:
@graphql-modules/graphql-modules
:Additional context
The text was updated successfully, but these errors were encountered: