graphql / graphql/graphiql

monaco-graphql: handle SDL & high throughput schema changes

Open
#2,173 6 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
16.9k
Forks
1.9k
Avg merge
22h 45m
Merged PRs (30d)
70

Description

(carrying over [this discussion with @acao from discord](https://discord.com/channels/625400653321076807/863691102639620096/943977668402094150))

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
image

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
image

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.