-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
graphql-monaco is broken on monaco 0.21+ #1791
Comments
yes, when the mode fails then the worker is not initialized this is a known bug, thanks for reporting! i thought i had created a ticket this weekend |
I am using |
I'm hoping to get to it soon! There are some more urgent matters currently, but this was one of the next known issues to address. So, here, I am using a pattern borrowed from the monaco examples: https://github.com/microsoft/monaco-editor/search?q=CompletionItemKind it must be that previously, monaco 0.20 and older were exporting this globally? I don't know how this worked before hahaha I can't seem to figure out where to import this enum from now: here is a sandbox where I tried to import it: https://codesandbox.io/s/async-flower-nl2kb?file=/src/index.ts |
great, thanks for replying quickly @acao. I'll try to help here by debugging it with the above references. |
I have cloned this monaco-samples repo and try to debug apis of import * as monaco from 'monaco-editor';
console.log(
monaco.languages.CompletionItemKind,
"monaco.languages.CompletionItemKind"
); console output is hereMaybe we can access the The type definition is here https://microsoft.github.io/monaco-editor/api/enums/monaco.languages.completionitemkind.html I hope it will help someway @acao, please do let me your thoughts on it :) |
ah nice, of course that would work! so I think you can just add that line to the top of the file then: import * as monaco from 'monaco-editor'; |
If I set new MonacoWebpackPlugin({
// available options are documented at https://github.com/Microsoft/monaco-editor-webpack-plugin#options
globalAPI: true,
publicPath: "/js/",
filename: "[name].worker.bundle.js",
languages: [
'javascript',
'html',
'typescript',
'json'
]
}) |
Trying to install
graphql-mocaco
using the latest versions of monaco-editor will not work.Tested broken on
0.22
and0.21
. The version in the example works fine (0.20
)The rest call to the graphql endpoint to do the introspection query does not fire either.
I tried looking at their changelog but could not find something that would be a clear reason why.
The text was updated successfully, but these errors were encountered: