diff --git a/netbox/netbox/graphql/views.py b/netbox/netbox/graphql/views.py index 18ed3843d..c2c0269fa 100644 --- a/netbox/netbox/graphql/views.py +++ b/netbox/netbox/graphql/views.py @@ -12,6 +12,8 @@ class GraphQLView(GraphQLView_): """ Extends graphene_django's GraphQLView to support DRF's token-based authentication. """ + graphiql_template = 'graphiql.html' + def dispatch(self, request, *args, **kwargs): # Enforce GRAPHQL_ENABLED diff --git a/netbox/project-static/img/graphql.ico b/netbox/project-static/img/graphql.ico new file mode 100644 index 000000000..4940291a2 Binary files /dev/null and b/netbox/project-static/img/graphql.ico differ diff --git a/netbox/templates/graphiql.html b/netbox/templates/graphiql.html new file mode 100644 index 000000000..772a05319 --- /dev/null +++ b/netbox/templates/graphiql.html @@ -0,0 +1,59 @@ +{% comment %} + This template derives from the graphene-django project: + https://github.com/graphql-python/graphene-django/blob/main/graphene_django/templates/graphene/graphiql.html +{% endcomment %} + +{% load static %} + + +
+ + + + + + + + +