facebook / facebook/relay

LSP error in Relay GraphQL VSCode Extension

Open
#3,975 40 comments 4 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
19k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

Updated to relay 14 and added the Relay GraphQL extension for VSCode. Upon trying to use features like Intellisense on hover, I see some errors logged to "Relay LSP Logs" output:

```
[DEBUG] request received Request { id: RequestId(I32(194)), method: "textDocument/hover", params: Object({"position": Object({"character": Number(11), "line": Number(20)}), "textDocument": Object({"uri": String("file:///Users/alex/dev/statsig/console/client/components/console/pulse/ScheduledRollupsDialog.tsx")})}) }
[DEBUG] lsp_method: textDocument/hover
[DEBUG] lsp_type: request
[DEBUG] Successfully parsed the definitions for a target GraphQL source
[DEBUG] position_span: 155:155
lsp_outcome: error
[DEBUG] lsp_error_message: get_schema: schema is missing (or not ready, yet) for the `default` project.
[DEBUG] 0ms lsp_message_processing_time
```

I assume my relay config must be set up correctly since relay-compiler works fine. My project is looked at ./console/, but I've added that root to the extension settings (until I did that I saw a different error about not finding a project).

The "Relay" output includes:

```
Searching for the relay-compiler starting at: /Users/alex/dev/statsig/console
Starting the Relay GraphQL extension...
Using relay binary: /Users/alex/dev/statsig/console/node_modules/relay-compiler/macos-arm64/relay
Starting the Relay Langauge Server with these options: {"options":{"cwd":"/Users/alex/dev/statsig/console"},"command":"/Users/alex/dev/statsig/console/node_modules/relay-compiler/macos-arm64/relay","args":["lsp","--output=debug"]}
Not starting the Relay Compiler. Please enable relay.autoStartCompiler in your settings if you want the compiler to start when you open your project.
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.