don't replace <body>

This commit is contained in:
Ben Howes 2020-01-29 11:11:10 +00:00
parent 8ec456285b
commit 583687cac7
No known key found for this signature in database
GPG Key ID: 7047FE88C4EDF6D2
2 changed files with 2 additions and 1 deletions

View File

@ -97,6 +97,6 @@
// Render <GraphiQL /> into the body.
ReactDOM.render(
React.createElement(GraphiQL, options),
document.body
document.getElementsByClassName("editor")[0]
);
})();

View File

@ -31,6 +31,7 @@ add "&raw" to the end of the URL within a browser.
crossorigin="anonymous"></script>
</head>
<body>
<div class="editor"></div>
{% csrf_token %}
<script src="{% static 'graphene_django/graphiql.js' %}"></script>
</body>