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

Get Schema does not work. #566

Closed dntjr031 closed 2 years ago

dntjr031 commented 2 years ago

Before you create the issue

Describe the bug Don't getting Graphql Schema to version 3.1.0~. Up to version 3.0.0, it works without any problems.

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

  1. Go to 'Graphql => Schema and Project Structure.'
  2. Click on 'Endpoints'
  3. Click on 'Get Graphql Schema from Endpoint'

Screenshots image

Version and Environment Details Operation system: Windows 10 pro IDE name and version: WebStorm 2021.3 Plugin version: 3.1.0~

Additional context Error Stack trace

SchemaProblem{errors=['onOperation' tried to use an undeclared directive 'deprecated', 'onFragment' tried to use an undeclared directive 'deprecated', 'onField' tried to use an undeclared directive 'deprecated']}
    at com.intellij.lang.jsgraphql.ide.introspection.GraphQLIntrospectionService.printIntrospectionAsGraphQL(GraphQLIntrospectionService.java:348)
    at com.intellij.lang.jsgraphql.ide.introspection.GraphQLIntrospectionService$IntrospectionQueryTask.run(GraphQLIntrospectionService.java:561)
    at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:436)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:120)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:496)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:244)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:624)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:698)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:646)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:623)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:244)
    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:829)

query Result

{
    "name": "onOperation",
    "description": null,
    "args": [],
    "type": {
        "kind": "SCALAR",
        "name": "Boolean",
        "ofType": null
    },
    "isDeprecated": true,
    "deprecationReason": "Use `locations`."
},
{
    "name": "onFragment",
    "description": null,
    "args": [],
    "type": {
        "kind": "SCALAR",
        "name": "Boolean",
        "ofType": null
    },
    "isDeprecated": true,
    "deprecationReason": "Use `locations`."
},
{
    "name": "onField",
    "description": null,
    "args": [],
    "type": {
        "kind": "SCALAR",
        "name": "Boolean",
        "ofType": null
    },
    "isDeprecated": true,
    "deprecationReason": "Use `locations`."
}
vepanimas commented 2 years ago

Fixed here #548, will be released soon.