question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow deprecation of input values (field args, directive args, input fields)

See original GitHub issue

Describe the bug An unexpected error message “… tried to use a directive ‘deprecated’ in the ‘INPUT_FIELD_DEFINITION’ location but that is illegal”

To Reproduce

  1. In IntelliJ, create a *.graphqls file
  2. Type
input MyData {
    name: String
    surname: String
    familyName: String @deprecated
    city: String
}
  1. You get an error on the line familyName: “‘familyName’ tried to use a directive ‘deprecated’ in the ‘INPUT_FIELD_DEFINITION’ location but that is illegal”

Expected behavior I don’t think that @deprecated is illegal there - please explain or fix.

Screenshots image

Version and Environment Details IntelliJ IDEA 2021.2.3 (Ultimate Edition) Build #IU-212.5457.46, built on October 12, 2021 Runtime version: 11.0.12+7-b1504.40 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 10 10.0 Non-Bundled Plugins: com.intellij.lang.jsgraphql (3.0.0), com.haulmont.jpab (5.8-212)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:10

github_iconTop GitHub Comments

3reactions
ajkerrcommented, Sep 14, 2022

Would be awesome to cut a new version of the plugin to get this new feature!

0reactions
FreekVanDoorencommented, Aug 18, 2022

Not sure JetBrains is very invested in this plug-in.

Don’t know about that @vepanimas responded pretty quickly back in November.

I guess I can deal with a red squiggly line…

Red squiggly lines are haunting me in my dreams… 😥

Read more comments on GitHub >

github_iconTop Results From Across the Web

Allow deprecation of input values (field args, directive ... - GitHub
and yes, it seems supporting the @deprecated directive on fields. The generated code looks like this: @javax.annotation.processing.Generated( ...
Read more >
GraphQL schemas will use the "@deprecated" directive for ...
As of API version 2022-07 all GraphQL schemas will start using the "@deprecated" directive for input fields and arguments which have been ...
Read more >
Directives - Apollo GraphQL Docs
Configure GraphQL types, fields, and arguments​​ A directive decorates part of a GraphQL schema or operation with additional configuration. Tools like Apollo ...
Read more >
Schema Directives – GraphQL Tools
Using and implementing custom directives to transform schema types, fields, and arguments.
Read more >
Deprecating Schema | GraphQL Kotlin
... directive on the fields (which correspond to Kotlin properties and functions), input fields and enum values. Deprecation of arguments is ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found