Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[graphiql] Upgrade to @graphiql/react breaks unit tests #3581

Open
1 task done
cwoolum opened this issue Apr 12, 2024 · 2 comments
Open
1 task done

[graphiql] Upgrade to @graphiql/react breaks unit tests #3581

cwoolum opened this issue Apr 12, 2024 · 2 comments

Comments

@cwoolum
Copy link

cwoolum commented Apr 12, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

We are getting the error

TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them
 - /local/myproject/node_modules/@graphiql/react/src/utility/context.ts:24:58
 - /local/myproject/node_modules/@graphiql/plugin-explorer/dist/index.js:1:2531
 - /local/myproject/node_modules/react-dom/cjs/react-dom.development.js:16305:18
 - /local/myproject/node_modules/react-dom/cjs/react-dom.development.js:20074:13
 - /local/myproject/node_modules/react-dom/cjs/react-dom.development.js:21587:16
 - /local/myproject/node_modules/react-dom/cjs/react-dom.development.js:4164:14
 - /local/myproject/node_modules/happy-dom/src/event/EventTarget.ts:223:42
 - /local/myproject/node_modules/happy-dom/src/nodes/element/Element.ts:1171:29
 - /local/myproject/node_modules/happy-dom/src/event/EventTarget.ts:132:9
 - /local/myproject/node_modules/happy-dom/src/nodes/element/Element.ts:1171:29

We had previously been using

"@graphiql/plugin-explorer": "1.0.3",
"graphiql": "3.1.0",

Upon upgrading our packages, @graphiql/plugin-explorer upgraded to 1.0.4 and @graphiql/react to 0.20.4, the above error started occurring.

Expected Behavior

Out tests were previously been passing so I would expect them to continue with no changes

Steps To Reproduce

Open this environment

https://stackblitz.com/edit/vitejs-vite-kkpoqd?file=vite.config.ts

Run npx vitest.

Environment

  • GraphiQL Version: 3.1.0
  • OS: Linux
  • Browser: N/A
  • Bundler: ESBuild
  • react Version: N/A
  • graphql Version: 3.1.0

Anything else?

No response

@ethan-tam33
Copy link

Hi, did you ever resolve this issue? What versions of graphiql/react, graphiql, and graphiql/plugin-explorer don't cause this issue?

@ethan-tam33
Copy link

Oops never mind! Just use the versions of graphiql and graphiql/plugin-explorer above and upgrade graphiql/react to 0.22.4. That worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants