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

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

Open simPod opened this issue 2 years ago • 11 comments

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

simPod avatar Aug 02 '21 16:08 simPod

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 avatar Aug 02 '21 20:08 vepanimas

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

vepanimas avatar Aug 02 '21 21:08 vepanimas

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

simPod avatar Aug 03 '21 06:08 simPod

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

simPod avatar Aug 03 '21 06:08 simPod

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.

alex-grover avatar Sep 30 '21 06:09 alex-grover

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.

reckter avatar Oct 18 '21 09:10 reckter

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

vepanimas avatar Oct 18 '21 20:10 vepanimas

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

reckter avatar Oct 19 '21 16:10 reckter

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 avatar Oct 21 '21 17:10 vepanimas

Should be fixed in the recent 3.1.0 release.

vepanimas avatar Dec 07 '21 15:12 vepanimas

I have not encountered this problem for some time.

simPod avatar Dec 10 '21 08:12 simPod