js-graphql-intellij-plugin icon indicating copy to clipboard operation
js-graphql-intellij-plugin copied to clipboard

Render deprecated fields with a line through them

Open AOrobator opened this issue 5 years ago • 3 comments

Version and Environment Details

Operation system: Mac OS X 10.15.1

IDE name and version: Android Studio 3.5.3

Plugin version: v2.3.0

Expected Behaviour

When a field in graphql is annotated with deprecated I'd like for the IDE to strike a line through deprecated usages in queries, mutations, and fragments.

Actual Behaviour

No indication of deprecation

Steps to Reproduce / Link to Repo with Reproduction and Instructions

Use this type in your schema

type ExampleEntity {
  exampleDeprecatedField: Int! @deprecated(reason : "This is deprecated")
}

AOrobator avatar Feb 05 '20 17:02 AOrobator

@jimkyndemeyer I would like to get started on this issue. Do you have any pointers for how I can get started or what files to modify?

AOrobator avatar Aug 06 '20 19:08 AOrobator

@vepanimas Thanks again for all the hard work on this plugin. Finally unblocked default values on our schema started working with one of latest updates. However, one year later and still I wish this issue would get reopened. I might try again but I recall getting lost in a maze of Plugin files because i wasn't so used to doing PSI stuff. This seems like a super useful feature. Currently we use a python reporting script to generate Jira tickets for deprecations, but directly in IDE with a line through it and an inspection would be much easier to maintain and integrate nicely with CI tools. Let me know if anyone has some free time to pair code this one out

SriwanKm avatar Oct 18 '21 19:10 SriwanKm

@SriwanKm nice to hear! I'm going to rework syntax highlighting in this release because it uses a deprecated API. Also at the same time, I'll improve syntax highlighting for different color schemes like Monokai and will implement a deprecated inspection. I hope to work on it next week.

getting lost in maze of Plugin files because I wasn't so used to doing PSI stuff

I'm working on a WebStorm full-time for about 2 years and still find a lot of places in the IntelliJ codebase where I feel the same :)

vepanimas avatar Oct 18 '21 20:10 vepanimas

Hi @vepanimas, were you able to take a look at this yet?

amerryma avatar Oct 26 '23 18:10 amerryma

Finally, I was able to work on that. Feel free to try it in the latest 2024.1 EAP2 of the WebStorm, IDEA, or any other compatible IDE. More details are here.

vepanimas avatar Jan 31 '24 12:01 vepanimas