reason
reason copied to clipboard
Error formatting: weird indentation on complex type error
(Following this thread https://twitter.com/MoOx/status/1068970511173074944)
I would like to report something that would need to be improved to help complex types debugging
When playing with graphql (with graphql_ppx), we end up having generated types. If we make a mistake when using graphql response, we will have error that might produce errors with a very unusual formatting

I think the situation should be improved by offernig a more simple indentation, or even better a diff (with colors/font-weight!). Diff would make sense if type to output is more than one line I guess.
Repro
git clone https://github.com/MoOx/dame.bio
cd dame.bio
git checkout issue-reason-error-formatting
yarn
yarn prepare step should trigger a bs compilation and should output the error.