apollo-rs
apollo-rs copied to clipboard
Improve parser error formatting
ref https://github.com/apollographql/apollo-rs/pull/347#discussion_r1020325156
Right now parser errors show the index and the current token it's looking at, which isn't all that helpful to end users. IIRC Simon mentioned using the Python REPL to copy-paste the GraphQL source and slice it at the error index to get the context he needed.
ERROR@200:202 "Unterminated spread operator" ..
Maybe parser errors can use miette, like other parts of the project. We could even give suggestions in the future (like if we throw an "incomplete spread operator" error, we can suggest replacing it by a complete spread operator).