Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[graphiql] defaultQuery with empty string does not result in empty default query #3495

Open
1 task done
incompl opened this issue Jan 11, 2024 · 0 comments
Open
1 task done

Comments

@incompl
Copy link

incompl commented Jan 11, 2024

Is there an existing issue for this?

  • 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 GraphiQL component
  • 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
  • react Version: 18.2.0
  • graphql Version: 16.6.0

Anything else?

This worked as expected previously. I am upgrading from 1.x to 3.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant