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

@nonnull directive not recognized in query file #611

Closed adamoBMX closed 1 year ago

adamoBMX commented 2 years ago

Describe the bug The plugin does not seem to recognize the @nonnull field directive in Android Studio.

To Reproduce

  1. Open a .graphql file in Android Studio
  2. Write a query
  3. After a field, type @nonnull.

Expected behavior

  1. nonnull would show up in the directive auto-complete list
  2. @nonnull would not be marked red and labelled as an unknown directive

Screenshots

Screen Shot 2022-06-14 at 22 41 41 Screen Shot 2022-06-14 at 22 40 39

lem.

Version and Environment Details Operation system: macOS 12.4 IDE name and version: Android Studio Chipmunk | 2021.2.1 Patch 1 Plugin version: 3.1.4

Additional context Not a big deal, still seems to compile okay

vepanimas commented 2 years ago

Hello @adamoBMX! @nonnull is not a standard directive AFAIK, so what GraphQL framework do you use? For example, this directive is provided in apollo-kotlin, and you can try to enable type definitions for that framework on the plugin settings page.

Preferences 2022-07-15 18-15-44

adamoBMX commented 1 year ago

Ah yes, that's exactly the setting I was missing! Thanks for explaining, much appreciated. 🙂