facebook / facebook/relay

Error messages could be improved

Open
#5,121 0 comments 0 reactions 0 assignees View on GitHub
shared with relay team
Dominant language
Rust
Stars
19k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

Consider this error message

```

[ERROR] Error: ✖︎ Operation 'ShoppingRootPageQuery' references undefined variable: '$isCloseupRelatedModulesQuery'.

app/www/closeup/duplo/unauth/UnauthContextMenu.tsx:131:28
130 │ }
131 │ richMetadata @skip(if: $isCloseupRelatedModulesQuery) {
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
132 │ article {

```

The diagnostic should have a related location that shows the definition location of `ShoppingRootPageQuery`, so that I can cmd+click to open it, instead of manually opening `ShoppingRootPage`. We also don't use haste 😭 (I know I know, it's our fault) so in some cases, there may be multiple possible definition locations.

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.