diff --git a/graphene_django/templates/graphene/graphiql.html b/graphene_django/templates/graphene/graphiql.html index abc4b52..8e71a69 100644 --- a/graphene_django/templates/graphene/graphiql.html +++ b/graphene_django/templates/graphene/graphiql.html @@ -45,6 +45,9 @@ add "&raw" to the end of the URL within a browser. {% if subscription_path %} subscriptionPath: "{{subscription_path}}", {% endif %} + {% if header_editor_enabled %} + graphiqlHeaderEditorEnabled: "{{ graphiql_header_editor_enabled}}", + {% endif %} }; diff --git a/graphene_django/views.py b/graphene_django/views.py index 59084e8..5ee0297 100644 --- a/graphene_django/views.py +++ b/graphene_django/views.py @@ -167,6 +167,8 @@ class GraphQLView(View): subscriptions_transport_ws_sri=self.subscriptions_transport_ws_sri, # The SUBSCRIPTION_PATH setting. subscription_path=self.subscription_path, + # GraphiQL headers tab, + graphiql_header_editor_enabled=graphene_settings.GRAPHIQL_HEADER_EDITOR_ENABLED, ) if self.batch: