mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-12 09:12:18 +03:00
Inject GraphiQL header setting to graphiql.html template
This commit is contained in:
parent
ca115f5381
commit
ea10c33c0a
|
@ -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 %}
|
||||
};
|
||||
</script>
|
||||
<script src="{% static 'graphene_django/graphiql.js' %}"></script>
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user