graphql / graphql/graphiql

[lsp-server] 🐞 definitions jump to the wrong project workspace

Open
#3,318 7 comments 1 reaction 0 assignees View on GitHub
bug lsp-rewrite lsp-server
Dominant language
TypeScript
Stars
16.9k
Forks
1.9k
Avg merge
22h 45m
Merged PRs (30d)
70

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

```Markdown
When using the "go-to" definition shortcut the LSP may direct to the incorrect workspace folder for definitions.
```

### Expected Behavior

```Markdown
When using the "go-to" definition shortcut the LSP may should direct to definitions in the same workspace unless the schema directs somewhere else.
```

### Steps To Reproduce

```Markdown
1. add two folders supporting separate `graphqlrc` definitions
2. create a scalar on the first folder schema definition
3. use the scalar in a Query on the second folder schema definition
4. use "go-to" on the second folder schema for the scalar
5. the "go-to" will result in jumping to the file in the first folder
```

### Environment

```Markdown
- LSP Server Version: latest
- OS: Mac OS Ventura 13.4.1 (22F82)
- LSP Client: vscode
```

### Anything else?

```Markdown
https://github.com/karloluis/gql_lsp-goto-workspace_bug
```

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.