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

Adding default header option to GraphQLPlayground.init() #825

Merged
merged 2 commits into from
Oct 15, 2018
Merged

Adding default header option to GraphQLPlayground.init() #825

merged 2 commits into from
Oct 15, 2018

Conversation

wilsongp
Copy link
Contributor

Feature implementation for #636 .

Changes proposed in this pull request:

  • Add headers option to GraphQLPlayground.init()
  • Add headers property to GraphQLBinApp and pass it through to PlaygroundWrapper
  • Combine endpoint headers and default headers when passing through to Playground

Adding a "test" header like this;

image

results in:

image

@CLAassistant
Copy link

CLAassistant commented Aug 27, 2018

CLA assistant check
All committers have signed the CLA.

@wilsongp
Copy link
Contributor Author

I'm wondering if this has had any eyes on it or it's sitting in limbo. Happy to make any changes needed; just looking to use the functionality in one of my projects.

@tsteele
Copy link

tsteele commented Sep 12, 2018

It would be great if this could be merged, we want to pass a bearer token in as a header.

Copy link

@tsteele tsteele left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This the change needed to support adding headers from wrapping software , such as Bearer tokens, that will allow developers to use Playground without the need to fork the playground project

@steffenmllr
Copy link

Any chance this get's merged - It's the only reason I can't use graphql-playground over graphiql

@scousino
Copy link

scousino commented Oct 9, 2018

Also could really use this for a project I'm on. Unfortunately this repo doesn't seem to be very well maintained. Last commit 28 days ago, with 33 pull requests :/

@huv1k
Copy link
Collaborator

huv1k commented Oct 15, 2018

Thanks for your first contribution! It will be in next release 🚀Sorry for taking too long.

@huv1k huv1k merged commit 7445adf into graphql:master Oct 15, 2018
@hampusohlsson
Copy link

@HuVik Congrats on releasing v1.8.0! Would be great if you could publish it to npm as well, so it can be used from the jsdelivr CDN. Too eager to start using this instead of GraphiQL 😇

@huv1k
Copy link
Collaborator

huv1k commented Oct 18, 2018

@hampusohlsson New version is already there. v1.8.0 is electron version, playground react version is 1.7.8 what is build inside electron one :)

@hampusohlsson
Copy link

Ahh I see! Awesome, thanks!

cgxxv pushed a commit to cgxxv/graphql-playground that referenced this pull request Mar 25, 2022
* Passing headers through to playground from init

* Adding test that header is added
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants