apollographql / vscode-graphql

Apollo GraphQL VS Code extension
https://marketplace.visualstudio.com/items?itemName=apollographql.vscode-apollo
MIT License
68 stars 21 forks source link

Go to Definition doesn't work in GraphQL schema file #58

Open DylanSpOddball opened 2 years ago

DylanSpOddball commented 2 years ago

In our repo https://github.com/CMSgov/easi-app, we have a client project with a local schema file, with this apollo.config.js. When pkg/graph/schema.graphql is open, the Go to Definition action doesn't work on types defined in the schema; it shows "No definition found", even for types that are definitely defined in the schema file.

With the apollographql.trace.server setting on verbose, the following messages are displayed - it looks like the language server isn't returning any responses for textDocument/definition requests.

[Trace - 9:44:21 AM] Sending request 'textDocument/definition - (14)'.
Params: {
    "textDocument": {
        "uri": "file:///home/dylan/source/repos/easi-app/pkg/graph/schema.graphql"
    },
    "position": {
        "line": 1095,
        "character": 53
    }
}

[Trace - 9:44:21 AM] Received response 'textDocument/definition - (14)' in 1ms.
No result returned.

┆Issue is synchronized with this Jira Task by Unito

DrewHoo commented 2 years ago

Hitting this too, very annoying