-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add full support for 'go to references' #3254
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: f7ccda0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
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 latest changes of this PR are available as canary in npm (based on the declared |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3254 +/- ##
==========================================
- Coverage 56.39% 56.31% -0.08%
==========================================
Files 109 109
Lines 5149 5190 +41
Branches 1405 1412 +7
==========================================
+ Hits 2904 2923 +19
- Misses 1822 1839 +17
- Partials 423 428 +5
|
098be25
to
b262595
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'graphql-language-service-cli': minor | ||
--- | ||
|
||
Add basic support for 'go to references' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add basic support for 'go to references' | |
Add support for 'go to references' |
(given you'e expanded on it)
@AaronMoat yes, it's the schema file. I will come back later this evening to iterate over the project documents like we do for symbols/definitions. Currently, the project file cache lives in MessageProcessor, but we can use graphqlProject.getDocuments() as long as the documents are valid, but then we are reading the files directly instead of using the cache that updates only when the watched files are changed. What I'm hoping to refactor is moving the document cache from MessageProcessor to GraphQLCache, but this will require refactoring much of the codebase and 4 different language features and more than 50% of the tests, but it is badly needed! This is a design flaw I inherited about 6 years ago and have allowed to continue to haunt the codebase haha |
I'm putting together some diagrams and a writeup for this refactor to explain it better. Refactor is used broadly here, in the sense that the LSP outputs would be mostly the same, but the server needs a rewrite essentially. I may do this over the course of several PRs. I can use a branches from my fork if you'd like to contribute! |
I'd be happy to help if you're looking for some, though I'll need guidance, still getting up to speed in this codebase :) |
clone of #3250 with some desired changes and merging upstream