mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-17 19:52:23 +03:00
Enable headers editor in GraphiQL by default
This commit is contained in:
parent
ea10c33c0a
commit
9f8fd4346b
|
@ -193,14 +193,14 @@ Default: ``None``
|
|||
|
||||
GraphiQL starting from version 1.0.0 allows setting custom headers in similar fashion to query variables.
|
||||
|
||||
Set to ``True`` to enable GraphiQL headers editor tab.
|
||||
Set to ``False`` if you want to disable GraphiQL headers editor tab for some reason.
|
||||
|
||||
This setting is passed to ``headerEditorEnabled`` GraphiQL options, for details refer to GraphiQLDocs_.
|
||||
|
||||
.. _GraphiQLDocs: https://github.com/graphql/graphiql/tree/main/packages/graphiql#options
|
||||
|
||||
|
||||
Default: ``False``
|
||||
Default: ``True``
|
||||
|
||||
.. code:: python
|
||||
|
||||
|
|
|
@ -41,10 +41,10 @@ DEFAULTS = {
|
|||
"DJANGO_CHOICE_FIELD_ENUM_CUSTOM_NAME": None,
|
||||
# Use a separate path for handling subscriptions.
|
||||
"SUBSCRIPTION_PATH": None,
|
||||
# Set to True to enable GraphiQL headers editor tab
|
||||
# By default GraphiQL headers editor tab is enabled, set to False to hide it
|
||||
# This sets headerEditorEnabled GraphiQL option, for details go to
|
||||
# https://github.com/graphql/graphiql/tree/main/packages/graphiql#options
|
||||
"GRAPHIQL_HEADER_EDITOR_ENABLED": False,
|
||||
"GRAPHIQL_HEADER_EDITOR_ENABLED": True,
|
||||
}
|
||||
|
||||
if settings.DEBUG:
|
||||
|
|
|
@ -175,7 +175,7 @@
|
|||
onEditQuery: onEditQuery,
|
||||
onEditVariables: onEditVariables,
|
||||
onEditOperationName: onEditOperationName,
|
||||
headerEditorEnabled: GRAPHENE_SETTINGS.graphiqlHeaderEditorEnabled || false,
|
||||
headerEditorEnabled: GRAPHENE_SETTINGS.graphiqlHeaderEditorEnabled || true,
|
||||
query: parameters.query,
|
||||
};
|
||||
if (parameters.variables) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user