You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you hover at the beginning of the query editor, it shows an error Error: Expected Parser stream to be available
When I first filed the issue I thought this could be fixed in the GraphQLWorker file -> doHover function by changing to return early
const hover = this._languageService.getHover(uri, document, graphQLPosition);
if (!hover) return;
but a couple days after I filed this issue I realized it also occurs if I hover later in the first line and think it may be the same issue as #3168 from a few years ago.
I think it can be fixed by changing graphql-language-service -> interface -> getDiagnostics -> getRange
(let i = 0; i < location.line; i++) {
to for (let i = 0; i <= location.line; i++) {
Expected Behavior
Should not throw Error: Expected Parser stream to be available in the UI console.
Steps To Reproduce
To reproduce go to the swapi or netlify demos from the graphiql docs, open the UI console, and hover at position 0.
Environment
GraphiQL Version: 5.2.2
OS: Mac Sequoia 15.7.3 (24G419)
Browser: Chrome
Bundler: tried with vite and esbuild and the demos
Activity
[-][monaco-graphql] hover broken[/-][+][graphql-language-service] hover broken[/+]Fix `monaco-graphql` hover crashing on the first line (#4225)