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

plugin throw IllegalStateException #489

Closed key-del-jeeinho closed 2 years ago

key-del-jeeinho commented 3 years ago

Before you create the issue

Describe the bug IDE Fatal Error occurred while get graphql schema from endpoint in .graphqlconfig.

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

  1. Go to 'https://gist.github.com/key-del-jeeinho/8497f1bbf0673cc19a9aa85c49fc20dd'
  2. Insert the config into the Spring boot project, then double-click DefaultGraphQlEndpoint in Endpoints in the GraphQL section of the bottom bar, and click GetGraphQlSchemaFromEndpoints.
  3. Check the IDE FatalError that occurs later.

Expected behavior IDE Fatal Error occurred while get graphql schema from endpoint in .graphqlconfig. and doesn't working... here is error log

java.lang.IllegalStateException: @NotNull method com/intellij/lang/jsgraphql/ide/editor/GraphQLIntrospectionService.parseIntrospectionJson must not return null
    at com.intellij.lang.jsgraphql.ide.editor.GraphQLIntrospectionService.$$$reportNull$$$0(GraphQLIntrospectionService.java)
    at com.intellij.lang.jsgraphql.ide.editor.GraphQLIntrospectionService.parseIntrospectionJson(GraphQLIntrospectionService.java:228)
    at com.intellij.lang.jsgraphql.ide.editor.GraphQLIntrospectionService$IntrospectionQueryTask.run(GraphQLIntrospectionService.java:484)
    at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:962)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:472)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:235)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:235)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
    at java.base/java.lang.Thread.run(Thread.java:834)

Screenshots image

Version and Environment Details Operation system: windows 10 IDE name and version: IntelliJ Ultimate 2020.3.2 Plugin version: 3.0.0-2020.3

Additional context Add any other context about the problem here.

key-del-jeeinho commented 3 years ago

The project to which the config is applied. (It is not applied to the repository because commit/push has not yet been performed.)

vepanimas commented 2 years ago

@key-del-jeeinho hi! Github responses with redirect when you make a query to an HTTP endpoint instead of HTTPS and we don't handle it properly. I'll add a redirection policy for such responses, thanks for the report!