graphiql icon indicating copy to clipboard operation
graphiql copied to clipboard

[graphiql] editorWorker has missing requestHandler errors

Open Falx opened this issue 3 months ago • 2 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

Current Behavior

I am developing an angular 20 application that uses the graphiql editor. I inject it into my application using React libraries. I configured the monaco workers using this import: import 'graphiql/setup-workers/esm.sh'; since that seems to be the only easy way to get the workers urls reckognized (they get fed via CDN this way)

This successfully starts workers and the error message about not being able to start worker is gone, however I get constant errors like below now:

Image

Expected Behavior

No errors, just being able to use the GraphiQL editor...

Steps To Reproduce

No response

Environment

  • GraphiQL Version: 5.2.0
  • OS: Windows 11
  • Browser: Chrome
  • Bundler: angular@20(vite)
  • react Version: 19.1.1
  • graphql Version: 16.11.0

Anything else?

I successfully bundled the GraphiQL 3.x.x version for a while now. Updating to GraphiQL 4.x.x works, but there is a bug present there ( #3589 ), that has only been fixed for GraphiQL 5.x.x., so sticking to 4.x.x is not an option right now.

The problem with 5.x.x is the switch to monaco-editor which requires webworker setup, something that is apparently hard to do within an angular 20 application right now.

Falx avatar Sep 18 '25 13:09 Falx

I have the same issue. I believe monaco-graphql is not supporting [email protected]+. I cloned the graphiql repo and updated monaco-editor to version ^0.54.0, and the prevously working monaco-graphql-react-vite example is not working anymore, with the same error as OP.

Reverting monaco-editor back to version 0.52.2 works.

dorshinar avatar Oct 12 '25 13:10 dorshinar

Seeing a similar issue that is resolved by downgrading monaco back to 0.52.2

mikeauclair avatar Oct 15 '25 21:10 mikeauclair