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
"Unexpected response: \"ReferenceError: context is not defined\\n at eval (eval at enabled (/home/mmadson/redacted/node_modules/@graphql-mesh/plugin-response-cache/cjs/index.js:23:16), <anonymous>:3:23)\\n at enabled (/home/mmadson/redacted/node_modules/@graphql-mesh/plugin-response-cache/cjs/index.js:23:47)\\n at onRequest (/home/mmadson/redacted/node_modules/@graphql-yoga/plugin-response-cache/cjs/index.js:73:17)\\n at /home/mmadson/dev/redacted/node_modules/@whatwg-node/server/cjs/createServerAdapter.js:55:125\\n at iterate (/home/mmadson/dev/redacted/node_modules/@whatwg-node/server/cjs/utils.js:367:25)\\n at iterate (/home/mmadson/redacted/node_modules/@whatwg-node/server/cjs/utils.js:379:16)\\n at /home/mmadson/redacted/node_modules/@whatwg-node/server/cjs/utils.js:373:24\""
turns out the main problem here is that function constructors do not inherit lexical scope. Needed to pass context as an arg to resolve things. See attached PR for a fix.
Issue workflow progress
Progress of the issue based on the
Contributor Workflow
Github,
Stackblitz
or
CodeSandbox
Describe the bug
It seems that context is not made available in the ifDef of the responseCache plugin. This seems to be inconsistent with the docs.
To Reproduce Steps to reproduce the behavior:
Expected behavior
context should be available
Environment:
Additional context
package.json deps
The text was updated successfully, but these errors were encountered: