vscode-graphql icon indicating copy to clipboard operation
vscode-graphql copied to clipboard

Go to Definition doesn't work in GraphQL schema file

Open DylanSpOddball opened this issue 4 years ago • 1 comments

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

DylanSpOddball avatar Feb 02 '22 15:02 DylanSpOddball

Hitting this too, very annoying

DrewHoo avatar Sep 21 '22 18:09 DrewHoo