[graphiql-react] Prettify button missing red error class on invalid queries
- Dominant language
- TypeScript
- Stars
- 16.9k
- Forks
- 1.9k
- Avg merge
- 22h 45m
- Merged PRs (30d)
- 70
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Current Behavior
The prettify button used to turn red if it failed to prettify, it doesn't seem to be doing that anymore
### Expected Behavior
If you press the prettify button on an invalid query that cannot prettify, the button should turn red
### Steps To Reproduce
In the swapi or netlify demos, type an incorrect query and press prettify
___
The button used to turn red like this but doesn't anymore
### Environment
* GraphiQL Version:
* OS:
* Browser:
* Bundler:
* `react` Version:
* `graphql` Version:
### Anything else?
I think this could be fixed by throwing the errors in the prettifyEditors function, then in the ToolbarButton change the onClick type to onClick: (args?: any) => (any | Promise); and await the onClick
Contributor guide
Assessment
This issue has not been assessed yet.