graphql / graphql/graphiql

monaco-graphql: Unexpected EOF with comments-only content

Open
#2,589 1 comment 1 reaction 0 assignees View on GitHub
bug monaco-graphql
Dominant language
TypeScript
Stars
16.9k
Forks
1.9k
Avg merge
22h 45m
Merged PRs (30d)
70

Description

A user [reported a UI bug](https://github.com/jonathanawesome/graphiql-prototype/issues/63) in the GraphiQL design prototype I've been working on that's related to `monaco-graphql`.

When the model value consists only of comment lines, we get a syntax error:

Screen Shot 2022-07-26 at 10 26 05 AM

This is reproducible in the [monaco-graphql-react-vite](https://stackblitz.com/edit/monaco-graphql-react-vite?file=src/App.tsx) example.

While it's simply a little annoying to see the error in the editor, the impact is heavy when attempting to parse the comments-only value because it errors out.

Ideally, a comments-only value wouldn't produce an error during parsing.

I can work around this in the prototype, so this is low priority.

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.