monaco-graphql: handle SDL & high throughput schema changes
See original GitHub issue(carrying over this discussion with @acao from discord)
We’ve been using monaco-graphql to edit graphql schemas across multiple files, and it seems like the autocomplete (at least at the document level) is actually pretty operation-specific (e.g. suggesting query/mutation/subscription/fragment, as opposed to type/interface/enum/etc):
🖼 Screenshot of autocomplete suggestions
One thing to note is that currently we’re updating the mode schema on each change (debounced), but the SDL passed to the monaco-graphql API could be invalid — this causes some trouble as the graphql autocomplete suggestions come and go as the schema is or isn’t valid. I know the worker should get destroyed and re-created on each schema change, but our setup (and our schema being very large) seems to cause some crashing issues where there are still a number of worker threads hanging around:
🖼 Screenshot of sources tab
Two major issues here:
- inline SDL autocompletion features are not working anymore!!
- High throughput changes to the graphql schema for
monaco-graphql
cause issues with workers
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (5 by maintainers)
Top GitHub Comments
Here’s the video!
https://www.dropbox.com/home/Apps/Jitsi Meet/Recordings?preview=wholeaugustsoptfree+on+2022-02-22+20-13.mp4
Notes from pairing with @acao today! 🎉
we looked at:
found some bugs:
yarn run example:<example name>