mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-12 17:22:20 +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 %}
|
{% if subscription_path %}
|
||||||
subscriptionPath: "{{subscription_path}}",
|
subscriptionPath: "{{subscription_path}}",
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if header_editor_enabled %}
|
||||||
|
graphiqlHeaderEditorEnabled: "{{ graphiql_header_editor_enabled}}",
|
||||||
|
{% endif %}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<script src="{% static 'graphene_django/graphiql.js' %}"></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,
|
subscriptions_transport_ws_sri=self.subscriptions_transport_ws_sri,
|
||||||
# The SUBSCRIPTION_PATH setting.
|
# The SUBSCRIPTION_PATH setting.
|
||||||
subscription_path=self.subscription_path,
|
subscription_path=self.subscription_path,
|
||||||
|
# GraphiQL headers tab,
|
||||||
|
graphiql_header_editor_enabled=graphene_settings.GRAPHIQL_HEADER_EDITOR_ENABLED,
|
||||||
)
|
)
|
||||||
|
|
||||||
if self.batch:
|
if self.batch:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user