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

.graphqlconfig has no code highlighting and no arrow icon buttons to fetch schema next to line numbers #482

Closed simPod closed 1 year ago

simPod commented 3 years ago

Describe the bug

I have .graphqlconfig file present in several projects but the plugin does not show arrows next to endpoint to fetch schema

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

  1. Go to 'https://github.com/simPod/js-graphql-gradle-bug (#423)
  2. Click on '.graphqlconfig file
  3. See no controls added, no highlighting enabled. It's displayed as a simple text file

It can find endpoints though:

image

Expected behavior

E.g. show play arrow icon to create schema file and highlight the json

Screenshots

image

Version and Environment Details Operation system: macos latest IDE name and version: 2021.2 Plugin version: 3.0.0

vepanimas commented 3 years ago

Hi! Thank you for the report. I also noticed this behavior after upgrading to 3.0, but I decided that it was an accident due to active testing and experimenting with the settings. When building a plugin from the source code, unfortunately, I can't reproduce it. I'll try to take a closer look.

To fix it locally you could try to add file association manually like on the screenshot below:

json-file-type

vepanimas commented 3 years ago

Perhaps this https://youtrack.jetbrains.com/issue/IDEA-274889 is the reason.

simPod commented 3 years ago

Thank you. Yes, added json type "fixes" the highlighting :)

simPod commented 3 years ago

And it also fixed the missing arrow button. So the problem is somehow the registration of the .graphqlconfig extension.

alex-grover commented 2 years ago

this issue also just popped up for me after a recent update. perhaps it's worth pinning this issue as it was not immediately clear from the title that it actually fixes broken syntax highlighting outside of the .graphqlconfig file as well.

reckter commented 2 years ago

I have this behavior quite regularly. The fix posted above works, but only for the current session. When I restart webstorm (or perhaps my machine, unsure), it again has the bug.

vepanimas commented 2 years ago

@reckter that should be fixed in the platform since 2021.2.1. What IDE version do you use?

reckter commented 2 years ago

2021.2.3 Just tested again, and restarting webstorm or rebooting did not trigger it. So it might just have been "grandfathered in".

vepanimas commented 2 years ago

Ah, I found one more way to reproduce it, the issue is still there. It's a combination of several attempts to disable and enable a plugin. I will look into that again 😞.

vepanimas commented 2 years ago

Should be fixed in the recent 3.1.0 release.

simPod commented 2 years ago

I have not encountered this problem for some time.