mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-28 20:43:43 +03:00
Allow for easier template overrides in graphiql (#863)
* don't replace <body> * Update graphene_django/templates/graphene/graphiql.html Co-Authored-By: Jonathan Kim <jkimbo@gmail.com> * Fix editor styling and initialisation Co-authored-by: Jonathan Kim <jkimbo@gmail.com>
This commit is contained in:
parent
f3f0608606
commit
6b8c5bdefc
|
@ -97,6 +97,6 @@
|
||||||
// Render <GraphiQL /> into the body.
|
// Render <GraphiQL /> into the body.
|
||||||
ReactDOM.render(
|
ReactDOM.render(
|
||||||
React.createElement(GraphiQL, options),
|
React.createElement(GraphiQL, options),
|
||||||
document.body
|
document.getElementById("editor")
|
||||||
);
|
);
|
||||||
})();
|
})();
|
||||||
|
|
|
@ -10,7 +10,7 @@ add "&raw" to the end of the URL within a browser.
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<style>
|
<style>
|
||||||
html, body {
|
html, body, #editor {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -31,6 +31,7 @@ add "&raw" to the end of the URL within a browser.
|
||||||
crossorigin="anonymous"></script>
|
crossorigin="anonymous"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<div id="editor"></div>
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<script src="{% static 'graphene_django/graphiql.js' %}"></script>
|
<script src="{% static 'graphene_django/graphiql.js' %}"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user