facebook / relay

Relay is a JavaScript framework for building data-driven React applications.
https://relay.dev
MIT License
18.24k stars 1.8k forks source link

Make schema validation report using diagnostics #4685

Closed captbaritone closed 1 week ago

captbaritone commented 1 month ago

This PR updates our schema validation crate (which was previously not actually used directly by Relay) to report errors using Diagnostics rather than using its bespoke error reporting approach. This has a few effects:

  1. Error reporting is improved for CLI output for the existing validation tool, with file locations and inline context, and related locations all being reported
  2. As we look to adopt schema validation in Relay proper the errors will be compatible with the LSP meaning they will surface as red underlines in the correct locations.
facebook-github-bot commented 1 month ago

@captbaritone has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 1 week ago

@captbaritone merged this pull request in facebook/relay@a5682a8a129efa9df26df84d63fbf096b989f514.