JetBrains / js-graphql-intellij-plugin

GraphQL language support for WebStorm, IntelliJ IDEA and other IDEs based on the IntelliJ Platform.
https://jimkyndemeyer.github.io/js-graphql-intellij-plugin/
MIT License
879 stars 97 forks source link

v4 is not able to find usages of a fragments #656

Closed rohandhruva closed 1 year ago

rohandhruva commented 1 year ago

Describe the bug

With v3.x, I could command-click on a fragment to see all the usages in queries. Right click -> Find Usages also worked the same way. With v4, that has stopped working. I only see "No usages found".

Command click to navigate to a fragment definition still works.

To Reproduce

  1. Write a query in a file, a.graphql
  2. In that query, use a fragment from a different file, b.graphql
  3. Navigate to the fragment's b.graphql file
  4. Right click on the fragment and click "Find Usages"

(EDIT: Actually, the issue also happens for fragments in the same file)

Expected behavior I should see the usage in a.graphql file

Version and Environment Details Operation system: macOS 13.3.1 IDE name and version: Android Studio Giraffe | 2022.3.1 Canary 11 and IntelliJ IDEA 2023.1 (Ultimate Edition) Plugin version: 4.0.0-222