js-graphql-intellij-plugin
js-graphql-intellij-plugin copied to clipboard
Find variable usages in the referenced fragments
Describe the bug
When a fragment isn't colocated with the query that uses it any variables used by the query are reported as unused in the parent query.
To Reproduce See screenshots below.
Expected behavior Error shouldn't be reported as variable is being used by fragment.
Screenshots
![Screen Shot 2021-12-08 at 11 06 13 PM](https://user-images.githubusercontent.com/10719725/145333281-55e9a7b9-64a6-41c0-8329-7826f669e77a.png)
![Screen Shot 2021-12-08 at 11 06 25 PM](https://user-images.githubusercontent.com/10719725/145333287-3962614d-c6d4-4fa4-a9f6-054bcbf4ad78.png)
Version and Environment Details Operation system: MacOS Monterey IDE name and version: PhpStorm 2021.2.3 Plugin version: 3.0.0
The same issue is for queries inside JS/TS files:
The fragment is exported from separate file:
I don't know is it difficult to deal with language-specific imports/exports, but some other tools like graphql-code-generator respects this syntax.