fix(graphql-language-service): fix off by one on hover
Hey, thanks for making this! This PR fixes a small off-by-one issue when hovering.
Details
I am using graphql-language-service-cli in Neovim. The issue is illustrated below:Hover, no information (incorrect, should show info)
Hover, shows information (correct)
Hover, shows information (incorrect, should not show info)
Hover, no information (correct)
🦋 Changeset detected
Latest commit: 14cca833562855e86ce99d4a962a8260704eae9f
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 2 packages
| Name | Type |
|---|---|
| graphql-language-service | Patch |
| codemirror-graphql | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: bensengupta / name: Benjamin Sengupta (f396fa946f071ace7f3233f4623994ca22daec4b, b7e0a66af7ddc2cac30c943e55963a3e9745f376, e55cfeaf01051b3fa91701f55c0d8b111cbdba87, 14cca833562855e86ce99d4a962a8260704eae9f, fbb4e5e0fb7e1639dfca0b50dcab68f92886cea5)
Seems like there is a race condition in the tests. Am unable to reproduce test failure locally.
Maybe replace this https://github.com/graphql/graphiql/blob/b495159382465a2cab6d8592b8bce66fece066fe/packages/graphql-language-service-server/src/MessageProcessor.ts#L142-L144
with this?
try {
void mkdirSync(this._tmpDirBase);
} catch (err) {
if (err instanceof Error && 'code' in err && err.code === 'EEXIST') {
return;
}
throw err;
}
Hey @acao @dimaMachina, any chance one of you could have a look?