graphiql
graphiql copied to clipboard
[graphiql] defaultQuery with empty string does not result in empty default query
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
Currently if you set defaultQuery="" you get the commented intro text in the editor by default.
Expected Behavior
I expect the query editor to be empty in this case.
Steps To Reproduce
- Add defaultQuery="" to your
GraphiQLcomponent - Clear localstorage so you don't get your last query shown by default and refresh
Environment
- GraphiQL Version: 3.1.0
- OS: OSX 13.6.1
- Browser: Chrome 120.0.6099.199
- Bundler: Webpack
reactVersion: 18.2.0graphqlVersion: 16.6.0
Anything else?
This worked as expected previously. I am upgrading from 1.x to 3.x.