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

How to prioritise definition in graphql file over ts/js for goto #603

Open TuringJest opened 2 years ago

TuringJest commented 2 years ago

Describe the bug We are generating operations, etc. from graphql files which are easier to handle for our workflows. However, if we write a query with a fragment in a graphql file the goto will jump to the generated ts DSL of that fragment. Only, if there is no generated version it will go to the definition in the graphql file.

Is there a way to prioritise graphql files which are our "source of truth", or alternatively go to the definition according to the file-type?

To Reproduce Link to Repo with Reproduction or Steps to Reproduce:

  1. write fragment in a graphql file
  2. export same DSL fragment in a js/ts file
  3. spread fragment in a query in a graphql file
  4. use goto to look up fragment definition

Version and Environment Details Operation system: Monterey IDE name and version: Webstorm 2021.3.2 Plugin version: 3.1.2

Additional context Add any other context about the problem here.