facebook / facebook/relay

Clicking on hover links in VSCode extension does not trigger expected action

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

Description

When I hover a graphql field it shows a hover with a link to the field type. But when I click the link nothing happens.

I expect it to somehow show me the type.

## Steps to reproduce

The glitch link mentioned in the issue template does not work, so I'll just try to describe it instead:

1. Hover a field in a query, such as `Github_viewer` in a query like
```ts
const query = graphql`
query CommitsQuery {
Github_viewer {
name
}
`
```

2. Click on the type (the link). Nothing will happen.

3. If you hover it (hover the link in the hover content) you should see a title with a command like `command:nuclide.relay-lsp.openSchemaExplorer?{%22path%22:[%22Query%22,%22Github_User%22],%22schemaName%22:%22my_app%22}`

4. Activating the relay-lsp debug logs and looking at the output you should be able to read
```
[DEBUG] > {"jsonrpc":"2.0","id":97,"result":{"contents":["Field: **Github_viewer**","The currently authenticated user.","Type: **[Github_User!](command:nuclide.relay-lsp.openSchemaExplorer?{%22path%22:[%22Query%22,%22Github_User%22],%22schemaName%22:%22my_app%22})**"]}}
```

## Other observations

- The nuclide reference is from [this line](https://github.com/facebook/relay/blob/4a1d71df2fb0331707f54d09fdcbc8aac014cde6/compiler/crates/relay-lsp/src/hover/mod.rs#L124)
- I can't find any VSCode extension named `nuclide.relay-lsp`, so I presume it's a reference to the [retired nuclide editor](https://nuclide.io/)?

## Extension info
```
Name: Relay GraphQL
Id: meta.relay
Description: Relay-powered IDE experience
Version: 1.0.2
Publisher: Meta
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=meta.relay
```

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.