-
Notifications
You must be signed in to change notification settings - Fork 769
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 custom header support to GraphiQL #850
Comments
Yes, without being able to customize the headers, it's not possible to test JWT authentication |
This seems like a good enhancement. If anyone wants to contribute a PR for this that would be very helpful. |
@MythicManiac @jkimbo Hey, I've prepared PR #1016 that adds support for headers introduced to |
How to enable GRAPHIQL_HEADER_EDITOR_ENABLED if I am not using Django? |
This is |
haha, my bad. I found my answer in the flask repo. Thanks! |
@shaozi sorry to bring this up almost a year later. Where can this be done for graphene/flask? |
You can download the latest graphiql and make it a template (almost without any changes), then pass it to the app: GraphQLView.as_view("graphql", schema=schema, graphiql=True,
graphiql_version='1.0.5',
graphiql_template=template,
graphiql_html_title='Graphql-Dev') |
Related issue: graphql/graphiql#500
GraphiQL by default does not implement a way to pass custom request headers, which are still fairly commonly used for example by authentication middleware. It would be nice if graphene-django's built-in GraphiQL view had support for doing authenticated requests with custom HTTP headers.
The text was updated successfully, but these errors were encountered: