-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add defaultHeaders configuration option #2145
Comments
We currently pass Is that this same issue, or should I open up a separate bug report? (this is using |
@SimenB the behavior that you describe is actually expected. During the initial render, GraphiQL checks the latest state for tabs persisted in These controlled props are not designed for defining initial editor values, changing these props "on runtime" would for example also override the editor contents with the new value of the prop. If sounds to me that what you would like to have is exactly the |
Great, thanks for clarifying 👍 |
This was just added in #2886, enjoy! |
The GraphiQL configuration options already have:
It would be nice to add a
defaultHeaders?: string
option.It could e.g be set to:
{ "X-API-Key": "<ENTER YOUR API KEY>" }
to more easier help people fill in their API key.The text was updated successfully, but these errors were encountered: