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.

Unable to create a .graphqlconfig from the fragment editor window

See original GitHub issue

Describe the bug

  • Displays Erros
  • does not find .graphqlconfig
  • can created .graphqlconfig

To Reproduce Fresh installed in WebStorm 2020.2, never used it before. Would like to use in .vue files within gridsome. I injected graphql in the <page-query /> Tag (some Gridsome stuff) and the Syntax Highlighting started, also errors are reported

image

auto complete is comming up for stuff like query,interface etc. but not for types.

So I did a “fix” to edit the graphql fragment (Alt+Enter). The an extra windows with the graphql popped up.

image

This did not help, of course i thought, without an Schema, only errors occurs.

I clicked the Wrench, and

and got

image

Great, let me create a config. But instead of a config i got an exception. But the Exception Reporter told me, I should report it to you 😉

java.lang.AssertionError
	at com.intellij.lang.jsgraphql.ide.actions.GraphQLEditConfigAction.lambda$actionPerformed$0(GraphQLEditConfigAction.java:77)
	at com.intellij.notification.impl.ui.NotificationsUtil$1.hyperlinkUpdate(NotificationsUtil.java:147)
	at java.desktop/javax.swing.JEditorPane.fireHyperlinkUpdate(JEditorPane.java:345)
	at java.desktop/javax.swing.text.html.HTMLEditorKit$LinkController.activateLink(HTMLEditorKit.java:899)
	at java.desktop/javax.swing.text.html.HTMLEditorKit$LinkController.mouseClicked(HTMLEditorKit.java:695)
	at java.desktop/java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:278)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6653)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3345)
	at java.desktop/java.awt.Component.processEvent(Component.java:6415)
	at java.desktop/java.awt.Container.processEvent(Container.java:2263)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5025)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4857)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4556)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2773)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4857)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:967)
	at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:904)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:836)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:450)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:744)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:449)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:802)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:503)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

After that i look up the Docs and tried to create config file by myself.

I have a .grapqhlconfig at the project root, also a schema.graphql

{
  "name": "dev-days-online.de site data",
  "schemaPath": "./schema.graphql"
  }
}

But the behavior does not change, many errors in the query, not finding the config file, cant create the config etc.

Version and Environment Details Operation system: Mac OS 10.5.6 IDE name and version: WebStorm 2020.2 (final) Plugin version: JS GraphQL 2.5.0

Additional context The repository with the project in question is here, the issue2009 branch.

https://github.com/DevDaysOnline/DevDaysOnline.de/tree/issue2009

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:6

github_iconTop GitHub Comments

2reactions
vepanimascommented, Aug 16, 2020

@carchrae thank you! It looks that this one #360 should fix the compatibility with the 2020 release. I made sure that the autocomplete using the schema works there.

I’ve created a separate issue for compatibility update #363.

0reactions
carchraecommented, Aug 16, 2020

edit: note this is only when trying to create a config file. it appears to find the config file when placed in the root of your project, as it will ask to introspect/etc. however, it doesn’t appear to actually load the schema once it has been fetched.

Please, could you clarify this one “however, it doesn’t appear to actually load the schema once it has been fetched.”? It seems that it’s an unrelated problem.

sure. when opening a project where there is a .grapqhlconfig file (and introspect is set to true) it will prompt to download the schema. so the plugin has correctly found the config file. however, no schema highlighting or schema names appear in the IDE, as if it has not actually loaded the schema (or likely, something has crashed in that process). you’re right that it may be a separate issue to creating the config file, but it means that the plugin doesn’t work at all on 2020.2, which is what i think @DerAlbertCom was referring to when he opened this issue. i reverted to the 2019 version and it works as expected there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to create a .graphqlconfig from the fragment editor window ...
Describe the bug. Displays Erros; does not find .graphqlconfig; can created .graphqlconfig. To Reproduce Fresh installed in WebStorm 2020.2, never used it ...
Read more >
js-graphql-intellij-plugin/GraphQLConfigManager.java at master
editing of injected fragments produce in-memory mapped version of the original file, e.g. editing GraphQL inside a JS as it's own editing window....
Read more >
GraphQL - IntelliJ IDEs Plugin - JetBrains Marketplace
Execute queries and mutations with variables against configurable endpoints; Support for multiple schemas using graphql-config. More information about ...
Read more >
Developer guide · JS GraphQL IntelliJ Plugin
To create a .graphqlconfig file, right click a folder and select ... in the GraphQL Tool window tab called "Schemas and Project Structure"....
Read more >
GraphQL Config — One configuration for all your tools - Medium
With the new GraphQL Config, you're able to indicate files containing GraphQL operations and fragments (documents) and load them all within ...
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